![]()
2.3. Name service switchWith 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: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.hosts: files nis dns
![]() Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|