HP-UX Internet Services Administrator's Guide (February 2007)

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
The lookup_type can be hosts, passwd, or group. The lookup_query can be a
host name or an IP address, a user name or user ID, or a group name or group ID.
The following example uses nsquery to perform a lookup of the host name brock:
# /usr/contrib/bin/nsquery hosts brock Using nisplus [NOTFOUND=return] files for the hosts policy. Searching
nisplus for brock brock was NOTFOUND Switch configuration: Terminates Search
As an optional third argument to nsquery, you can supply a name service switch
configuration in double quotes, as in the following example:
# /usr/contrib/bin/nsquery passwd 30 "files nis" Using "files nis" for the passwd policy. Searching /etc/passwd for 30
User name: www User ID: 30 Group ID: 1 Gecos: Home Directory: / Shell: Switch configuration: Terminates Search
For more information, type man 1 nsquery at the HP-UX prompt.
Configuring an Internet Address
This section describes how to configure your host to find other hosts on the network,
by host name or IP address. It discusses the following topics:
“Choosing a Name Service” (page 27)
“Editing the /etc/hosts File” (page 28)
“Configuring a Route” (page 29)
“Changing a Host’s IP Address” (page 30)
Choosing a Name Service
HP-UX provides ways to translate host names to IP addresses or IP addresses to host
names:
BIND (Berkeley Internet Name Domain), which is Berkeley’s implementation of
the Domain Name System (DNS).
The /etc/hosts file, a simple ASCII file that is searched sequentially.
NIS (Network Information Service), one of the NFS services (previously called
“Yellow Pages”).
Configuring the Internet Services Software 27