Network Information Service (NIS) B.11.31.04 Administrator's Guide
3. Modify the /var/yp/Makefile:
• Remove the auto.tools map from the list of maps that begin with all:.
• Remove the auto_tools.time section. For example:
$ (YPDBDIR)/$(DOM)/auto_tools.time: $(DIR)/auto_tools
@(sed -e ”s/^[ | ]*//g” -e ”/^#/d” -e s/#.*$$// \
$(DIR)/auto_tools $(CHKPIPE)) |\
$(MAKEDBM) - $(YPDBDIR) /$(DOM)/auto.tools;\
@touch $(YPDBDIR)/$(DOM)/auto_tools.time;\
@echo ”updated auto.tools”;\
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) auto.tools; fi\
@if [ ! $(NOPUSH) ]; then echo ”pushed auto.tools”; fi
• Remove the section that begins with auto.tools. For example:
auto.tools:
@if [ $(NOPUSH) ]; then $(MAKE) $(MFLAGS) -k \
$(YPDBDIR)/$(DOM)/auto_tools.time DOM=$(DOM) DIR=$(DIR); \
else $(MAKE) $(MFLAGS) -k $(YPDBDIR)/$(DOM)/auto_tools.time \
DOM=$(DOM) DIR=$(DIR) NOPUSH=$(NOPUSH);fi
4. On the master and on each of the slave servers, remove the map files, mapname.dir
and mapname.pag, from the directory where the maps are stored. This directory is
called /var/yp/domainname, where domainname is the name of the NIS domain.
For example, if you are removing the auto.tools map from the Finance domain, you
must enter the following commands on the master server and on each of the slave
servers:
# cd /var/yp/Finance
# rm auto.tools.dir auto.tools.pag
For more information, see ypinit(1M), make(1), ypmake(1M), and ypfiles(4).
Adding a Slave Server to the NIS Domain
To add an NIS slave server to the NIS domain, you must add the name of the NIS slave
server in the ypservers map. To add the name of the slave server, complete the following
steps:
1. Log in to the NIS master server as a superuser.
2. Enter the following command:
# cd /var/yp/domainname
where:
domainname is the name of the domain to which the slave server is added. For
example, for a master server in the marketing domain, the
domainname will be marketing.
3. Create an editable ASCII text file from the ypservers map:
# /usr/sbin/makedbm -u ypservers > tempfile
4. Add the name of the new server to the ASCII tempfile file, using a text editor.
For example, to specify a slave server in the marketing domain, you must add the
name of the slave server to the ASCII tempfile file in the marketing domain:
38 Configuring and Administering an NIS Master Server