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+.
The machine must have a properly configured /etc/resolv.conf file (as described in "The Resolver").
You must perform this operation as superuser.
Task |
Description |
For Instructions, Go To |
|||||
---|---|---|---|---|---|---|---|
Enabling a Machine to Use DNS |
Modify the /etc/nsswitch.conf file and enable an NIS+ client to use DNS |
Log in as superuser.
Edit the /etc/nsswitch.conf file.
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 they will be forced to search for unresolved names twice in DNS.
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.