You are not logged in.
Pages: 1
Topic closed
Hello,
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:
/home/userA 192.168.178.1/24(rw,async,no_subtree_check,no_root_squash,nohide)
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.
Offline
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.
Offline
Hi,
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
/home/userA 192.168.178.1/24(rw,fsid=0,no_subtree_check,no_root_squash)
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?
Offline
Necrobump.
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
Offline
Necrobump.
Please don't do that. Open a new topic and link back to this one if you feel it is still relevant.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed