I have a FreeBSD server with several NFSv4 shares.
I have several linux clients (Ubuntu 12.04) that connect just fine and are able to use the NFS shares with 0 problems.
But I?ve run into idmap problems with some newer linux distros ( Mint 16, Ubuntu 14.04 ) where chown as root sets file ownership as nobody (the idmap operation fails). Just to be clear, chown as root is working fine from the Ubuntu 12.04 machines. This poses a problem since some desktop GUIs like to do this sort of thing when creating config files in user home directories, and so user GUI logins fail.
the logs have a lot of this:
Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
Apr 25 12:17:51 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname 'craigyk'
Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned 0
Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is 0
Apr 25 12:17:51 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "11115"
...
Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname '11115'
Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '11115' not found in domain 'nimgs.com'
Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned -2
Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is -2
Apr 25 12:18:03 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "65534"
I?ve tried almost everything I can think of.
The users are being served from Samba4.
The uid and gid are the same on all clients.
Why is idmap trying to lookup the user id by it?s user id?
On Apr 25, 2014, at 1:35 PM, Craig Yoshioka <[email protected]> wrote:
> I have a FreeBSD server with several NFSv4 shares.
>
> I have several linux clients (Ubuntu 12.04) that connect just fine and are able to use the NFS shares with 0 problems.
>
> But I?ve run into idmap problems with some newer linux distros ( Mint 16, Ubuntu 14.04 ) where chown as root sets file ownership as nobody (the idmap operation fails). Just to be clear, chown as root is working fine from the Ubuntu 12.04 machines. This poses a problem since some desktop GUIs like to do this sort of thing when creating config files in user home directories, and so user GUI logins fail.
>
> the logs have a lot of this:
>
> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
> Apr 25 12:17:51 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname 'craigyk'
> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned 0
> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is 0
> Apr 25 12:17:51 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "11115"
> ...
> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
> Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname '11115'
> Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '11115' not found in domain 'nimgs.com'
> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned -2
> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is -2
> Apr 25 12:18:03 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "65534"
>
> I?ve tried almost everything I can think of.
> The users are being served from Samba4.
> The uid and gid are the same on all clients.
>
> Why is idmap trying to lookup the user id by it?s user id??
HI Craig,
If the id-mapping is not working via user names, the client will try to see if user ids will
work. Since the client cannot send a numeric ID, it sends a string, in this case ?11115?.
Check to make sure that id mapping is properly configured on both the server and client.
Thanks,
Tom
It is as properly configured as I could figure out.
I set verbosity to 5 and it lists the correct domain on start-up and doesn?t report any explicit errors.
On the non-functioning systems:
(Fedora 20)
There is no explicit configuration for a Pipefs-Directory in idmapd.conf (but it looks like it is using /var/lib/nfs/rpc_pipefs). I figured I should leave this as the system default.
The version of libnfsidmap is 0.25
nfs-utils is 1.3.0
(Ubuntu 14.04 and Mint 16)
has exact same idmapd.conf as working 12.04 machines
Version of libnfsidmap is 0.25-5
nfs-common is 1.2.8-6ubuntu1
The working systems (also CentOS 5.8 but I haven?t checked the versions there):
(Ubuntu 12.04)
libnfsidmap 0.25-1ubuntu2
nfs-common 1.2.5-3ubuntu3.1
On Apr 25, 2014, at 4:01 PM, Tom Haynes <[email protected]> wrote:
>
> On Apr 25, 2014, at 1:35 PM, Craig Yoshioka <[email protected]> wrote:
>
>> I have a FreeBSD server with several NFSv4 shares.
>>
>> I have several linux clients (Ubuntu 12.04) that connect just fine and are able to use the NFS shares with 0 problems.
>>
>> But I?ve run into idmap problems with some newer linux distros ( Mint 16, Ubuntu 14.04 ) where chown as root sets file ownership as nobody (the idmap operation fails). Just to be clear, chown as root is working fine from the Ubuntu 12.04 machines. This poses a problem since some desktop GUIs like to do this sort of thing when creating config files in user home directories, and so user GUI logins fail.
>>
>> the logs have a lot of this:
>>
>> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
>> Apr 25 12:17:51 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname 'craigyk'
>> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned 0
>> Apr 25 12:17:51 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is 0
>> Apr 25 12:17:51 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "11115"
>> ...
>> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: calling nsswitch->name_to_uid
>> Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '[email protected]' domain 'nimgs.com': resulting localname '11115'
>> Apr 25 12:18:03 server rpc.idmapd[433]: nss_getpwnam: name '11115' not found in domain 'nimgs.com'
>> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: nsswitch->name_to_uid returned -2
>> Apr 25 12:18:03 server rpc.idmapd[433]: nfs4_name_to_uid: final return value is -2
>> Apr 25 12:18:03 server rpc.idmapd[433]: Client 0: (user) name "[email protected]" -> id "65534"
>>
>> I?ve tried almost everything I can think of.
>> The users are being served from Samba4.
>> The uid and gid are the same on all clients.
>>
>> Why is idmap trying to lookup the user id by it?s user id??
>
> HI Craig,
>
> If the id-mapping is not working via user names, the client will try to see if user ids will
> work. Since the client cannot send a numeric ID, it sends a string, in this case ?11115?.
>
> Check to make sure that id mapping is properly configured on both the server and client.
>
> Thanks,
> Tom--
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html