Skip to end of metadata
Go to start of metadata

I was installing a new Linux system today (Debian 7) for some development/testing that I wanted to be an NFS/AutoFS client for an existing OpenIndiana/illumos box with my user homes, which I intend to keep on OI due to ZFS and stuff.

However, when my userhome from OI was NFS-mounted onto Linux, I found that the files are owned by nobody:nogroup and not by my username. Explicit mounts with NFSv3 did not have the problem, but even fixing up /etc/default/autofs on the client to use MOUNT_NFS_DEFAULT_PROTOCOL=3 and adding vers=3 into its /etc/ did not help for automounts – NFSv4 was detected and used anyway.

I did not quickly google up any solutions, so I tracked the actual problem down to the identity mapping, and further specifically to the NFS Identity Domain, and the commands instrumental to this were:

  • On OI – "sharectl set -p nfs" (seemingly must be two-level domain), which may be just in case augmented by "echo >> /etc/defaultdomain " and “domainname" if that is not yet set up
  • On Linux – "rpc.idmapd -f -vv" which displayed the domain used by the client (LOCALDOMAIN by default); modified in /etc/idmapd.conf (see the General / Domain= string) and applied by "/etc/init.d/nfs-common restart"

Now the uid/gid mappings are displayed correctly (at least as long as the text names are defined on both the server and client, even if the numeric IDs differ).

Hope this helps,
//Jim Klimov