Working With Oracle® Solaris 11.2 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: July 2014
 
 

How to Configure a Search Criterion for a Database

The name service switch has default search criteria, as explained in Default Search Criteria for the Name Service Switch.

In this procedure, you want the redefine the search mechanism for the host database when the information is not found at the first source. The search mechanism should stop instead of proceeding to search the next source.

  1. Become an administrator.

    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.2 .

  2. (Optional) Display the current configuration of the host database.
    # svccfg -s name-service/switch listprop config/host
    config                      application
    config/network              astring             "files dns nis"
    
  3. Create a new search criterion for the host database lookups when information is not found at the first source.
    # svccfg -s system/name-service/switch
    svc:/system/name-service/switch> setprop config/host = \
    astring: "files [NOTFOUND=return] dns nis"
    svc:/system/name-service/switch> quit

    With this configuration, the search mechanism for the network database uses the default search criteria for the SUCCESS status and UNAVAILABLE status. However, if the information is not found, the search stops immediately.

  4. Refresh service for the name service switch.
    # svcadm refresh name-service/switch