NIS: How to allow access to both local and remote users’ home directories

mountnisusers

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?

Best Answer

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.

Related Question