You are not logged in.

#1 2015-05-18 12:32:02

Arakis
Member
From: Hamminkeln - Germany
Registered: 2013-08-11
Posts: 46
Website

NFSv4 UID mapping does not work

Hello,
i tried several hours to get nfsv4 uid mapping, but it does not work.

#/data          192.168.20.0/24(rw,sync)
/data           192.168.20.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/data/home      192.168.20.0/24(rw,nohide,insecure,no_subtree_check,async)

/etc/conf.d/nfs-*.conf files are not modified.
/etc/idmapd.conf does not exists anymore (was removed in the last nfs-utils package update)

rpcbind is running on both computers.

My mount command:

/bin/mount -n 192.168.20.70:/data/home /mnt/demeter -t nfs4 -v

When i access the folder from the server as the specific user, it works. But not from the client (same username, but other UID). When i list the upper level directory of the server from the client side, i see as username only the number (of course, because the UID does not exists on the client). I can only access folders, where the client's useID have permissions on the server (for example, when i try to access the server from the client as a user, wich userID on the server has permission to it).

What i'm doing wrong?

When searching the internet for nfs-problems / howto's, it seems, the arch configuration is a little bit different than on, for example, suse linux / debian linux. For example, it seems the option NEED_IDMAPD/NEED_GSSD seems to be obselet?

Greetings from Germany,
Sebastian

Last edited by Arakis (2015-05-18 12:54:26)

Offline

#2 2015-05-18 13:38:29

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: NFSv4 UID mapping does not work

Sounds like you simply need tot change the UID (or create a new user with that UID) on the client to match the user that has permissions on the shared dirs you like to access.

Offline

#3 2015-05-18 13:52:30

Arakis
Member
From: Hamminkeln - Germany
Registered: 2013-08-11
Posts: 46
Website

Re: NFSv4 UID mapping does not work

Yes, i thought about it, too. But i'm sure, this is not the goal of the idmapd functionality?

Offline

#4 2015-05-18 17:28:55

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: NFSv4 UID mapping does not work

I don't know but I'm not using idmapd anymore and someone correct me if I'm wrong but I don't think its necessary anymore with NFSv4.

I simply make sure that I use the same user account and group names and assign them the same UID and GID across all machines. Personally, i'd think that anything beyond that only confuses matters and if it can be avoided, it should be.

Offline

#5 2015-05-21 16:20:39

Painless
Member
Registered: 2006-02-06
Posts: 233

Re: NFSv4 UID mapping does not work

I too would recommend coordinating UID and GID.  That's what I do.  However, you could try the following (not sure how it will work now that /etc/idmapd.conf is gone) ...

Configure NFS4 module:

$ cat /sys/module/nfs/parameters/nfs4_disable_idmapping

If it is "Y", then:

# echo N > /sys/module/nfs/parameters/nfs4_disable_idmapping
# echo "options nfs nfs4_disable_idmapping=0" >> /etc/modprobe.d/nfs.conf

Clear the idmap keyring of all existing keys:

# nfsidmap -c

Restart ID-name mapping service:

# systemctl restart nfs-idmapd.service

I've not tested this, so good luck!  :-)

(edited to change "nfs4_disable_idmapping=1" to "nfs4_disable_idmapping=0")

Last edited by Painless (2015-05-21 16:24:53)

Offline

#6 2015-09-27 13:09:50

pieterv
Member
Registered: 2014-08-24
Posts: 28

Re: NFSv4 UID mapping does not work

I'm sorry to bring up this old post, but I'm having exactly the same problem, and there was no solution posted above.

Changing the UID and GID on the client with an existing install seems very unpractical to me.

Could somebody explain how the idmapping works with nfsv4? It seems like /etc/idmapd.conf has been removed. Also the idmapd information is removed from the wiki (https://wiki.archlinux.org/index.php?ti … did=363278)

Offline

#7 2015-10-11 21:00:08

Painless
Member
Registered: 2006-02-06
Posts: 233

Re: NFSv4 UID mapping does not work

Although there is no /etc/idmapd.conf file, there is still an idmapd.conf manpage, so maybe if you created one following the example in the manpage?

Good luck!  smile

Last edited by Painless (2015-10-11 21:02:05)

Offline

Board footer

Powered by FluxBB