Network Information Service (NIS) B.11.31.04 Administrator's Guide
# vi /var/yp/marketing/tempfile
In the vi editor window, enter the host name of the slave server. For example:
ocelot
5. Regenerate the ypservers map from the ASCII file:
# /usr/sbin/makedbm tempfile ypservers
6. Log in to the new slave server as a superuser, and configure it as an NIS slave
server.
For more information on configuring an NIS slave server, see “Configuring and
Administering an NIS Slave Server” (page 45).
For more information, see makedbm(1M) and ypfiles(4).
Removing a Slave Server from the NIS Domain
IMPORTANT: Removing a slave server may cause the NIS clients, connected to the
slave servers, to hang for some time.
To remove an NIS slave server from the NIS domain, complete the following steps:
1. Log in to the NIS master server as a superuser.
2. Create an editable ASCII text file from the ypservers map:
# cd /var/yp/domainname
# /usr/sbin/makedbm -u ypservers > tempfile
3. Remove the name of the slave server from the ASCII tempfile file, using a text
editor.
4. Regenerate the ypservers map from the ASCII file:
# /usr/sbin/makedbm tempfile ypservers
5. Log in to the slave server as a superuser.
6. Remove all the map files from the map directory, and remove the map directory.
The map directory is called /var/yp/domainname, where domainname is the
name of the NIS domain.
For example, if you are removing a slave server from the Marketing domain, you
must enter the following commands:
# cd /var/yp
# rm -rf Marketing
7. Disable the NIS server:
# /sbin/init.d/nis.server stop
8. If the slave server is not a slave server in any other NIS domain, use a text editor
to set the NIS_SLAVE_SERVER variable to 0 in the
/etc/rc.config.d/namesvrs file, as follows:
NIS_SLAVE_SERVER=0
Removing a Slave Server from the NIS Domain 39