Installing and Administering Internet Services

32 Chapter2
Installing and Configuring Internet Services
Configuring the Name Service Switch
Default Configuration
If the /etc/nsswitch.conf file does not exist, or if the line for a
particular type of information is absent or syntactically incorrect, the
following default configuration is used:
passwd: files nis
group: files nis
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files
If your /etc/nsswitch.conf file contains a syntactically correct line for
a particular type of information, that line is used instead of the default.
For more information about configuring the Name Service Switch,
including the syntax of the configuration file and customizing your
configuration, see Installing and Administering NFS Services.
Troubleshooting the Name Service Switch
Issue the nsquery command to perform a hosts, passwd, or group
lookup, as follows:
/usr/contrib/bin/nsquery
lookup_type lookup_query
The
lookup_type
can be hosts, passwd, or group.
The
lookup_query
can be a host name or IP address, a user name or
user ID, or a group name or group ID.
The nsquery command displays the Name Service Switch configuration
that is currently in use. Then, it displays the results of the query. The
following example uses nsquery to perform a lookup of the host name
romney:
# /usr/contrib/bin/nsquery hosts romney
Using "nisplus [NOTFOUND=return] files" for the hosts policy.
Searching nisplus for romney
romney was NOTFOUND