[CentOS] NFS mounted files owned by nobody

Fri Sep 20 15:46:48 UTC 2013
Larry Martell <larry.martell at gmail.com>

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