HP-UX Internet Services Administrator's Guide (August 2003)

Installing and Configuring Internet Services
Configuring the Internet Services Software
Chapter 228
NOTE Configuring the name service switch is a separate task from configuring
the name services themselves. You must also configure the name services
before using them. The name service switch just determines which name
services are queried and in what order.
HP recommends that you maintain at least a minimal /etc/hosts file
that includes important addresses like gateways, diskless boot servers
and root servers, and your host’s own IP address. HP also recommends
that you include the word files in the hosts line to help ensure a
successful system boot using the /etc/hosts file when BIND and NIS
are not available.
Default Configuration
If the /etc/nsswitch.conf file does not exist, or if the line for a
particular type of information is absent or syntactically incorrect, the
following default configuration is used:
passwd: files nis
group: files nis
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services nis [NOTFOUND=return] files
If your /etc/nsswitch.conf file contains a syntactically correct line for
a particular type of information, that line is used instead of the default.
Troubleshooting Using the nsquery Command
You must use the nsquery command to troubleshoot the name service
switch. The nsquery command displays the name service switch
configuration that is currently in use. Then, it displays the results of the
query. To perform a hosts, passwd, or group lookup, issue the following
command at the HP-UX prompt:
/usr/contrib/bin/nsquery
lookup_type lookup_query