Once you’ve added something to the LDAP server, here is how to add it to the NFS server
Start by installing the modules.
apt-get install nfs-common
edit /etc/default/nfs-common like so:
NEED_IDMAPD=yes
NEED_GSSD=no
NEED_GSSD=no
add these three lines to /etc/idmapd.conf
[Translation]
Method = nsswitch
Restart idmapd so that it is uptodate
service idmapd restart
Make a directory, eg. /home2, for the new data, and add a line like this to /etc/fstab
192.168.0.40:/home /home2 nfs4 _netdev,auto 0 0
mount everything:
mount -a
If the groups or usernames appear as nobody.nobody you need to invalidate the group and usernames in the name caching service daemon
nscd -i group
nscd -i passwd
and then update them again:
nss_updatedb ldap