Solaris LDAP autofs client configuration

Last time I wrote about autofs configuration on LDAP server, now it is time to configure autofs client in Solaris.
I assume that in DUAConfigProfile, objectClasses and attributes are already defined. You can check this with simply commands:

% ldaplist -l auto_master
dn: automountMapName=auto_master,ou=service,dc=mycompany,dc=com
        automountMapName: auto_master
        objectClass: automountMap
        objectClass: top

dn: cn=/home,automountMapName=auto_master,ou=service,dc=mycompany,dc=com
        automountInformation: auto_home -nosuid,nobrowse
        automountKey: /home
        automountMapName: auto_master
        objectClass: automount
        objectClass: top

% ldaplist -l auto_home
dn: automountMapName=auto_home,ou=service,dc=mycompany,dc=com
        automountMapName: auto_home
        objectClass: automountMap
        objectClass: top

dn: cn=*,automountMapName=auto_home,ou=service,dc=mycompany,dc=com
        automountKey: *
        objectClass: automount
        objectClass: top
        automountMapName: auto_home
        automountInformation: -rw,sync,quota,vers=4 NFSHOME:/app/nethomes/&

If you have similar output, you can proceed with configuration in system files. In principle, it would be suffice to have following entry in /etc/auto_master file:

+auto_master

and the rest of maps system should receive from LDAP server. But there are also other entries in Solaris 10 and 11 by default. There is no need to change them.

/net            -hosts          -nosuid,nobrowse
/home           auto_home       -nobrowse

There is also /etc/auto_home file with content:

+auto_home

The ‘+’ sing means that system should receive automounter configuration not only from files, but also from external sources like NIS/NIS+ and LDAP.
Now you should check /etc/nsswitch.conf and add there ldap source for automounter:

automount:  files ldap

Last thing is to make sure that ‘autofs’ service is working:

% svcs autofs
STATE          STIME    FMRI
online         Sep_21   svc:/system/filesystem/autofs:default

That’s it, automounter should work with LDAP and mounts users’ remote directories.
In case of any issues, when you need to debug automounter, please visit this web page:
Debugging automounter probles

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.