LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   strange username behavior using nfs (http://www.linuxquestions.org/questions/linux-server-73/strange-username-behavior-using-nfs-798799/)

lawson 03-30-2010 12:51 AM

strange username behavior using nfs
 
I'm trying to set up an NFS server/client. Everything seems to be working more or less OK, I've set up the relevant configuration files and so on. However, a strange thing happens when I try to mount the NFS share on the client machine. I've created a directory on which to mount the NFS share. Before I mount, if I do ls -l on the directory, the user and group show up as my username, as you would expect. But after I perform the mount, if I do ls -l, the username and group show up as another user on that machine. So then I can't modify anything on the share, which isn't too useful. Why are the ownerships mysteriously changing when I mount the NFS share? Thanks!

chrism01 03-30-2010 01:30 AM

With NFS, the uid has to be the same on both systems. The name could be different though if you're using local ie /etc/passwd files on each machine.
The OS only shows you what the uid entry says, if it has one to match. Otherwise it shows the uid.
Similarly for gid.

lawson 03-30-2010 12:01 PM

Ah, that make sense, thanks. Is there a better way around this than simply manually changing the uids? From what I've gathered this can cause permission problems for files outside the users home directory.

chrism01 03-30-2010 08:20 PM

Basically, uid on server & client must match under nfs (eg use ldap or nis), or cheat via additional groups or ACLs or anon user http://www.troubleshooters.com/linux...ut_cant_access


All times are GMT -5. The time now is 12:16 PM.