Re: /etc/hosts completely ignored

From: Scot W. Hetzel <hetzels_at_westbend.net>
Date: Wed, 28 May 2003 12:21:57 -0500
From: "Roberto Nunnari" <nunnari_at_die.supsi.ch>
> -bash-2.05b# cat /etc/hosts
> 127.0.0.1               localhost.noonlights.net localhost
> 192.168.1.5             jupiter.noonlights.net jupiter
> 192.168.1.5             jupiter.noonlights.net.
> 193.5.56.6              www.freebsd.org myfreebsd
>
> note the wrong IP for www.freebsd.org!! just for testing purposes!

>
> -bash-2.05b# cat /etc/host.conf
> hosts
> bind
>
>

> -bash-2.05b# host localhost
> Host not found.
>
> -bash-2.05b# host localhost.noonlights.net
> Host not found.
>

> See? /etc/hosts is completely ignored..
>
> If I missed something, I'd be grateful if somebody could
> let me know... for I'm new to /etc/nsswitch.conf.. but after
> reading the manpage I have no clue left.. just an idea that
> is a bug..
>
I get the same results on 4-STABLE with the "host" command.  Looking at the
host man pages, it states host does the lookups using domain servers.

        host - look up host names using domain server

Try ping, telnet, ftp, or ssh, as they should consult the hosts table before
checking with a domain servers.

Scot
Received on Wed May 28 2003 - 08:22:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC