NFS Services Administrator's Guide
Configuring and Administering NIS
Configuring and Administering an NIS Master Server
Chapter 4 165
To Add an Automounter Map to Your NIS Domain
1. Log in as root to the NIS master server.
2. In the /usr/sbin/ypinit script, use a text editor to add the
automounter map to the MASTER_MAPS list, as follows:
MASTER_MAPS=”group.bygid group.byname \
hosts.byaddr bosts.byname netgroup netgroup.byhost \
netgroup.byuser networks.byaddr networks.byname
passwd.byname \
passwd.byuid protocols.byname protocols.bynumber
rpc.bynumber \
services.byname vhe_list publickey.byname netid.byname
mail.byaddr \
mail.aliases auto.master rpc.byname servi.bynp
auto.mapname”
3. In the /var/yp/Makefile file, add the automounter map to the list
of maps that begins with all:, as follows:
all: passwd group hosts networks rpc services protocols \
netgroup aliases publickey netid vhe_list auto.master
\
auto.mapname
4. In the /var/yp/Makefile file, copy the statement that begins
$(YPDBDIR)/$(DOM)/auto_master.time to the space below it.
Change all occurrences of auto.master or auto_master to the name
of the map you are adding. Note that some occurrences must be
auto_mapname (the name of the ASCII file), and some must be
auto.mapname (the name of the NIS database).
$ (YPDBDIR)/$(DOM)/auto_master.time: $(DIR)/auto_master
@(sed -e ”s/ˆ[ | ]*//g” -e ”/ˆ#/d” -e s/#.*$$// <
$(DIR)/auto_master $(CHKPIPE)) |
$(MAKEDBM) - $(YPDBDIR) /$(DOM)/auto.master;
@touch $(YPDBDIR)/$(DOM)/auto_master.time;
@echo ”updated auto.master”;
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM)
auto.master; fi
@if [ ! $(NOPUSH) ]; then echo ”pushed
auto.master”; fi
$ (YPDBDIR)/$(DOM)/auto_mapmame.time: $(DIR)/auto_mapname
@(sed -e ”s/ˆ[ | ]*//g” -e ”/ˆ#/d” -e s/#.*$$// <
$(DIR)/auto_mapname $(CHKPIPE)) |
$(MAKEDBM) - $(YPDBDIR) /$(DOM)/auto.mapname;
@touch $(YPDBDIR)/$(DOM)/auto_mapname.time;
@echo ”updated auto.mapname”;