I have an LDAP-server running on one server and an NFS-server running on another server.

This arrangement seems to work providing I manually configure the LDAP users UID, GID home directory location etc. to match that of the NFS servers users UID, GID and home directory locations.

So when logging into the system with the ldap-client results in the user being able to access their respective remote NFS home directories.

I could write a script to mirror the user details on the LDAP-server with that of the NFS-server, no problem with that, but is there a more elegant way to do this? Is there an application that connects LDAP to NFS when they are located on separate systems? So for example, if users are created/deleted on the LDAP-server, this information is synced to the NFS-server.

I've searched around on the net looking for any documentation, tutorials etc. on how to run ldap and nfs on two separate servers, but so far have not found anything. The tutorials I have found show how to build LDAP and NFS on the SAME server.

Is this just one of those scenarios where systems administrators have to employ their own scripting solutions to get these two technologies to play nicely with each other?

  • Why can't you configure LDAP for NSS on the NFS server? i.e., the NSS configuration on the NFS server is the same as that of the other client systems. – muru Jan 5 '15 at 1:23
  • I can assure you that LDAP and NFS do not need to reside on the same host. If your nfs server is configured to be an ldap client via NSS, there should be no reason to create a duplicate local account for each user. You obviously still need to create the nfs home directory itself. Technically you might not even need that, but it depends on the details of your setup. – Andy Jan 5 '15 at 6:26
  • Thanks for the comments. I configured the LDAP-client on the NFS-server, and works a treat. However I have not figured out how to automatically create the home directories on the NFS-server to correspond with LDAP-users. I'm currently using /etc/skel to create the user directories when logging in as LDAP-users on the NFS-server. – lloowen Jan 5 '15 at 23:58
  • use autofs service to mount nfs directory automatically. For example, if you want to use nfs share as home directory for any ldap user, you need to configure autofs by editing the /etc/auto.master file. Let me know, if you need any assistance in doing it. – Sathish Jan 6 '15 at 1:27
  • you can see a brief answer for autofs in the link below, although it does not include what needs to be edited in those two files (/etc/auto.master and /etc/map-name). stackoverflow.com/questions/26187345/… – Sathish Jan 6 '15 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.