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

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 the way you want, see NFS Services
Administrator’s Guide”, for instructions on configuring the Name Service Switch.
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 “NIS “Server Not Responding” Message” (page 45).
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
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
This command transfers the hosts database from the NIS master server to the server where
you issue the command.
If the NIS client is bound to a slave server, use the following procedure to ensure that the
slave server is listed in the NIS master servers ypservers database:
1. Run the following command on the NIS client to determine the server to which the
client is bound to:
/usr/bin/ypwhich
2. 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
3. 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
4. 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
5. Log in to the NIS slave server and run the following command:
/usr/sbin/ypxfr ypservers
An NIS Client Cannot Bind to a Server
If the NIS client is trying to bind to a server and any of the NIS commands return any of the
following messages:
ypcat: cant bind to an NIS server for domain domainname
ypmatch: cant match key.
reason: cant communicate with ypbind
An NIS Client Cannot Bind to a Server 47