Network Information Service (NIS) B.11.31.02 Administrator's Guide
3. Enter the following command to 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,
run the following command at the command prompt to specify the slave server in the
marketing domain:
# vi /var/yp/<domain_name>/tempfile
In the vi editor window, enter the host name of the slave server. For example:
ocelot
5. Enter the following command to regenerate the ypservers map from the ASCII file:
/usr/sbin/makedbm tempfile ypservers
6. Log in to the new slave server as 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 35).
For more information, see makedbm (1M) and ypfiles (4).
Removing a Slave Server from the NIS Domain
WARNING! On completing the procedure below, the NIS clients bound to the slave server
being removed may 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 superuser.
2. Enter the following commands to 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. Enter the following command to regenerate the ypservers map from the ASCII file:
/usr/sbin/makedbm tempfile ypservers
5. Log in to the slave server as 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. Enter the following command to disable the NIS server capability:
/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
For more information, see makedbm (1M) ypfiles (4).
Enabling the DNS Forwarding Mode
The DNS forwarding mode enables the NIS server to contact DNS server to service hosts or
ipnodes requests. NIS can automatically fetch the information from DNS and this operation is
Removing a Slave Server from the NIS Domain 31