Network Information Service (NIS) B.11.31.04 Administrator's Guide

8. Set up a system as an NIS client:
# /usr/sbin/ypinit -c
9. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf directory:
# cp /etc/nsswitch.nis /etc/nsswitch.conf
CAUTION: Any customized files may be overwritten while copying the /etc/
nsswitch.nis file in the/etc/nsswitch.conf directory.
10. Run the NIS startup scripts:
# /sbin/init.d/nis.server start
# /sbin/init.d/nis.client start
The NIS master server now runs as both an NIS master server and an NIS client.
The NIS master server acts as an NIS client that can query other servers and provide
information to other hosts, as a master server.
NOTE: Configuring the master server as an NIS client, and running the startup
scripts for an NIS client, are optional tasks.
You must also configure the NIS slave servers as mentioned in “Enabling the NIS Slave
Server” (page 47).
For more information on configuring the NIS slave servers, see “Configuring and
Administering an NIS Slave Server” (page 45) and the following manpages: domainname
(1), ypinit (1M), and ypfiles (4).
For a sample NIS network configuration, see Appendix A (page 65).
Verifying the NIS Master Server Configuration
This section describes how to verify the NIS master server configuration.
To verify the NIS master server configuration, complete the following steps:
1. Log in to the NIS master server as a superuser. The NIS master server must also
be configured as NIS client.
2. View the list of maps in the NIS network:
# /usr/bin/ypwhich -m
The ypwhich -m command lists all the NIS maps available to the local client, and
displays the name of the master server that serves each map.
The ypwhich -m command also displays the custom NIS maps that you have added
on the NIS server.
In the following output, the local host is both the client and the master server:
auto.master mastername
netid.byname mastername
publickey.byname mastername
Verifying the NIS Master Server Configuration 31