This procedure describes how to specify a different source for the host database. Assume that the original source configuration for the database are files and NIS, which means that for a host lookup, the local files are searched first, and then NIS. You reconfigure the name service switch to also use DNS in host lookups.
You can use this procedure as a template to configure the sources for other name service switch databases.
Before You Begin
Make sure that the name service switch configuration reflects the actual setup of naming service on your system. For example, if you want DNS to be a source for host lookups, then DNS must be configured as well.
For more information about obtaining the appropriate rights to perform specific tasks, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# svccfg -s name-service/switch listprop config/host config/host astring "files nis"
# svccfg -s system/name-service/switch:default svc:/system/name-service/switch:default> setprop config/host = astring: "files dns nis" svc:/system/name-service/switch:default> quit
# svcadm refresh name-service/switch:default