switch(4) — Series 300/400 Only
NAME
switch − switch configuration file
SYNOPSIS
/etc/nsswitch.conf
DESCRIPTION
The switch configuration file specifies the lookup policy that is used by network library routines such as gethostbyname and programs such as nslookup. The lookup policy information defines the order and the conditions under which various sources (network database services) are queried to obtain information. A set of routines in the library /lib/libc.a, see switch(3N), provide programmatic access to the lookup policy information configured in the switch configuration file.
The lookup policy information is specified in the form of a text using an easy-to-understand syntax and hence can be easily created or modified. A default configuration file is supplied with the system and superuser privileges are required to modify it.
Currently the configuration file supports policy entry for hostname and internet address resolution only. For host name and internet address resolution, HP-UX allows any of the following sources (name service databases) to be used: the Domain Name System (DNS) database, the Network Information Service (NIS) database, or the /etc/hosts file.
A specific name service switch entry is specified in the configuration file as follows:
info-class : src1 [ criteria1 src2 [ criteria2 src3 ] ]
info-class A string refering to the class of information begin queried; for host name and internet address use the string "hosts",
src1, src2, src3
Strings refering to the sources (network database service) to be queried; the valid sources for name service are "dns", "nis" and "files"
criteria1, criteria2
Optional fields containing status=action string pairs enclosed in square brackets which refer to the criteria under which the next source is queried. The valid status strings are SUCCESS, NOTFOUND, TRYAGAIN and UNAVAIL. The valid action strings are return and continue.
The default action for unspecified statuses is given by:
SUCCESS=return
NOTFOUND=return
UNAVAIL=continue
TRYAGAIN=return
The entry must be on a single line. Blank lines and lines beginning with a # sign are treated as comment lines and are ignored.
EXAMPLES
An example of a valid name service switch entry is:
hosts : dns [TRYAGAIN=return UNAVAIL=continue] files
The HP-UX default entry is given by:
hosts: dns nis files
FILES
/etc/nsswitch.conf
AUTHOR
HP-UX name service switch was developed by HP.
SEE ALSO
gethostbyname(3N), nslookup(1M), switch(3N)
Hewlett-Packard Company — HP-UX Release 9.10: April 1995