Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Installing and Administering NFS Services with 10.20 ACE and HWE: HP 9000 Networking > Chapter 5 Configuring the Name Service Switch

Customizing the nsswitch.conf File

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

Sample Name Service Switch configurations are located in the /usr/examples/nsswitch directory.

Following are some suggestions for customizing your Name Service Switch configuration:

  • If you want your system to consult the local /etc/netgroup file when it fails to find a netgroup in the NIS netgroup database, create or modify the netgroup line in the /etc/nsswitch.conf file as follows:

    netgroup: nis [NOTFOUND=continue] files 
  • If you want your system to consult BIND (DNS) when it fails to find a host name in NIS, create or modify the hosts line in the /etc/nsswitch.conf file as follows:

    hosts: nis [NOTFOUND=continue] dns files 

    With this configuration, if NIS does not contain the requested information, and BIND is not configured, the /etc/hosts file is consulted.

  • If you want your system to consult NIS if it fails to find a host name in BIND or if the BIND name servers are not responding, create or modify the hosts line in the /etc/nsswitch.conf file as follows:

    hosts: dns [NOTFOUND=continue TRYAGAIN=continue] nis files 

    With this configuration, if BIND does not return the requested information, and NIS is not running, the /etc/hosts file is consulted.

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.

CAUTION: Changing the default configuration can complicate troubleshooting. The default configuration is designed to preserve the authority of the name service you are using. It switches from BIND to NIS only if BIND is not enabled. It switches from NIS to the local /etc file only if NIS is not enabled. It is very difficult to diagnose problems when multiple name servers are configured and enabled for use.

For more information on the Name Service Switch, type man 4 switch at the HP-UX prompt.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1998 Hewlett-Packard Development Company, L.P.