A default nsswitch.conf file
is supplied in the /usr/newconfig/etc
directory. It contains the following lines:
hosts: dns nis files protocols: nis files services: nis files networks: nis files netgroup: nis files rpc: nis files |
This is the default configuration. In other words, if you
copy /usr/newconfig/etc/nsswitch.conf
to /etc/nsswitch.conf, the Name
Service Switch behaves the same way it would if no /etc/nsswitch.conf
file existed.
If your /etc/nsswitch.conf
file contains a syntactically correct line for a particlar type
of information, that line is used instead of the default.
If you specify a name service for a particular type of information,
but you do not specify four status=action
pairs after the name service, the following default status=action
pairs are used for any statuses you did not specify:
SUCCESS=return NOTFOUND=return UNAVAIL=continue TRYAGAIN=return |
So, for example, in the default configuration for protocols,
NIS will be consulted first, and if NIS is not configured (the query
returns UNAVAIL), the local /etc/protocols
file will be consulted. If the query returns anything other than
UNAVAIL, the /etc/protocols
file will not be consulted.
Figure 5-1 “Default Behavior of the Name Service
Switch” illustrates the
default behavior of the Name Service Switch for host information
lookups.