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/auto.net 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 nfsmapid_domain=mydomain.com nfs" (seemingly must be two-level domain), which may be just in case augmented by "
echo mydomain.com >> /etc/defaultdomain" and “
domainname mydomain.com" if that is not yet set up
- On Linux – "
rpc.idmapd -f -vv" which displayed the domain used by the client (
LOCALDOMAINby default); modified in
/etc/idmapd.conf(see the General / Domain= string) and applied by "
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,