Solaris Naming Setup and Configuration Guide

Enabling a Machine to Use DNS

This section describes how to set up the name service switch configuration file for the NIS+ or local files name services so that a machine can also use the Domain Name System (DNS). DNS forwarding is inherent in the NIS name service. You do not have to (and should not) add a DNS entry to the hosts line of switch file of a machine using the NIS service. The steps described below apply only to those machines using local /etc files or NIS+.

Here is a list of the steps for machines using local /etc files or NIS+:

  1. Log in as superuser.

  2. Open the /etc/nsswitch.conf file.

  3. Specify DNS as a source of hosts information.

  4. Save the file and reboot the workstation.

Prerequisites

The machine must have a properly configured /etc/resolv.conf file (as described in "The Resolver").

Security Considerations

You must perform this operation as superuser.

How to Enable an NIS+ Client to Use DNS

  1. Log in as superuser.

  2. Open the /etc/nsswitch.conf file.

  3. Specify DNS as a source of hosts information.

    DNS can be the only source or an additional source for the hosts information. Locate the hosts line and use DNS in one of the ways shown below:


    hosts: files dns

    or


    hosts: nisplus dns [NOTFOUND=return] files

    or


    hosts: dns nisplus [NOTFOUND=return] files

    Do not use the above syntax for NIS clients, since it will make them look for unresolved names twice in DNS.

  4. Save the file and reboot the workstation.

    Because the nscd daemon caches this information, which it reads at start up, you must reboot the workstation now.