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

3 Configuring and Administering an NIS Master Server
This chapter describes how to configure and administer an NIS master server.
An NIS master server holds the source files for all the NIS maps in the domain. Any changes to
the NIS maps must be made on the NIS master server. The NIS master server delivers information
to the NIS clients and supplies the NIS slave servers with up-to-date maps. An NIS master server
can also be an NIS client.
This chapter addresses the following topics:
“Creating the Master passwd File” (page 21)
“Creating the Master group File” (page 22)
“Creating the Master hosts File” (page 23)
“Enabling the NIS Master Server Capability” (page 24)
“Verifying the NIS Master Server Configuration” (page 25)
“Configuring the NIS Master Server to Use a Private passwd File” (page 26)
“Setting up an Alternate Directory for the passwd File” (page 27)
Allowing Selected Clients and Slave Servers To Access The Master Server” (page 27)
“Verifying the Contents of an NIS Map” (page 28)
“Modifying an NIS Map” (page 28)
Adding an AutoFS Map to the NIS Domain” (page 29)
“Removing an AutoFS Map from the NIS Domain” (page 30)
Adding a Slave Server to the NIS Domain” (page 30)
“Removing a Slave Server from the NIS Domain” (page 31)
“Enabling the DNS Forwarding Mode ” (page 31)
“Configuring an NIS Master Server in a Domain with Solaris Systems” (page 32)
“Enabling the Shadow Password Mode” (page 32)
“Controlling NIS Logging” (page 33)
Creating the Master passwd File
To create the master passwd file, complete the following steps.
NOTE: Back up the /etc/passwd file before you perform the steps described in this section.
1. Log in to the NIS master server as superuser.
2. Create a new directory, as follows.
cd /etc
mkdir nis
3. Copy the /etc/passwd file from each host in your NIS domain as
/etc/nis/passwd.hostname, to the host designated at the master server.
Where:
hostname specifies the name of the host to which the file belongs.
For example, for a host ocelot, the password file will be named as
/etc/nis/passwd.ocelot.
4. Concatenate all the passwd files, including the master servers passwd file, into a temporary
passwd file, as follows.
cd /etc/nis
cat passwd passwd.hostname1 passwd.hostname2...> passwd.temp
Creating the Master passwd File 21