A line in the /etc/nsswitch.conf file for NIS (Network Information Service) in Red Hat Linux consists of a keyword followed by one or more sources of information, separated by spaces or tabs. The keyword indicates which system entity the line refers to, such as "passwd" for user account information or "hosts" for network host information.
For example, a line in the /etc/nsswitch.conf file for NIS that specifies the order in which user account information should be searched might look like this:
passwd: files nis
This line tells the system to first look for user account information in the local files (e.g. /etc/passwd) and then in the NIS database. The order of the sources is significant, as the system will stop searching once it finds the requested information.
Other keywords that can appear in an NIS /etc/nsswitch.conf line include "group" for group information, "shadow" for password shadow information, and "netgroup" for network group information. The sources of information that can appear in the line depend on the keyword and the available NIS domains on the network. For example, a source for NIS user account information might be specified as "nis" or "nisplus" followed by the name of the NIS domain.
For the information being distributed by the NIS server to be used by the NIS client, you must configure the /etc/nsswitch.conf file to
include nis in the search path for each file you want to use. The following is a listing from the /etc/nsswitch.conf file showing valid values that can be in the search paths for accessing different configuration files.