Search code examples
ldapnis

How to create automount map with LDAP


I need to create an automount map for a particular location in our environment with the ldap as we have "ldap+nis" integrated setup. I don not know much about the ldap+NIS hence require your help to understand it... The ldif file format which i got it from the env example is as follows..

dn: cn=/depot,nisMapName=auto_master_lnx_noida,ou=automount,ou=Default,ou=noida,
 ou=services,o=example.com
nisMapName: auto_master
objectClass: nisObject
objectClass: top
cn: /depot
nisMapEntry: ldap:automountMapName=auto_depot,ou=automount,ou=Default,ou=noida,o
 u=services,o=example.com

Similarly i need create the following auto.master , we are using sun ldap

/lan/ttv auto_lan_ttv

Solution

  • Normally, they would look something like:

    dn:automountMapName=auto_direct,dc=nishpind
    objectClass: top
    objectClass: automountMap
    automountMapName: auto_direct
    
    
    dn:automountKey=/mnt_direct/test1,automountMapname=auto_direct, dc=nishpind
    objectClass: top
    objectClass: automount
    automountInformation:hostA:/tmp 
    automountKey: /mnt_direct/test1
    
    dn:automountKey=/mnt_direct/test2,automountMapname=auto_direct, dc=nishpind
    objectClass: top
    objectClass: automount
    automountInformation:hostB:/tmp
    automountKey:/mnt_direct/test2
    

    Although somewhat dated, there is some information at: https://ldapwiki.com/wiki/LDAPAutomountInformation

    -jim