nsswitch.conf has a number of other entries in it which if missing may
give rise to similar weird problems like this.  You might like to
extract it from sys-libs/glibc (the owner on my system) and replace it
with the full file.

BillK


On Sun, 2005-07-24 at 23:59 -0400, Russell Slater wrote:
> Thanks Nick! strace showed that /etc/hosts was not being opened, but
> it showed that nsswitch.conf was being opened but did not exist, so I
> created a nsswitch.conf file with the following line:
> 
> hosts:   files dns
> 
> Now everything works.
> 
> Thank you,
> 
>      Russ
> 
> 
> 
> 
> 
> 
> >From: Nick Rout <[EMAIL PROTECTED]>
> >Reply-To: [email protected]
> >To: [email protected]
> >Subject: Re: [gentoo-user] Name Resolution Problem
> >Date: Mon, 25 Jul 2005 15:38:12 +1200
> >
> > > lo is up, verified with ifconfig. I can ping 127.0.0.1, however
> pinging localhost results in "ping: unknown host localhost". I get the
> same result with anything else that I add to the hosts file.
> > > Thanks,
> > >      Russ
> >
> >I would try strace now to see if /etc/hosts is being opened:
> >
> >strace -e open ping localhost
> >
> >(if that generates too much lok at man strace, there is an option to
> >save to a file - redirection does not work IIRC.)
> >--
> >Nick Rout
> >
> >--
> >[email protected] mailing list
> >
> 
> -- [email protected] mailing list

-- 
[email protected] mailing list

Reply via email to