Network Information Service (NIS) B.11.31.04 Administrator's Guide
# /usr/bin/ypwhich -m mapname
If the server does not respond, see “The NIS Server does not Respond” (page 59).
2. Log in as root to the NIS master server, and run the following command to check
the contents of the appropriate NIS map:
# /usr/bin/ypcat -k mapname
If the map contents are not correct, edit the ASCII file from which the map is
generated. Then, run the following commands to regenerate the map and replicate
it to the slave servers:
# cd /var/yp
# /usr/ccs/bin/make mapname
3. Run the following command on the NIS client to check the contents of the map on
the NIS server to which the client is bound:
# /usr/bin/ypcat -k mapname
If the contents are not correct, log in as root to the slave server that serves the NIS
client, and run the following command:
# /usr/sbin/ypxfr mapname
This command transfers the map from the NIS master server to the slave server
where you executed the command.
4. If the NIS client is bound to a slave server, ensure that the slave server is listed in
the NIS master server’s ypservers database:
a. Run the following command on the NIS client to determine the server to which
the client is bound to:
# /usr/bin/ypwhich
b. Log in as root to the NIS master server and run the following command to
change to the directory where the domain databases reside:
# cd /var/yp/domainname
c. On the NIS master server, run the following command to write the contents of
the ypservers database to a temporary file:
# /usr/sbin/makedbm -u ypservers > tempfile
d. If the NIS slave server is not listed in tempfile, use a text editor to add it, and
then run the following command to rebuild the ypservers database:
# /usr/sbin/makedbm tempfile ypservers
e. Log in to the NIS slave server and run the following command:
# /usr/sbin/ypxfr ypservers
Make sure the slave servers have cron scripts that schedule regular updates
of the map. For information about how to schedule regular map transfers, see
“Scheduling Regular Map Transfers from the NIS Master Server” (page 48).
NIS Returns Incorrect Information 63