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

If the slave server serves a different domain from the one set by the domainname
command, you must specify the domainname after NIS_server_name.
9. Set up the system as an NIS client and a NIS master server:
# /usr/sbin/ypinit -c
10. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file:
# 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.
11. Start the NIS scripts:
# /sbin/init.d/nis.server start
# /sbin/init.d/nis.client start
To receive map updates from the NIS master server, you must add the new slave server
to the ypservers map on the master server. For information about adding an NIS
slave server to the NIS domain, see Adding a Slave Server to the NIS Domain”
(page 38) .
For more information, see domainname (1), ypinit (1M), ypfiles (4), and Appendix A
(page 65).
Verifying the NIS Slave Server Configuration
To verify the NIS slave server configuration, check whether the NIS slave server is
running:
# /usr/bin/ypwhich
The ypwhich command must return the host name of the slave server. If the ypwhich
command does not return the name of the slave server, see “Troubleshooting NIS”
(page 59) for information on troubleshooting.
For more information, see ypwhich (1).
Scheduling Regular Map Transfers from the NIS Master Server
The NIS maps are transferred from the NIS master server to the NIS slave server using
map transfers. Based on the frequency of updates made to the NIS maps, you can
schedule map transfers for files, such as /etc/passwd and /etc/hosts. The sample
scripts for scheduling map transfers are available at:
/usr/newconfig/var/yp
You can customize the sample scripts to schedule the map transfer. Alternatively, you
can change the time at which the cron jobs are executed.
To schedule map transfers from the NIS master server, complete the following steps:
1. Log in to the slave server as a superuser.
48 Configuring and Administering an NIS Slave Server