I'm trying to connect two machines using NFSv4.
desktopA (Server): userA (uid=1000), userB (uid=1001)
desktopB (Client): userA (uid=1001), userB (uid=1000)
Please note the crossed UIDs.
On server i export:
My server idmapd.conf:
[General] Verbosity = 1 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = my.lan [Mapping] Nobody-User = nobody Nobody-Group = nobody [Translation] Method = nsswitch,static [Static] userA@desktopB.my.lan = userB
and the client idmapd.conf (idmap and nfsd are running there):
[General] Verbosity = 1 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = my.lan [Mapping] Nobody-User = nobody Nobody-Group = nobody [Translation] Method = nsswitch,static [Static] userB@desktopA.my.lan = userA
On the client i mount with
root@desktopB> mount -t nfs4 desktopA:/home/userA /mnt/nfs
But i still get problems with the crossed UIDs:
root@desktopB> ls /mnt/nfs ... userB users ...
Can somebody help me? I don't want to change the UIDs on server and clients just to be equal.
I never tried this myself in practice, but from what I know about the matter maybe check following:
a) the [Static] section on the client should be pointless, as that's a server-side only feature, AFAIK.
b) try mounting with -o sec=krb5, as static mapping works only for GSS authenticated users, and the default is AUTH_SYS, again: AFAIK.
Thank you for your reply.
I removed the static part on both machines, and i added the fsid=0 option in /etc/exports.
[General] Verbosity = 1 Pipefs-Directory = /var/lib/nfs/rpc_pipefs Domain = my.lan [Mapping] Nobody-User = nobody Nobody-Group = nobody
According to other posts, just running idmapd on server and client (which already is) with the default config (as above) should be sufficient. But the problem still resides. I've checked /var/log/messages.log, but there are no entries indicating any user mapping. According to this example log http://permalink.gmane.org/gmane.linux.nfs/44754 there should be at least some lines with 'nfs4_uid_to_name' in it. However i got only some entries with 'new client' and 'stale client'. It seems that the nfs or idmap daemon doesn't even try to do any user mappings. I also checked the hosts.allow file.
The sec=krb5 option implies the usage of kerebros which i don't use. I tried sec=sys but this also didn't help.
If the whole chain (rpcbind, nfsd, mountd, idmapd etc.) only could provide some more information. I've increased every verbosity i could but i'm still clueless what's going on. Or not.
Could anybody who's using NFSv4 with working idmap post his config?
I have the same problem, but do not get any error messages.
Strange thing is, idmapd won't start when I set Verbosity to any other than 0.
[General] Domain = local [Mapping] Nobody-User = nobody Nobody-Group = nobody [Translation] Method = nsswitch
Please don't do that. Open a new topic and link back to this one if you feel it is still relevant.
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD