Friday, May 18, 2007

Exporting server home directories

In order to preserve permissions on the home directories of users on *nix server, while exporting them using NFS, they must be exported with the following options:

Assume we have user foo(uid=505) who is part of group foobar(gid=501). His home directory is obviously /home/foo.

In order to export it foo's PC with IP 10.10.10.10 the following line is added to /etc/exports:

/home/foo 10.10.10.10(rw,sync,all_squash,anonuid=505,anongid=501)

Reload/Restart the nfs daemon and mount the directory on foo's machine.

Doing an ls on foo's PC you might see odd user and group id's but these depend solely on foo's /etc/passwd and /etc/group number associations.

That's it

No comments: