2.3. Name service switch
With multiple directory services available,
having
the ability to access different ones is handy. Solaris has an
/etc/nsswitch.conf file that for each database,
which lets you decide what directory you want to get the database
contents from. You can even specify multiple directories. For
example,
nsswitch.conf might have this entry:
hosts: files nis dns
This entry says that when
gethostbyname( ) and
gethostbyaddr( ) are called to look up hostnames
and addresses, the interfaces will first try to find the information
in the local
/etc/hosts file, then check with
NIS, then check with DNS. Be aware that some directory services
can't be combined in
nsswitch.conf. For
example, you cannot have both NIS and NIS+ listed in
nsswitch.conf, even for different databases.
| | |
2.2. Brief survey of common directory services | | 2.4. Which directory service to use |