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

Bug#267321: Debian installer and /etc/hosts



On Sun, 2004-08-22 at 22:37, VSJ wrote:
> I'd go for the following solution:

[... not to include the hostname as an alias for 127.0.0.1
if the network is configured via DHCP.]

I am beginning to think that we should bite the bullet and do one of
two things.  Either,

1. to require software to work even if <hostname> cannot be resolved,

or,

2. to make the following a standard entry in /etc/hosts:
       127.0.1.1   <hostname>


Repeating myself from #247734 ...

I think we should continue to consider the alternative of having:

    127.0.0.1	localhost.localdomain	localhost
    127.0.1.1	<hostname>

when there is no static IP address we can use instead of '127.0.1.1'.

The advantage of this configuration is that localhost.localdomain is
the canonical hostname for the standard loopback address -- the 
address one gets if one looks up 'localhost', and <hostname> is the
canonical host name for the address one gets if one looks up
<hostname>.

I don't think that there are many disadvantages.  All sudo wants is that
the hostname be resolvable; the address to which the hostname resolves
doesn't have to work.  There may be other programs that want to resolve
the hostname and also use it and for that reason it seems safest to 
make the hostname resolve to a 127.* address.  127.0.1.1 works as well
as 127.0.0.1 for some services: I have tried ping, telnet, ssh and
name lookups using dnsmasq and they all work at 127.0.1.1.  If there
are services for which 127.0.1.1 fails to work then we will either have
to modify those services or tell people not to access those services via
<hostname> but via 'localhost'.
--
Thomas





Reply to: