NFS make simple UID mapping work. Idmapd, Debian [Solved]

Archived topics about LMDE 1 and LMDE 2
Locked
RogerPf

NFS make simple UID mapping work. Idmapd, Debian [Solved]

Post by RogerPf »

Problem – you have two machines, each a clone (or near clone) of the other. I.E. systems that have the same users and UserIds then all you want to do is to have nfs automaticaly do a simple mapping. U1234 = U1234 G1234 = G1234 etc

If you follow all the "tutorials" and forum posts on the web, they leave you to believe that no_root_squash will solve all your problems - as used in this line from my 'server' side exports file.

Code: Select all

/share/z_nfs_test   *(rw,sync,subtree_check,sec=sys,no_root_squash)
and this mount on the 'client'

Code: Select all

mount -t nfs -O sec=sys,no_root_squash 192.168.0.66:/share/z_nfs_test  /mnt/my__z_nfs_test
Yes it will map ‘root’ from one side to the other but for us it does not map any other of the User IDs. The reason is that we also need these two lines added to /etc/idmapd.conf

Code: Select all

[Translation]
Method = nswitch 
giving a final etc/idmapd.conf of -

Code: Select all

[General]
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
# set your own domain here, if id differs from FQDN minus hostname
# Domain = localdomain
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain

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

[Translation]
Method = nswitch
This is from LDME newly moved to update 6.

Apparently a lot of other distros have these lines in their default idmapd.conf, hence, for them it “just works”.

Perhaps we could also have these added to our LMDE distro. Or if not a comment saying what adding them would do.

--
Roger
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
saejin

Re: NFS make simple UID mapping work. Idmapd, Debian [Solved

Post by saejin »

Roger,
Why do you type
Verbosity = 0
on two lines?
Why does the pipefs-Directory = /run/lib/nfs/rpc_pipefs rather than /run/rpc_pipefs as the distro had it?

How on earth did you find this stuff?
Locked

Return to “LMDE Archive”