NFS Services Administrator's Guide

Configuring and Administering NIS
Configuring and Administering an NIS Master Server
Chapter 4 159
NOTE To configure the local host as an NFS client and enable the client to
bind to a specific server, you must use the -c option of the ypinit
command. Invoking the -c option of the ypinit command prompts
the user to provide a list of servers in the order of preference, to
which the client must bind to. To use the -c option of the ypinit
command specified in the following step, you must install patch
PHNE_24910 or later. If you do not want to use the -c option,
proceed to Step 9.
8. Issue the following command to set up the system as a client:
/usr/sbin/ypinit -c
The ypinit script will prompt you for the names of the servers the
client can bind to.
9. Copy the /etc/nsswitch.nis file to /etc/nsswitch.conf, as
follows:
cp /etc/nsswitch.nis /etc/nsswitch.conf
10. Issue the following commands to run the NIS startup scripts:
/sbin/init.d/nis.server start
/sbin/init.d/nis.client start
The master server is now running as both an NIS master server and an
NIS client. Next, you must configure the slave servers you listed when
you ran the ypinit script. See “Configuring and Administering an NIS
Slave Server” on page 173.
For more information, see the following man pages: domainname(1),
ypinit(1M), and ypfiles(4).
To Verify Your NIS Master Server Configuration
Log into the master server and issue the following command:
/usr/bin/ypwhich -m
The ypwhich -m command lists all the NIS maps available to the local
client and gives the name of the master server that serves each map. In
this case, the local host is both the client and the master server. Your
display should look something like this, where mastername is the name
of your local host: