nfsv4/nfs mapid nobody domain @#%$@#%!@$

Wednesday, Jul 26. 2006  –  Category: OpenSolaris

i hit an annoying bug today, and resolved it thanks to some help from Rick. basically, i had two machines both running NFSv4. the server was setup to share/export a dir, and when I tried to mount it on the client, i’d see all the perms stomped down to be owned by nobody:nobody, ex:

app2# ls -la /mnt
total 10
drwxr-xr-x   2 nobody   nobody         3 Jul 26 09:35 .
drwxr-xr-x  23 root     root        1024 Jul 25 11:47 ..
-rw-r--r--   1 nobody   nobody         6 Jul 26 09:35 foo

very annoying.

looking through nfs(4) and nfsmapid(4) helped somewhat in that they pointed me to check the domainname. since my machines weren’t using NIS, i looked at the resolv.conf for DNS resolution.

my server had a string domain opensolaris.org in /etc/resolv.conf, but my client didn’t. so i added domain opensolaris.org to the client, but still no effect.

what i didn’t know was the presence of /var/run/nfs4_domain which is the NFSv4 domain that the machine has decided it belongs to. looking at that file clued me in that the domain it was picking up was actually listed in my search list in /etc/resolv.conf.

so what i needed to do was re-order search so that it had the same domainname listed in the server’s /etc/resolv.conf domain listed FIRST in the search list. alternatively, rick pointed out that if there was no search list, then it would have used my domain setting correctly.

so here is what my server /etc/resolv.conf ended up looking like:

domain foobar
nameserver x.x.x.x
nameserver x.x.x.x

and my client’s /etc/resolv.conf:

domain foobar
search foobar, helloworld, qwerty
nameserver x.x.x.x
nameserver x.x.x.x

and all is well in NFS world again….

One Response to “nfsv4/nfs mapid nobody domain @#%$@#%!@$”

  1. hendrik Says:

    /etc/default/nfs holds the NFSMAPID_DOMAIN variable right at the bottom ;)

Leave a Reply

Comments will be sent to the moderation queue.


Recent posts