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

# /usr/sbin/ypinit -c
To bind the NIS client to a particular NIS server, construct a list of NIS servers.
Add the names of NIS servers in order of preference, one server name on each
line. When you have no more names to add, press Ctrl+d or the Enter key on an
empty line. The system displays the list of NIS servers:
next host to add: mammoth
next host to add: ocelot
next host to add:
The current list of yp servers looks like this:
mammoth
ocelot
Is this correct? [y/n: y] y
Type y or n and press the Enter key to confirm the output.
NOTE: Ensure that the /etc/hosts file has appropriate entries for the NIS
servers added in this step.
5. Start the NIS slave server:
#/sbin/init.d/nis.server start
6. Start the NIS client:
#/sbin/init.d/nis.client start
For more information on how to configure an NIS Slave Server, see “Enabling the NIS
Slave Server” (page 47)
Configuring an NIS Client
To configure an NIS client, complete the following steps:
1. Log in to a system on the NIS network.
2. Set the following variables in the NIS client system to modify the
/etc/rc.config.d/namesvrs file:
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=1
NIS_DOMAIN=marketing
It is not mandatory to set the NIS_MASTER_SERVER=1 variable to configure the
NIS master server. A system can be a pure NIS client, which does not mandate
this change.
3. Configure an NIS client:
#/usr/sbin/ypinit -c
To bind the NIS client to a particular NIS server, construct a list of NIS servers.
Add the names of NIS servers in order of preference, one server name on each
line. When you have no more names to add, press Ctrl+d or the Enter key on an
empty line. In this example, there are no hosts in the list. As a result, the default
host connects to all available servers.
68 Sample NIS Session