Previous: , Up: The NSS Configuration File   [Contents][Index]


29.2.3 Notes on the NSS Configuration File

Finally a few more hints. The NSS implementation is not completely helpless if /etc/nsswitch.conf does not exist. For all supported databases there is a default value so it should normally be possible to get the system running even if the file is corrupted or missing.

For the hosts and networks databases the default value is dns [!UNAVAIL=return] files. I.e., the system is prepared for the DNS service not to be available but if it is available the answer it returns is definitive.

The passwd, group, and shadow databases are traditionally handled in a special way. The appropriate files in the /etc directory are read but if an entry with a name starting with a + character is found NIS is used. This kind of lookup remains possible if the GNU C Library was configured with the --enable-obsolete-nsl option and the special lookup service compat is used. If the GNU C Library was configured with the --enable-obsolete-nsl option the default value for the three databases above is compat [NOTFOUND=return] files. If the --enable-obsolete-nsl option was not used the default value for the services is files.

For all other databases the default value is files unless the GNU C Library was configured with --enable-obsolete-rpc option, in which case it the default value is nis [NOTFOUND=return] files.

A second point is that the user should try to optimize the lookup process. The different service have different response times. A simple file look up on a local file could be fast, but if the file is long and the needed entry is near the end of the file this may take quite some time. In this case it might be better to use the db service which allows fast local access to large data sets.

Often the situation is that some global information like NIS must be used. So it is unavoidable to use service entries like nis etc. But one should avoid slow services like this if possible.


Previous: Actions in the NSS configuration, Up: The NSS Configuration File   [Contents][Index]