Network Information Service (NIS) B.11.31.04 Administrator's Guide
# /usr/bin/ypwhich
b. Log in to the NIS master server, and run the following command:
# cd /var/yp/domainname
c. Run the following command on the NIS master server 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
Unknown Host
If the message “Unknown Host” is displayed, complete the following steps:
1. Run the following command to trace a lookup of the unknown host:
# /usr/contrib/bin/nsquery hosts hostname
The trace will indicate the name services (BIND, NIS, or /etc/hosts) that were
queried and in what order. If the host is not performing lookups as desired, see
“NFS Services Administrator’s Guide”, for instructions on configuring the Name
Service Switch.
2. Run the following command on the NIS client to determine which master server
provides the hosts map:
# /usr/bin/ypwhich -m hosts
If the server does not respond, see “The NIS Server does not Respond” (page 59).
If the ypwhich command returns the name of the NIS master server, log in as root
to the master server and ensure that the unknown host is listed in its /etc/hosts
file. Then, run the following commands on the master server to generate the NIS
hosts database from the /etc/hosts file and replicate it to the NIS slave servers:
# touch /etc/hosts
# cd /var/yp
# /usr/ccs/bin/make hosts
3. Run the following command to check whether the unknown host is listed in the
hosts database on the NIS server to which the client is bound:
# /usr/bin/ypmatch hostname hosts
If the host is not listed in the hosts database, run the following commands on the
NIS server to which the client is bound:
# /usr/sbin/ypxfr hosts.byname
# /usr/sbin/ypxfr hosts.byaddr
Unknown Host 61