Network Information Service (NIS) B.11.31.02 Administrator's Guide
networks.byname mastername
ipnodes.byaddr mastername
ipnodes.byname mastername
hosts.byaddr mastername
hosts.byname mastername
group.bygid masternamegroup.byname mastername
passwd.byuid mastername
passwd.byname mastername
ypservers mastername
Where:
mastername is the name of the local host. For example, in an NIS network, if the hostname of
the master server is mammoth, mastername in the previous output will be replace by the hostname,
that is, mammoth.
Configuring the NIS Master Server to Use a Private passwd File
This section describes how to configure the NIS master server to use a private passwd file by
creating a restricted /etc/passwd file that can be used only by the NIS master server. The
restricted /etc/passwd.yp file can be used to generate the NIS passwd maps, which are used
by the other hosts in the NIS domain.
NOTE: Back up the /etc/passwd file and the /etc/rc.config.d/namesvrs file, before
you perform the steps described in this section.
To configure the NIS master server to use a private passwd file, complete the following steps:
1. Log in to the NIS master server as superuser.
2. Copy the /etc/passwd file to the /etc/passwd.yp file.
3. Edit the /etc/passwd file, and remove users who must not be allowed access to the NIS
master server.
4. Edit the /var/yp/Makefile file. Replace the following line:
PWFILE=$(DIR)/passwd
with
PWFILE=$(DIR)/passwd.yp
5. In the /etc/rc.config.d/namesvrs file, modify the value of the YPPASSWDD_OPTIONS
variable from:
YPPASSWDD_OPTIONS=”/etc/passwd -m passwd PWFILE=/etc/passwd”
to:
YPPASSWDD_OPTIONS=”/etc/passwd.yp -m passwd PWFILE=/etc/passwd.yp”
6. Stop and start the NIS server daemons as follows:
# /sbin/init.d/nis.server stop
# /sbin/init.d/nis.server start
26 Configuring and Administering an NIS Master Server