On a rhel 5 linux server (updated two months ago), two NAS are being mounted with NFS. On these shares, directories belong to two different users, both existing locally on the server.
One of them is correctly mapped by rpcidmapd, but the other share shows nobody:nobody as owner.
With verbose increased, the output log for the good mount (tomcat user):
Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_uid: calling nsswitch->name_to_uid Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nss_getpwnam: name '[email protected]' domain 'domain.com': resulting localname 'tomcat' Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_uid: nsswitch->name_to_uid returned 0 Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_uid: final return value is 0 Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: Client 0: (user) name "[email protected]" -> id "667" Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_gid: calling nsswitch->name_to_gid Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_gid: nsswitch->name_to_gid returned 0 Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: nfs4_name_to_gid: final return value is 0 Jun 1 15:39:19 server_hostname rpc.idmapd[31250]: Client 0: (group) name "[email protected]" -> id "667" And for the user not being correctly mapped, we've got a -22 exit code :
Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_uid: calling nsswitch->name_to_uid Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nss_getpwnam: name '10701' domain 'domain.com': resulting localname '(null)' Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nss_getpwnam: name '10701' does not map into domain 'domain.com' Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_uid: nsswitch->name_to_uid returned -22 Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_uid: final return value is -22 Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: Client 0: (user) name "10701" -> id "99" Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_gid: calling nsswitch->name_to_gid Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_gid: nsswitch->name_to_gid returned -22 Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: nfs4_name_to_gid: final return value is -22 Jun 1 15:56:31 server_hostname rpc.idmapd[7128]: Client 0: (group) name "672" -> id "99" The same mounts work fine on a rhel 7.4 server.
/etc/idmapd.conf is the same on both servers.
Both users and groups exist locally, getent passwd responds fine for both users.
User name is more than 8 characters long, tried to reduce it to 8 but without success.
Thought about the uid that is superior to 10000, but couldn't find a doc talking about that kind of limitations.
Running short of ideas now, I googled a lot but couldn't find the reason why it works on one user but not the other.
id 10701return the same user on all machines ?