How to get DNS working when not running NIS ?
Note: Solaris2.x users should see question 64..
The "normal" behavior of a hostname lookup under NIS is to
consult the NIS hosts map and then DNS (if configured). If
you are not running NIS the system will only look in
the /etc/hosts file.
You have two options to correct this situation:
A) Re-build the shared library version of libc with replacement
resolver routines which understand DNS. Resolv+ provides one
of the best sets of replacement routines and it is easy
to install. Resolv+ can be obtained from
ftp.ececs.uc.edu:/pub/sun-faq/Source/resolv+2.1.1.tar.Z
If you install resolv+ make sure that you setup your
/etc/hosts.conf . /etc/hosts.conf should contain something
like this:
order bind hosts
multi off
nospoof on
Another option to use is bind-4.9.3 or later
which is available from
ftp://ftp.vix.com/pub/bind/release/
However, the bind shared libraries will ignore /etc/hosts
and do all lookups via DNS.
Rebuilding the shared library will not allow statically
linked binaries to do name resolving and these binaries
will only use /etc/hosts. "Dynamically linked"
replacements for mount and rcp are available from
ftp.ececs.uc.edu:/pub/sun-faq/Source/rcp-mount.dyn.tar.Z
This file only contains sun4 binaries. A Sun 3 binary
for mount can be retrieved from
ftp.ececs.uc.edu:/pub/sun-faq/Source/mount.sun3.Z
To be able to rebuild shared libraries you need to
install the "shlib custom" option which is available
with SunOS version 4.1 or greater.
You can still use NIS for other things in environment,
such as passwd, and group maps.
B) Run NIS with the "hosts" maps only. If you
only need DNS capability than change the "all"
line /var/yp/Makefile to "all: hosts".
It does not require any changes to shared libraries.
See question 2 for complete directions on how to setup
DNS with NIS.
Last Updated: July 3, 1996.
Go to the index
previous
next