[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/hosts format WAS [Re: host hostname not found]



On 2014-09-12 00:59:27 +0400, Reco wrote:
> On Thu, 11 Sep 2014 16:43:53 -0400
> Harry Putnam <reader@newsguy.com> wrote:
>  The `hosts' entry:
> > 
> >   hosts:      files myhostname mdns4_minimal [NOTFOUND=return] dns
> > 
> > What does all that mean?  I understand `files' first and `dns' at the
> > end but none of what is in between.  
> 
> Every hostname → IP resolving and every IP → hostname resolving goes
> in the following order:
> 
> 1) /etc/hosts
> 
> 2) libnss-myhostname
> I honestly don't know what scares me most about libnss-hostname - the
> need of it in the first place, the author of the library, software that
> behaves funny without it or the setups that genuinely need it :(
[...]

But warning! You can have IPv4 resolving or IPv6 resolving.
Some software (e.g. exim) does IPv6 resolving first. Since
libnss-myhostname sets up IPv6 resolving for the local hostname,
which is usually not done in /etc/hosts (at least by default),
settings done by libnss-myhostname come first in this case, so
that libnss-myhostname can break things:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756224#114

libnss-myhostname should not be used (at least currently) when
the user has a /etc/hosts file.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: