Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a NFS4 export (from FreeBSD ZFS filesystem) with root_squash turned off (-maproot=root).

Until recently I've been mounting this drive without problems on several machines (mostly Ubuntu 12.04 server), but all of a sudden I've run into this strange problem:

On three OSes I've tried to setup (Mint 15, Ubuntu 13.04, Ubuntu 12.04 client) I do the ldap and nfs configuration and mount the drives and everything appears fine. I can see appropriate user and group names mapped from ids. But if I try to chown any of these files to any other user it always sets them to nobody:nobody.

Note, this does not happen on the older machines. I've even copied the exact configurations (/etc/idmapd.conf, /etc/ldap*, /etc/pam.d/*) from the older Ubuntu 12.04 machines to the new one and it still won't work! It also seems mostly restricted to chown. I can touch new files as any user and they have correct ownership. I have no idea what's going on.

The only clue I might have gotten is that the broken machines give this error in syslog (after increasing verbosity in idmapd):

Sep 10 16:58:48 cabernet rpc.idmapd[1009]: nfs4_name_to_uid: calling nsswitch->name_to_uid
Sep 10 16:58:48 cabernet rpc.idmapd[1009]: nss_getpwnam: name '5000@test.com' domain 'test.com': resulting localname '5000'
Sep 10 16:58:48 cabernet rpc.idmapd[1009]: nss_getpwnam: name '5000' not found in domain 'test.com'

While the working machines give:

Sep 10 17:03:44 node-2 rpc.idmapd[2906]: nfs4_uid_to_name: calling nsswitch->uid_to_name
Sep 10 17:03:44 node-2 rpc.idmapd[2906]: nfs4_uid_to_name: nsswitch->uid_to_name returned 0
Sep 10 17:03:44 node-2 rpc.idmapd[2906]: nfs4_uid_to_name: final return value is 0
Sep 10 17:03:44 node-2 rpc.idmapd[2906]: Client 18: (user) id "5000" -> name "myname@test.com"

So it looks like for some reason the broken machines are trying to use the id as the username.

Any advice?

share|improve this question

1 Answer 1

This was resolved via the following setting in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500778

/etc/idmapd.conf
[General]
Cache-Expiration = 10

You can visit http://permalink.gmane.org/gmane.linux.nfs/44754

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.