NFS Services Administrator's Guide

Configuring and Administering NIS
Configuring and Administering an NIS Master Server
Chapter 4 161
3. Using a text editor, remove users from the /etc/passwd file who
should not be allowed access to the NIS master server. Do not include
a plus sign (+) in this file.
4. Use a text editor to edit the /var/yp/Makefile file. Change the
following line
PWFILE=$(DIR)/passwd
to the following:
PWFILE=$(DIR)/passwd.yp
5. In the /etc/rc.config.d/namesvrs file, modify the
YPPASSWDD_OPTIONS variable. Change the following line
YPPASSWDD_OPTIONS=ā€/etc/passwd -m passwd
PWFILE=/etc/passwdā€
to the following:
YPPASSWDD_OPTIONS=ā€/etc/passwd.yp -m passwd
PWFILE=/etc/passwd.ypā€
6. Issue the following commands to regenerate the NIS passwd maps
from /etc/passwd.yp:
cd /var/yp
/usr/ccs/bin/make passwd
This command generates both the passwd.byname and the
passwd.byuid maps and pushes them to the slave servers.
If your slave servers are not up and running yet, run make with the
NOPUSH flag set to 1:
cd /var/yp
/usr/ccs/bin/make NOPUSH=1 passwd
This procedure creates a restricted /etc/passwd file that is used only by
the NIS master server. The unrestricted /etc/passwd.yp file is used to
generate the NIS passwd maps, which are used by the rest of the hosts in
the NIS domain.
For more information, see the following man pages: passwd(4), make(1),
ypmake(1M), and ypinit(1M).