 |
» |
|
|
 |
Each line in the /etc/nsswitch.conf file has the following syntax: lookup_type name_service [status=action status=action ...] name_service ... |
If you include any status=action pairs after a name service, the square brackets
are required. - lookup_type
The type of information to be looked up. The supported keywords
and the information types they represent are listed in Table 6-2 “Types of Lookups Controlled by the Name Service
Switch”. These keywords are case-sensitive. - name_service
A name service to use for the type of information
in the lookup_type field. Supported keywords and the name services they
represent are listed in Table 6-3 “Name Services Supported by the Name Service
Switch”.
These keywords are case-sensitive. - status
One of the following statuses returned by a name service
query. These values may be entered in uppercase or lowercase. - SUCCESS
The lookup was successful, and the requested information
was found. - NOTFOUND
The name service returned a response, but the requested
data was not in its database. - UNAVAIL
The name service is not configured. - TRYAGAIN
The name service was busy and the request timed
out. This value is returned only by NIS+ and DNS.
- action
The action to take based on the status of the name service
query. The following values may be entered in uppercase or lowercase. - continue
Try the next name service in the list. - return
End the lookup and return control to the calling
process without consulting the next name service in the list.
If a line beginning with one of the lookup_types does not exist in the /etc/nsswitch.conf file, the default Name Service Switch configuration
for that type of information is used. If the /etc/nsswitch.conf file does not exist, the default configuration
is used for every type of information. The default Name Service
Switch configuration is described in “Default
Configuration”. Table 6-2 Types of Lookups Controlled by the Name Service
Switch | Keyword | Type of Information Represented by Keyword |
|---|
aliases | sendmail aliases stored in the /etc/mail/aliases file, the NIS mail.aliases and mail.byaddr maps, or the NIS+ mail_aliases table. | automount | NFS AutoFS maps stored in files like /etc/auto_master and /etc/auto_home, NIS maps like auto.master and auto.home, or NIS+ tables like auto_master and auto_home. | group | Information about HP-UX groups stored
in the /etc/group file, the NIS group.bygid and group.byname maps, or the NIS+ group table. | hosts | Host names and IP addresses stored in
the /etc/hosts file, the NIS hosts.byaddr and hosts.byname maps, or the NIS+ hosts table. | netgroup | NFS netgroups stored in the /etc/netgroup file, the NIS netgroup, netgroup.byhost and netgroup.byuser maps, or the NIS+ netgroup table. | networks | Network names and IP addresses stored in the /etc/networks file, the NIS networks.byaddr and networks.byname maps, or the NIS+ networks table. | passwd | User login information stored in the /etc/passwd file, the NIS passwd.byname and passwd.byuid maps, or the NIS+ passwd table. | protocols | Networking protocol names and numbers stored
in the /etc/protocols file, the NIS protocols.byname and protocols.bynumber maps, or the NIS+ protocols table. | publickey | Secure RPC credentials stored in the /etc/publickey file, the NIS publickey.byname map, or the NIS+ cred table. | rpc | RPC program names and numbers stored
in the /etc/rpc file, the NIS rpc.byname and rpc.bynumber maps, or the NIS+ rpc table. | services | Mapping of networking services to port numbers
and protocols, stored in the /etc/services file, the NIS services.byname and services.bynp maps, or the NIS+ services table. |
Table 6-3 Name Services Supported by the Name Service
Switch | Keyword | Name Service Represented by Keyword |
|---|
files | Files in the /etc directory on the local host (/etc/passwd, /etc/hosts, and so on) | nis | Network Information Service (NIS) | nisplus | Network Information Service Plus (NIS+) | dns | Domain Name System (DNS), which is implemented
by Berkeley Internet Name Domain (BIND) on HP-UX. See the Installing
and Administering Internet Services manual for more
information. The dns keyword may be used only on the line beginning
with hosts. | compat | NIS compatibility mode, used only for passwd and group information. If you specify compat as a name service, your local /etc/passwd or /etc/group file will be consulted first, and any lines in
the file beginning with plus (+) or minus (-) will direct lookups
to NIS, just as they did in earlier releases. If you
want lookups to go to NIS+ instead of NIS when a plus or minus is
encountered in the file, specify compat for passwd or group, and add the following lines to the bottom of
your /etc/nsswitch.conf file: passwd_compat: nisplus group_compat: nisplus |
If you omit these lines, the compat keyword causes lookups to go to NIS, not NIS+. |
|