Linux – UID mapping in NFS

linuxnfsusers

Can anyone let me know how can I map a UID 162 to UID 107.
Files in my nfs are getting created with ownership 162:162 but on my local machine the userid for that specific user is 107 so I need to map it.

/etc/idmapd.conf

[Mapping]
Nobody-User = nobody
Nobody-Group = nobody

Can anyone let me know how to map it in idmap.conf.

Best Answer

nfs4 does not use uid numbers but usernames. You can add to your /etc/idmapd.conf

[Translation]
   Method=static
[Static]
   fred@remote = localfred

where fred is the username on the remote, and localfred is the local username.

Related Question