The configuration file for the Name Service Switch is called /etc/nsswitch.conf. If this file does not exist, the system has a
default Name Service Switch configuration, described in “Default
Configuration”, later in this chapter.
Copy the appropriate Name Service Switch
configuration file to /etc/nsswitch.conf.
Table 6-1 “Name Service Switch Configuration Files in
/etc Directory” lists the Name
Service Switch configuration files supplied in the /etc directory and describes the purpose of each one.
If you plan to use BIND (DNS) for host information, step 2
in this procedure explains how to add BIND to the Name Service Switch configuration
file.
Table 6-1 Name Service Switch Configuration Files in
/etc Directory
| File Name | Purpose |
|---|
| For hosts not configured
as NIS or NIS+ clients. All types of lookups consult files on the
local host. |
| For hosts configured as NIS clients. Some types
of lookups use local files first and consult NIS if the local files
do not contain the requested information. Other types of lookups
consult NIS first and look in local files only if NIS does not respond. |
| For hosts configured as NIS+ clients. Some
types of lookups use local files first and consult NIS+ if the local files
do not contain the requested information. Other types of lookups
consult NIS+ first and look in local files only if NIS+ does not
respond. |
| For hosts that used the HP-UX default Name
Service Switch configuration on earlier releases and will continue
to use it on HP-UX 10.30. See “Default
Configuration”. |
If you chose a configuration file other than nsswitch.hp_defaults, and you want to use BIND (DNS) for host name
and IP address lookups, change the hosts line to read as follows:
hosts: dns [NOTFOUND=return] files |
If you want your host to consult NIS or NIS+ when BIND is
not running, change the hosts line to read as follows:
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files |
or
hosts: dns [NOTFOUND=return] nisplus [NOTFOUND=return] files |
Reboot your host to force long-running processes
to read the new /etc/nsswitch.conf file. Many processes, like the keyserv(1M) daemon, read the file only at startup and
continue to use the values they read at startup even though the
file has changed. The safest way to restart all necessary processes
in the correct order is to reboot the host.
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 or NIS+ are not available.
For more information on the Name Service Switch, type man 4 nsswitch.conf at the HP-UX prompt.