NFSv4 mounting wrong uid as 32767 or root

I am using libnss-mysql, pam_mount, NFSv4.The server is running FreeBSD 8.2 and the client is 9.0-RC3. I can login fine on the client with a user that is in the database on the server. The home folder is mounted fine with read/write access and the permissions are fine when checked on the server.

However, all files on the clients home directory were owned by root, but when I added the following to the clients rc.conf:
Code:
nfsuserd_enable="YES"
nfscbd_enable="YES"
the uid and gid changed to 32767 (which I know is the default nobody); but everything works as before.

The hostname of the client is set to client.blah.com and the server is blah.com

I assume that the NFSv4 is not properly mapping the uid of 5000. pam_mount shows

Code:
login: pam_mount(misc.c:38): set_myuid<pre>: (ruid/rgid=0/5000, e=0/5000)

so I assume it is trying to set the correct uid.

/etc/rc.conf of client
Code:
nfsuserd_enable="YES"
nfscbd_enable="YES"
rpcbind_enable="YES"
nfs_client_enable="YES"

/etc/rc.conf of server
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
mountd_enable="YES"
mountd_flags="-n"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
nfsuserd_enable=YES

Thanks
 
SOLVED... typically after days of trying to get this to work I fixed it within a few hours of posting this.

nfsuserd had not set the host name for my server. Might have added the line since the last reboot 18 days ago. I believe it was already running however, so would have thought it should have picked up the host name properly.

nfsuserd -domain blah.com -force fixed the problem.

Errata:
Code:
nfscbd_enable="YES"
was not needed on the client and I had stupidly put
Code:
nfsuserd="YES"
twice in
Code:
rc.conf
on the server :s.
 
Back
Top