Tuesday, August 25, 2009

NFS Users

I recently needed to share the same directory between Samba and NFS. The main problem was that Samba accounts were mapped to users and NFS was not. NFS accounts can also be mapped to users by adding the following to /etc/exports


path_to_share computer_name(rw,all_squash,anonuid=xxx,anongid=yyy)


anonuid is the user id to map to and anongid is the group id to map to when a client from the computer_name connects to the share.

You can find out the user id and group id of a user with


id user_name


Use the value of uid and gid to be anonuid and anongid respectively.

Now when a user from computer_name connects to the share, he connects as user uid and of group gid.

No comments: