Gentoo Archives: gentoo-amd64

From: "Conway S. Smith" <beolach@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] nfs mount has now become read-only
Date: Tue, 04 Apr 2006 23:53:25
In Reply to: Re: [gentoo-amd64] nfs mount has now become read-only by Mark Knecht
Hash: SHA1

Mark Knecht wrote:
> Thanks Sami! > > On 4/3/06, Sami Samhuri <sami@××××××××××.com> wrote: > >>Mark Knecht wrote: >> >>>Hello, >> >>[...] >> >>> There have been no changes or updates of any kind to the remote >>>machine that has the NFS directory exported. Normal updates have been >>>occurring on my AMD64 machine so presumably the problem is on this >>>machine as none of the remote files are writable anymore. One thing I >>>notice is that on the remote machine there are some directories and >>>files which have user names and some which only have numbers like 501, >>>502, etc. >>> >>> Where would I start looking for what's changed? >> >>The file system stores a user id for the owner and group. ls looks up the user >>id in /etc/passwd and shows you the username instead. You can make ls show user >>id's instead of names with `ls -ln`. > > > OK, I basically knew this... > > >>When you see numbers such as 501 in the directory listing that means the user or >>group who had that user id is not found in /etc/passwd or /etc/group. > > > OK, that means it's using the passwd file local to that specific > machine then. Here's what I have: > > NFS Server: Only one user account: > > mythtv:x:1000:100::/home/mythtv:/bin/bash > > MythTV Backend Server: 3 user accounts: > > mark:x:500:100:Mark:/home/mark:/bin/bash > evelyn:x:501:100:Evelyn:/home/evelyn:/bin/bash > matt:x:502:100:Matt:/home/matt:/bin/bash > > AMD64 machine: 2 user accounts: > > mark:x:1000:100::/home/mark:/bin/bash > matt:x:1001:100::/home/matt:/bin/bash > >
Since your NFS server only has one user account, it might be easiest to set all_squash,anonuid=1000,anongid=100 in your /etc/exports file. That would make it so that all UIDs & GIDs on the NFS clients will be treated as UID 1000 & GID 100 on the NFS server. Of course you would then want to chown everything on the NFS server to 1000:100. The other options are to maintain identical passwd & group files for all of the machines, or to use a NIS/NIS+ server to serve the passwd & group files from one machine to all the other machines, or to install rpc.ugidd or similar UID/GID mapping servers, that can do more complex UID/GID mapping than the UID/GID squashing NFS supports by itself. Good luck, Conway S. Smith -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - iD8DBQFEMwapGL3AU+cCPDERAionAJ9iZyl7xeREMWZGJDMovKbDxuNL7QCeNVZo /QaBmQQIUgQGlwNxB3YDTao= =N8K3 -----END PGP SIGNATURE----- -- gentoo-amd64@g.o mailing list