Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2003 18:13:34 +0100
From:      Ceri Davies <setantae@submonkey.net>
To:        Fred Souza <fred@storming.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: /etc/hosts completely ignored
Message-ID:  <20030528171334.GA28284@submonkey.net>
In-Reply-To: <20030528170804.GA1112@torment.storming.org>
References:  <3ED4E9CA.8000309@die.supsi.ch> <20030528170804.GA1112@torment.storming.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 28, 2003 at 02:08:04PM -0300, Fred Souza wrote:
> [snip]
> 
> > -bash-2.05b# cat /etc/hosts
> > 193.5.56.6              www.freebsd.org myfreebsd
> 
> [snip]
> > -bash-2.05b# cat /etc/nsswitch.conf
> > hosts:  files dns
> > 
> > -bash-2.05b# cat /etc/host.conf
> > hosts
> > bind
> > 
> > -bash-2.05b# cat /etc/resolv.conf
> > domain  noonlights.net
> > nameserver      195.190.166.166
> > nameserver      195.190.166.167
> > 
> > -bash-2.05b# host localhost
> > Host not found.
> > 
> > -bash-2.05b# host localhost.noonlights.net
> > Host not found.
> 
>   I think it's host-related. I have a similar setup muself, although I'm
>   currently running 5.1-BETA (sources as of around midnight 28/05/03
>   GMT-3). If I try `host localhost`, I get Host not found, too. But if I
>   try `host localhost.`, it finds that host fine. Have you tried `host
>   localhost.noonlights.net.` or even `host localhost.`? I think it might
>   be because host forces the inclusion of its domainname at the end of
>   the argument if it's not dot-ended.

Umm, host(1) looks in the DNS for hostnames, as per the manpage:

DESCRIPTION
     Host looks for information about Internet hosts.  It gets this informa-
     tion from a set of interconnected servers that are spread across the
     world.

It doesn't use /etc/hosts, just DNS.  That's by design.

Ceri
-- 
User: DO YOU ACCEPT JESUS CHRIST AS YOUR PERSONAL LORD AND SAVIOR?
Iniaes: Sure, I can accept all forms of payment.
                                           -- www.chatterboxchallenge.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030528171334.GA28284>