System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

Default Search Criteria

The combination of nsswitch.conf file status message and action option determines what the routine does at each step. The combination of status and action make up the search criteria.

The switch's default search criteria are the same for every source. As described in terms of the status messages listed above, see the following.

You can change default search criteria by explicitly specifying some other criteria by using the STATUS=action syntax shown above. For example, the default action for a NOTFOUND condition is to continue the search to the next source. For example, to specify for networks, the search should stop in a NOTFOUND condition, edit the networks line of the switch file. The line would read as follows.


networks: nis [NOTFOUND=return] files

The networks: nis [NOTFOUND=return] files line specifies a nondefault criterion for the NOTFOUND status. Nondefault criteria are delimited by square brackets.

In this example, the search routine behaves as follows:


Note –

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 The Switch File and Password Information for more information.