Go to main content

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

Exit Print View

Updated: October 2017

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.

This procedure describes how to redefine the search mechanism for the host database when the information is not found at the first source. The search mechanism must 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.3.

  2. (Optional) Display the current configuration of the host database.
    # svccfg -s name-service/switch:default listprop config/host
    config/host              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:default
    svc:/system/name-service/switch:default> setprop config/host = \
    astring: "files [NOTFOUND=return] dns nis"
    svc:/system/name-service/switch:default> 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 the service for the name service switch.
    # svcadm refresh name-service/switch:default