Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

21.4. Exposing Automount Maps to NIS Clients

If any automount maps are already defined, you must manually add them to the NIS configuration in IdM. This ensures the maps are exposed to NIS clients.
The NIS server is managed by a special plug-in entry in the IdM LDAP directory. Each NIS domain and map used by the NIS server is added as a sub-entry in this container. The NIS domain entry contains:
  • the name of the NIS domain
  • the name of the NIS map
  • information on how to find the directory entries to use as the NIS map's contents
  • information on which attributes to use as the NIS map's key and value
Most of these settings are the same for every map.

21.4.1. Adding an Automount Map

IdM stores the automount maps, grouped by the automount location, in the cn=automount branch of the IdM directory tree. You can add the NIS domain and maps using the LDAP protocol.
For example, to add an automount map named auto.example in the default location for the example.com domain:
[root@server ~]# ldapadd -h server.example.com -x -D "cn=Directory Manager" -W

dn: nis-domain=example.com+nis-map=auto.example,cn=NIS Server,cn=plugins,cn=config
objectClass: extensibleObject
nis-domain: example.com
nis-map: auto.example
nis-filter: (objectclass=automount)
nis-key-format: %{automountKey}
nis-value-format: %{automountInformation}
nis-base: automountmapname=auto.example,cn=default,cn=automount,dc=example,dc=com
Note
Set the nis-domain attribute to the name of your NIS domain.
The value set in the nis-base attribute must correspond:
  • To an existing automount map set using the ipa automountmap-* commands.
  • To an existing automount location set using the ipa automountlocation-* commands.
After you set the entry, you can verify the automount map:
[root@server ~]# ypcat -k -d example.com -h server.example.com auto.example