[Fwd: /etc/hosts and /etc/host.conf confusion]

Bill Schoolcraft bill at wiliweld.com
Sun Jul 4 22:33:47 PDT 2004


At Sun, 4 Jul 2004 it looks like David Fuchs composed:

> 	Excellent, ping does resolve a new entry in /etc/hosts properly.  So as
> you said, `host' is doing it's own thing.  The manpage for host gives me
> some leads which I'll follow through on.

Hmm, in the Unix boxes I've seen, there is a file called /etc/nsswitch.conf
that will have a line called "hosts:" it will dictate the order by which names
are resolved.  If you have the following your system will look at the
/etc/hosts file first, then NISplus, then DNS. If you were to have "dns"
first, it would ignore your /etc/hosts file (first) and hit your dns looking
for answers.

/etc/nsswitch.conf

hosts:      files nisplus dns

--
Bill Schoolcraft
PO Box 210076                 -o)
San Francisco CA 94121         /\
"UNIX, A Way Of Life."        _\_v

http://billschoolcraft.com



More information about the freebsd-questions mailing list