View previous topic :: View next topic |
Author |
Message |
jody l33t
Joined: 16 Oct 2007 Posts: 668 Location: Switzerland
|
Posted: Thu Apr 07, 2016 11:39 am Post subject: [SOLVED] NFS4, NFS3 and user IDs |
|
|
Hi
I have a server using NFS 3 and a workstation (using NFS 4) mounting some directories from the server.
When i look at users and groups of the mounted directories they are all '4294967294' wich apparently means "nobody".
However i would prefer to see the user names and group names (as defined on the server).
BTW - we have made sure that any user's ID is the same on all computers.
Some posts i read mentioned that nfsidmap does some sort of UID mapping, but it seems that there is only 'net-libs/libnfsidmap', so i emerged that.
My net-fs/nfs-utils seems to have been built with the USE flag 'nfsidmap', so it should "Enable support for newer nfsidmap helper", shouldn't it?
Can anybody tell me what steps i have to take to see user names and group names instead of '4294967294'?
Thank You
Last edited by jody on Thu Apr 07, 2016 3:53 pm; edited 1 time in total |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Thu Apr 07, 2016 12:40 pm Post subject: |
|
|
ID mapping is just a conversion table between a local user and a remote user. That means the usernames you want to be displayed must exist on the server _and_ on the client, no matter what UID they have. In this case, you may need to enable NFS ID mapping in the kernel (on the client and on the server), and to configure /etc/idmapd.conf on the client.
If the UID are identical on both sides, you need nothing, that should just work.
If you want to display a username that exists on the server but not on the client, you need a NIS server.
Last, but not least, don't mix NFSv3 and NFSv4, that will not work, the protocols are really too different. |
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 668 Location: Switzerland
|
Posted: Thu Apr 07, 2016 2:25 pm Post subject: |
|
|
Hi
Thanks for your reply
I opened menuconfig but was unable to find an entry which looked like settings NFS ID mapping.
Do you know where i could find this?for"IDMAP" or ID MAP? |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Thu Apr 07, 2016 2:36 pm Post subject: |
|
|
I don't think there is a kernel configure option, but a /sys/module/... file.
Maybe this will help you. |
|
Back to top |
|
|
jody l33t
Joined: 16 Oct 2007 Posts: 668 Location: Switzerland
|
Posted: Thu Apr 07, 2016 3:53 pm Post subject: |
|
|
I just found out: when i add the option 'nfsvers=3' in /etc/fstab of the client, and then mount the network drive, i can see the names (at least thse which exist on the client side).
The problem is: with this option set, the network drives are not mounted during boot.
There is an error message like this: Code: | rpc.statd is not running but is required for remote locking.
Either use '-o nolock' to keep locks local or start statd.
an incorrect mount option was specified. |
But by adding rpc.statd to sysinit: Code: | $ rc-update add rpc.statd sysinit | i made sure that rpc.statd is started before nfs.
Now network drives are mounted during boot, and names (or userids) are display[/code]ed instead of '4294967294' |
|
Back to top |
|
|
|