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

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

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

Postby RogerPf on Sun Mar 17, 2013 6:11 pm

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
RogerPf
Level 1
Level 1
 
Posts: 1
Joined: Mon May 28, 2012 3:24 am

Linux Mint is funded by ads and donations.
 

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

Postby saejin on Mon Apr 15, 2013 7:54 pm

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?
saejin
Level 1
Level 1
 
Posts: 1
Joined: Mon Apr 15, 2013 7:22 pm


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 3 guests