I am currently managing a network of workstations running different flavours of Ubuntu. The server (also Ubuntu) runs a NIS server and exports a shared /home directory over NFS (in v3 compatibility mode). Workstations are configured to mount server:/home to /home using static fstab entries. Users can log-in from any workstation to their account while their /home/xxx directory is always accessible (Quite old-school).

The problem (one out of many of course) with the current setup is, users can see the whole /home. If users are not careful with file permissions in their home directories, their data can be accessed by other users.

I need advice on how to improve/upgrade the system, preferably with minimal change to the current setup.

  • This is how linux was designed and would be the case regardless of nis/nfs involvement. If it is a problem mount, /home/userdir to /home/userdir on the machines. If you want roaming profiles switch to a windows environment (It is something Microsoft actually did VERY well). Else look for roaming profile solutions online? – Daniel Widrick Sep 24 '13 at 19:45
  • Thank you for your answer. Unfortunately migrating to Windows is not feasible. I will look into roaming profiles. – Mani M Sep 25 '13 at 17:33

Simple solution i use at work working well and no security problem so far: autofs You can find a lot of information about 'autofs' on the Net easily.

Make sure each user folder are 'chmod 700' and owned by them.


Here is a quick sample of the config i use:

Start NFS home directory automount:
Now, on the NIS client, set up automount to handle /home. In /etc/auto.master:
/home /etc/auto.home

And create /etc/auto.home with these contents:
* rw,sync hostname.of.nfs.server:/home/&

Then restart autofs, and make sure it starts at boot:

service autofs restart
chkconfig autofs on
service nfs start
service ypbind start (nis)
chkconfig nfs on; chkconfig ypbind on;

Configuration of NIS is another subject.

  • I will look into that. Thank you.(Unfortunately currently I do not have minimum rep to up-vote the answer!) – Mani M Sep 25 '13 at 17:35
  • the /home folder must be empty on the client that use autofs for this config to work. – JackDan Sep 26 '13 at 20:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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