NFS different uig/gid on hosts

nfspermissions

Scenario: There are different mappings of UIDs and GIDs between hosts that would like to have NFS share.

Is there workaround without changing number mapping on hosts ?

Example:

Is there a way to "hardcode" mapping of username/groupname <-> uid/gid.
(for example on client side to map local uid 3333 top remote uid 2222 and local gid 999 to remote gid 888 ? )

I know about trick with mapping everyone to "nobody" or making chown uog+rw -R .... I am interested in solution where user UX in group GX creates files and directories as GX and UX and other GY, UY creates as GY UY… maybe some idmapd might be helpful ?

If there is no other option, how to securely change number UID and GID on all those hosts to make them consistent ?

Best Answer

Have a look at the map_static option in /etc/exports.

Or synchronize userids using NIS, LDAP, etc.

Related Question