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.
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.
shadow databases was
traditionally handled in a special way. The appropriate files in the
/etc directory were read but if an entry with a name starting
+ character was found NIS was used. This kind of lookup
was removed and now the default value for the services is
libnss_compat no longer depends on libnsl and can be used without NIS.
For all other databases the default value is
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
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
But one should avoid slow services like this if possible.