The combination of nsswitch.conf file status message and action option determines what the routine does at each step. This combination of status and action is called the search criteria.
Described in terms of the status messages listed above, the default search criteria are:
Because these are the default search criteria, they are assumed. That is, you do not have to explicitly specify them in the switch file. You can change these default search criteria by explicitly specifying some other criteria using the STATUS=action syntax show above. For example, the default action for a NOTFOUND condition is to continue the search to the next source. To specify that for a particular type of information, such as networks, the search is to halt on a NOTFOUND condition, you would edit the networks line of the switch file to read:
networks: nis [NOTFOUND=return] files
The networks: nis [NOTFOUND=return] files line specifies a non-default criterion for the NOTFOUND status. Non-default criteria are delimited by square brackets.
In this example, the search routine behaves as follows:
If the networks map is available and contains the needed information, the routine returns with a SUCCESS status message.
If the networks map is not available, the routine returns with an UNAVAIL status message and by default continues on to search the appropriate /etc file.
If the networks map is available and found, but it does not contain the needed information, the routine returns with a NOTFOUND message. But, instead of continuing on to search the appropriate /etc file, which would be the default behavior, the routine stops searching.
If the networks map is busy, the routine returns with an TRYAGAIN status message and by default continues on to search the appropriate /etc file.
Lookups in the nsswitch.conf file are done in the order in which items are listed. However, password updates are done in reverse order, unless otherwise specified by using the passwd -r repository command. See Name Service Switch File and Password Information for more information.