Searching for Automount Maps and Entries

You can use the Server Suite OpenLDAP service and ldapsearch command to find automount maps and automount map entries that you have stored in Active Directory. The following examples illustrate how to write filters to retrieve automount information. These examples assume you have added the following automount maps and map entries to Active Directory using Access Manager:

  • The auto.home map has the map entries test1 and test2.

  • The autotest map has the map entries test10 and test11.

To retrieve both maps, you might run a command with a filter like this:

ldapsearch -x -h localhost -b "DC=acme,DC=test" "(objectClass=automountMap)"
-D "cn=amy.adams,cn=users,dc=acme,dc=org" -w 1234abcepassword

The command returns attribute information for each map similar to this:

dn: cn=auto.home,cn=NisMaps,cn=global,cn=Zones,dc=acme,dc=test
automountMapName: auto.home
ou: auto.home
cn: auto.home
displayName: $CimsAutomountMapVersion1
objectClass: top
objectClass: automountMap
uSNChanged: 20046

To retrieve information for a specific map, you might run a command with a filter like this:

ldapsearch -x -h localhost -b "DC=acme,DC=test"
"(&(objectClass=automountMap)(automountMapName=auto.home))"
-D "cn=amy.adams,cn=users,dc=acme,dc=org" -w 1234abcepassword

To retrieve all map entries from both maps, you might run a command with a filter like this:

ldapsearch -x -h localhost -b "DC=acme,DC=test" "(objectClass=automount)"
-D "cn=amy.adams,cn=users,dc=acme,dc=org" -w 1234abcepassword

To retrieve information for a specific map entry, you might run a command with a filter like this:

ldapsearch -x -h localhost -b "cn=auto.home,DC=acme,DC=test"
"(&(objectClass=automount)(automountKey=test1))"
-D "cn=amy.adams,cn=users,dc=acme,dc=org" -w 1234abcepassword

For information about adding and managing NIS maps to Active Directory, see the Network Information Service Administrator’s Guide.