[rhelv6-list] NFSv4 not translation UID, GID between freebsd server and rhel63 client

Jason Keltz jas at cse.yorku.ca
Tue Oct 30 20:14:09 UTC 2012


I have a  FreeBSD 9.1RC2 server exporting an NFS v4 filesystem (a home 
directory actually) that I want to mount under my rhel63 nfs client.
nfsuserd is running on FreeBSD (idmapd equivalent for Linux), idmapd is 
running on rhel63 and both are configured with the same domain and 
translation of nfsswitch.
Both systems share the same users and groups in /etc/passwd and 
/etc/group.   Sure, there are some additional users and groups on either 
system, but the real users I care about are in both with the same uid 
and gid.  There are no duplicate entries.

On Rhel6.3, I can mount the nfs v4 share from the FreeBSD server, and it 
shows up as vers=4, but all the files appear as nobody:nobody, even 
though they are all owned by user jast7 and group "zfstest" on the 
FreeBSD nfs server.
Aha! That's a simple ID mapping problem, you say?  Well, it's probably 
an ID mapping problem, but not sure that it's so simple....  The 
exported directory is owned by jast7, group zfstest.  If the exported 
directory is set to mode 700, and user jast7 on the rhel63 client tries 
to write to the directory, he can write, and yet, if another user "jas" 
on the rhel63 client tries to write to the directory, he cannot...   Hmmm???
So I continue ... when jast7 writes on the rhel63 client, the files show 
up as "nobody:nobody" on the rhel63 client, but under freebsd shows up 
as "jast7:zfstest" as should be the case.
On the other hand, if I make the exported directory mode 707, then user 
"jas" on the rhel63 system can indeed write a file.   This file shows up 
as "jas:nobody" on the rhel63 system, and shows up as "jas:zfstest" on 
the FreeBSD server.

 From FreeBSD passwd:

jast7:x:14975:1001:jas test 7:/cs/home/jast7:/bin/false
jas:x:1004:1000:Jason:/cs/home/jas:/cs/local/bin/tcsh

 From FreeBSD group:

zfstest:*:1001:
tech:*:1000:tdb

 From Linux passwd:

jast7:x:14975:1001:jas test 7:/cs/home/jast7:/bin/false
jas:x:1004:1000:Jason:/cs/home/jas:/cs/local/bin/tcsh

 From Linux group:

zfstest:*:1001:
tech:*:1000:

Just to be sure, I have tried unmounting, "service rpcidmapd restart", 
then mounting the share, and no difference..

Any ideas?

Jason.




More information about the rhelv6-list mailing list