NFSv4, how to map uid and gid with LDAP?

I've configured a NFSv4 server and a NFSv4 client, this works perfectly as long as I play with the same uid and gid on both systems in their passwd file. But how can I get it to work with LDAP?
 
What is the contents of your /etc/exports? And what have you enabled in /etc/rc.conf regarding NFS and RPC?
 
Client:
/etc/rc.conf
Code:
nfs_client_enable="YES"
nfscbd_enable="YES"
nfsuserd_enable="YES"
nfsuserd_flags="-domain example.com"
rpcbind_enable="YES"           
mountd_flags="-r -p 736"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

Server:
/etc/exports
Code:
V4: / 
/tank/home -maproot=0 -network 192.168.10.210 -mask 255.255.255.0
/tank/home/ole -maproot=0 -network 192.168.10.210 -mask 255.255.255.0
/tank/home/olav -maproot=0 -network 192.168.10.210 -mask 255.255.255.0
/tank/home/hakon -maproot=0 -network 192.168.10.210 -mask 255.255.255.0

/etc/rc.conf
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
nfsuserd_flags="-domain example.com"
rpcbind_enable="YES"
mountd_flags="-r -p 736"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

I've also configured /etc/hosts.allow
Code:
rpcbind : 192.168.10.0/255.255.255.0 : allow
rpcbind : ALL : deny
 
I think I'm on to something here. I've added ldap to the NFS server and configured /etc/pam.d/system

The user gets correctly mapped on the server, but when mounted on the client (which already has a working ldap setup) I get uid and gid 32767.
 
Back
Top