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

common practice to have both NIS client and NIS server on the same system, it is not
mandatory. You can maintain them on different systems.
6. Enter the following command to create the NIS maps for the domain:
/usr/sbin/ypinit -m
The ypinit script prompts for the names of the slave servers.
7. Enter the names of the slave servers.
8. Run the following command to set up the system as a client:
/usr/sbin/ypinit -c
9. Copy the /etc/nsswitch.nis file to /etc/nsswitch.conf, as follows:
cp /etc/nsswitch.nis /etc/nsswitch.conf
10. Enter the following commands to run the NIS startup scripts:
/sbin/init.d/nis.server start
/sbin/init.d/nis.client start
The master server now runs as both an NIS master server and an NIS client. This enables the
master server to query other servers as a client, and provide information to other hosts as a
server. You must also configure the slave servers listed by the ypinit script.
For more information on configuring the slave servers, see “Configuring and Administering an
NIS Slave Server” (page 35) and the following manpages: domainname (1), ypinit (1M), and ypfiles
(4).
For a representation of the NIS network configuration, see Appendix A (page 49).
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 master server as superuser.
2. Enter the following command to obtain 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. In the following output, the local host is both
the client and the master server:
The following output is displayed:
auto.master mastername
netid.byname mastername
publickey.byname mastername
mail.byaddr mastername
mail.aliases mastername
netgroup.byhost mastername
netgroup.byuser mastername
netgroup mastername
protocols.byname mastername
protocols.bynumber mastername
servi.bynp mastername
services.byname mastername
rpc.byname mastername
rpc.bynumber mastername
networks.byaddr mastername
Verifying the NIS Master Server Configuration 25