I have 2 centos boxes and I want to NFS mount a dir from one to the other. When I do that the files on the client all are owned by nobody.nobody. I verified that the user and group of the files on the server exist on both hosts and have the same uid and gid. I googled and found this: http://whacked.net/2006/07/26/nfsv4nfs-mapid-nobody-domain/ domainname on both machines returns (none). I edited /etc/resolve.conf on both and put 'domain foobar' as the first line in both. But then when I did a 'service network restart' the files were re-written and my changes were gone. On one system /etc/resolve.conf says "Generated by NetworkManager". On the other system it says "generated by /sbin/dhclient-script" (I didn't set these systems up.) I don't even know if this domain stuff is even the correct solution. I just want the NFS mounted dir to retain the real user ownership it has on the server. How can I achieve that? Thanks! -larry (Who's not a sysadmin, and doesn't even play one on TV
On Fri, Sep 20, 2013 at 10:46 AM, Larry Martell <larry.martell at gmail.com> wrote:> I have 2 centos boxes and I want to NFS mount a dir from one to the > other. When I do that the files on the client all are owned by > nobody.nobody. I verified that the user and group of the files on the > server exist on both hosts and have the same uid and gid. I googled > and found this: > > http://whacked.net/2006/07/26/nfsv4nfs-mapid-nobody-domain/ > > domainname on both machines returns (none). I edited /etc/resolve.conf > on both and put 'domain foobar' as the first line in both. But then > when I did a 'service network restart' the files were re-written and > my changes were gone. >Edit /etc/idmapd.conf and set Domain to the same thing on both, and do a 'service rpcidmapd reload'. And note that it still won't map names to different uids the way you expect unless you have kerberos or some network authentication set up, but if the uids are the same it should work and at least quit mapping them to nobody. -- Les Mikesell lesmikesell at gmail.com
On 9/20/2013 8:46 AM, Larry Martell wrote:> On one system /etc/resolve.conf says "Generated by NetworkManager". On > the other system it says "generated by /sbin/dhclient-script" (I > didn't set these systems up.)you probably should set the domain on your DHCP servers, thats a 'zone option'... but I think NFSv4 on linux uses /etc/idmapd.conf, the 'Domain =' parameter thats probably commented out near the top to override this. -- john r pierce 37N 122W somewhere on the middle of the left coast