Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a NIS server with shared users' home directories in '/home'.

We're used to mounting the server's '/home' using '/home' as the mount point on each NIS client.

However, if we do this with a machine that has existing local users, their home directories will not be accessible because '/home' is now a mount point to the server.

How can we make both local and remote users' home directories accessible on the client?

share|improve this question

What you can do is to setup an autofs mountpoint in, say, /home2. Then set each user's home directory as /home2/machine/user. If you set autofs to mount machine:/home in /home2/machine, then you have what you want, because the local /home can be mounted as /home2/localmachinename. And you can of course configure autofs via NIS.

share|improve this answer

If it's at all an option, I recommend making the “physical” location of each home directory something like /net/$hostname/$username, i.e., include the name of the server as part of the path. Then arrange for /home/$username to point to /home/$(server-of $username)/$username.

One possibility is to make /home a union mount of all the /net/*.

Alternatively, you can make /home an automount point and set up the automounter to mount /net/file-server/$username for a NIS user or /home.local/$username for a local user.

share|improve this answer

What we do is mount the server's home on /mnt/server/export/home, then on other machines symlink each user's home directory into the local /home. This can be maintained semi-automatically across machines with rsync.

share|improve this answer

You can specify both local and remote mounts in an automounter config file (we use the /etc/auto.home file).

We have:

/etc $ ypcat auto.master
auto.direct     --timeout=600
auto.home       --timeout=1800


/etc $ cat /etc/auto.home

localadmin        :/local/home/&
localuser         :/local/home/&

/etc $

Obviously very late, but hopefully useful for someone.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.