Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-17-2010, 02:48 AM   #1
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
How to automount NIS account's home dir to a different location?


### problem:
user account on NIS server: user
Home dir as set in /etc/passwd: /home/user

proposed mountpoint for NIS client home dir for 'user': /shared/home/user
  • auto mounting to /home/user works fine
  • BUT if i want to automount to different location; it still looks for /home/user directory to mount to. So I get an error and i get directed to the '/' dir.
  • Is there someway for me to edit the passwd file that is being exported by the NIS server? because if I change the local passwd of the user in the NIS server then he wont be able to see his home dir when logging in locally. (although this does seem to be a good idea; since he wont need to login directly into the NIS server....)

Old 01-17-2010, 06:01 AM   #2
Senior Member
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
How about mounting it at /home/user on the client but also having it accessible at /shared/home/user?

As root on the client

$ mkdir /shared
$ ln -s /home /shared/home
Old 01-17-2010, 07:49 AM   #3
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Original Poster
Rep: Reputation: 30
ahhh soft links... thats very possible. Its a workaround but not the solution. thanks arizonagroovejet!
Old 01-17-2010, 08:57 AM   #4
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
On the box which is the NIS master server you can modify the user settings. If you use adduser you can change the home directory. Man adduser is more accurate than I am, so check that.

NIS intercepts adduser calls so the YP databases are updated whenever you run adduser. If that doesn't work, run make in /var/lib/yp. You might also have to restart NIS on the server.

You must login again on the client for the changes to propgate.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
automount home directories with information from Active Directory (or NIS) alex r Linux - Software 5 08-30-2006 11:05 AM
NIS : Home dir not mounted p_test Linux - Networking 2 03-11-2006 11:28 AM
NIS home dir problm mgokulagiridara Linux - Enterprise 1 02-28-2005 08:44 AM
getting home directories to automount with NIS schurt Linux - Networking 3 04-23-2004 01:55 PM
nis client login - user home dir not fnd synfield Linux - Networking 0 03-27-2003 04:51 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration