Information Technology Reference
In-Depth Information
When these name services (DNS, /etc files, LDAP, and NIS or NIS+) are
queried or searched, they will return one of four search status messages:
SUCCESS —The requested information was located.
UNAVAIL —The service is not responding.
NOTFOUND —The requested data does not exist.
TRYAGAIN —The service is busy; try again later.
For each of these four search status messages, an action can be associated
with each source. The action is either return (stop looking) or continue (try
the next source). For example, the following listing shows a hosts entry in the
/etc/nsswitch.conf file:
hosts: nisplus dns files
The default action for a SUCCESS status message is to return the information.
The default action for the other status messages ( NOTFOUND , TRYAGAIN , and
UNAVAIL ) is to continue to the next source if one exists or to return if one does
not exist.
When an application attempts to resolve a hostname to an IP address, first
NIS+ is searched. If the information is found, it is returned to the applica-
tion. If it is not found, DNS is searched. If the information is found, it is
returned to the application. If it is not found, the /etc files configuration (the
/etc/hosts file) is searched. If the information is found, it is returned to the
application; otherwise, an error is returned.
The name service search order is left to right. That is the search will start with the
left-most service and if necessary continue until the right-most service is queried.
Five templates are included with the Solaris 9 distribution to simplify setting
up the /etc/nsswitch.conf file. These templates provide a standardized
setup for the most commonly used name services in the Solaris 9 environ-
ment. These are:
DNS ( /etc/nsswitch.dns )
LDAP ( /etc/nsswitch.ldap )
NIS ( /etc/nsswitch.nis )
NIS+ ( /etc/nsswitch.nisplus )
Original Unix /etc file configuration ( /etc/nsswitch.files )
Search WWH ::




Custom Search