188.8.131.52. Adapting Autofs v4 Maps To Autofs v5
Autofs version 4 introduced the notion of a multi-map entry in the master map. A multi-map entry is of the form:
<mount-point> <maptype1> <mapname1> <options1> -- <maptype2> <mapname2> <options2> -- ...
/home file /etc/auto.home -- nis auto.home
automount: files nis
<entries for the home directory> +auto.home
/etc/auto.homeand the nis
auto.homemap are combined.
In autofs version 4, it is possible to merge the contents of master maps from each source, such as files, nis, hesiod, and LDAP. The version 4 automounter looks for a master map for each of the sources listed in
/etc/nsswitch.conf. The map is read if it exists and its contents are merged into one large
nsswitch.confis consulted. If it is desirable to merge the contents of multiple master maps, included maps can be used. Consider the following example:
/etc/nsswitch.conf: automount: files nis
/etc/auto.master: /home /etc/auto.home +auto.master
auto.masterand the NIS-based
auto.master. However, because included map entries are only allowed in file maps, there is no way to include both an NIS
auto.masterand an LDAP
auto.master.ldapwe could also add
"+auto.master.ldap"to the file based master map and provided that "
ldap" is listed as a source in our nsswitch configuration it would also be included.