9.4.3. Overriding or Augmenting Site Configuration Files
9.4.3. Overriding or Augmenting Site Configuration Files It can be useful to override site defaults for a specific mount point on a client system. For example, consider the following conditions: Automounter maps are stored in NIS and the /etc/nsswitch.conf file has the following directive: The auto.master file contains the following The NIS auto.master map file contains the following: The NIS auto.home map contains the following: The file map /etc/auto.home does not exist. Given these conditions, let's assume that the client system needs to override the NIS map auto.home and mount home directories from a different server. In this case, the client will need to use the following /etc/auto.master map: The /etc/auto.home map contains the entry: Because the automounter only processes the first occurrence of a mount point, /home will contain the contents of /etc/auto.home instead of the NIS auto.home map. Alternatively, to augment the site-wide auto.home map with just a few entries, create an /etc/auto.home file map, and in it put the new entries. At the end, include the NIS auto.home map. Then the /etc/auto.home file map will look similar to: Given the NIS auto.home map listed above, ls /home would now output: This last example works as expected because autofs does not include the contents of a file map of the same name as the one it is reading. As such, autofs moves on to the map source in the nsswitch configuration.
automount: files nis +auto.master /home auto.home beth fileserver.example.com:/export/home/beth joe fileserver.example.com:/export/home/joe * fileserver.example.com:/export/home/& /home \u00ad/etc/auto.home +auto.master * labserver.example.com:/export/home/& mydir someserver:/export/mydir +auto.home beth joe mydir