Maintaining All of the automount Maps with NIS
In the first example, the /etc/auto.home and /etc/auto.direct were local files on the client that contained all of the automount map needed. The contents of the automount maps can also be maintained by NIS. The files would still exist on the client, but the contents would be different. For example, the /etc/auto.home file would contain the following:
+auto.home
And the /etc/auto.direct file would contain the following:
+auto.direct
This directs the automount daemon to consult the NIS maps auto.home and auto.direct when it reads the local files. The NIS server would contain two new NIS maps. The maps would be auto.home and auto.direct. They would be added to the /var/yp/Makefile in the same way that the auto.master NIS map was added. This makes them available for use by the NIS clients running the automount daemon.
This facility can also be used to define local portions of the automount maps and then refer to the NIS maps for the rest of the automount map. For example, the /etc/auto.home file could contain the following:
sandy -rw,hard,intr host10:/home/sandy
james -rw,hard,intr host2:/home/james
bill -rw,hard,intr host20:/home/bill
+auto.home
This automount map has three local entries and also contains the NIS map auto.home. This way, local definitions can be maintained while taking advantage of the NIS map for the /home/home directory. The entry bill in the local map would appear in the auto.home NIS map. The local map entry overrides the NIS map entry.