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

7. Enter the following commands to regenerate the NIS passwd maps from the
/etc/passwd.yp file:
cd /var/yp
/usr/ccs/bin/make passwd
The make passwd command generates both the passwd.byname and the passwd.byuid
maps, and copies them to the slave servers.
If the slave servers are not up and running yet, enter make with the NOPUSH flag set to 1:
cd /var/yp
/usr/ccs/bin/make NOPUSH=1 passwd
For more information, see the following manpages: passwd (4), make (1), ypmake (1M), and ypinit
(1M).
Setting up an Alternate Directory for the passwd File
On HP-UX 11i v3, specifying a directory where the passwd (and also the /etc/shadow file
when in shadow mode) can be found is mandatory when starting the NIS passwd daemon,
rpc.yppasswdd. You can use the -D option to specify the directory where the passwd and
shadow files are found, as follows:
# rpc.yppasswdd -D /etc/nis
However, the default path for the passwd and shadow files is /etc. You must use this path to
avoid a warning message at system startup.
The -D /etc/nis option must be added to the YPPASSWDD_OPTIONS variable in the
/etc/rc.config.d/namesvrs file. You must restart the NIS server each time you modify
the namesvrs file.
NOTE: Back up the /etc/rc.config.d/namesvrs file before you perform the steps described
in this section.
To set up an alternate directory for the password file, complete the following steps:
1. Log in to the NIS master server as superuser.
2. Enter the following command to stop the NIS server:
#/sbin/init.d/nis.server stop
3. Modify the /etc/rc.config.d/namesvrs file, and set the YPPASSWDD_OPTIONS variable,
as follows:
YPPASSWDD_OPTIONS= -D <directory>
Where:
directory is the name of the alternate directory. For example, /etc/nis
4. Enter the following command to restart the NIS server:#/sbin/init.d/nis.server
start
Allowing Selected Clients and Slave Servers To Access The Master Server
The NIS network can be secured by restricting access to the NIS master server.
To selectively allow clients and slave servers to access the NIS master server, complete the
following steps:
1. Log in to the NIS master server as superuser.
2. On the NIS master server, create the following file if it does not already exist:
/var/yp/securenets
3. Add the following line to the /var/yp/securenets file:
address_mask IP_address
Setting up an Alternate Directory for the passwd File 27