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

A Sample NIS Session
This appendix describes the procedure to configure a sample NIS network.
This appendix addresses the following topics:
“Configuring an NIS Master Server” (page 65)
“Configuring an NIS Slave Server” (page 67)
“Configuring an NIS Client” (page 68)
Configuring an NIS Master Server
To configure an NIS master server, complete the following steps:
1. Log in to a system on the NIS network.
2. Modify the /etc/rc.config.d/namesvrs file:
NIS_MASTER_SERVER=1
NIS_SLAVE_SERVER=0
NIS_CLIENT=1
NIS_DOMAIN=marketing
It is not mandatory to set the NIS_CLIENT=1 variable in the /etc/rc.config.d/
namesvrs file to configure the NIS master server.
3. Setup the local host as the master server for all maps. Start the ypinit procedure:
#/usr/sbin/ypinit -m
Do you want this procedure to quit on non-fatal errors? [y/n: n] n
Remember to correct anything which fails. If you do not, some part of the system (perhaps NIS
itself) may not work.
The ypinit -m command creates a directory, /var/yp/<domainname>, to store
the map information for the new domain. For example, the /var/yp/marketing
directory contains the map information for the marketing domain. If a directory
with the same domain name exists, you must either delete the existing directory
or select a different name for the domain. If you choose to delete the directory,
you may take a backup of this directory before proceeding further. However,
taking a backup of the /var/yp/marketing directory is optional.
Can the existing directory "/var/yp/marketing" and its contents be destroyed? [y/n: n] y
NOTE: This message is not displayed when the NIS master server is configured
for the first time.
Construct a list of the hosts (one master and as many slaves) that will act as NIS
servers for the marketing domain.
This machine, mammoth, is in the list of Network Information Service servers.
Provide the hostnames of the slave servers, one per 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:
Configuring an NIS Master Server 65