Debian Bug report logs - #473828
hosts: Unreasonable impact of misconfigured /etc/hosts file

Package: general; Maintainer for general is debian-devel@lists.debian.org;

Reported by: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>

Date: Tue, 1 Apr 2008 21:15:02 UTC

Severity: normal

Done: Holger Levsen <holger@layer-acht.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, ulrik.sverdrup@gmail.com, <debian-devel@lists.debian.org>:
Bug#473828; Package general. Full text and rfc822 format available.

Acknowledgement sent to Ulrik Sverdrup <ulrik.sverdrup@gmail.com>:
New Bug report received and forwarded. Copy sent to ulrik.sverdrup@gmail.com, <debian-devel@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Tue, 01 Apr 2008 23:13:55 +0200
Package: general
Severity: normal

The impact of a misconfigured /etc/hosts file can be quite grave.

Prime example: If the hostname is not in /etc/hosts, sudo does not run
which means that the problem can not be resolved without direct root
login or single user mode. See also bug #473827

Also, misconfiguration can lead to that the local hostname is resolved
on the network, causing latency whenever it is requested, such as when
launching applications, sudo, etc etc. This effect should be minimized.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.22-3-powerpc
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash




Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#473828; Package general. Full text and rfc822 format available.

Acknowledgement sent to Steve Greenland <steveg@moregruel.net>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 473828@bugs.debian.org (full text, mbox):

From: Steve Greenland <steveg@moregruel.net>
To: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>, 473828@bugs.debian.org
Subject: Re: Bug#473828: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Tue, 1 Apr 2008 17:09:03 -0500
On 01-Apr-08, 16:13 (CDT), Ulrik Sverdrup <ulrik.sverdrup@gmail.com> wrote: 
> Package: general
> Severity: normal
> 
> The impact of a misconfigured /etc/hosts file can be quite grave.
> 
> Prime example: If the hostname is not in /etc/hosts, sudo does not run
> which means that the problem can not be resolved without direct root
> login or single user mode. See also bug #473827

I can't duplicate this, on a up to date lenny system. Even
commenting-out all the IP4 addresses didn't cause a problem.

Removing /etc/hostname *and* /etc/resolv.conf causes:

$ sudo -s
sudo: unable to resolve host orca
root@orca:~#

But it still works.

Steve
-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net




Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#473828; Package general. Full text and rfc822 format available.

Acknowledgement sent to "Ulrik Sverdrup" <ulrik.sverdrup@gmail.com>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. Full text and rfc822 format available.

Message #15 received at 473828@bugs.debian.org (full text, mbox):

From: "Ulrik Sverdrup" <ulrik.sverdrup@gmail.com>
To: "Steve Greenland" <steveg@moregruel.net>, "Ulrik Sverdrup" <ulrik.sverdrup@gmail.com>, 473828@bugs.debian.org
Subject: Re: Bug#473828: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Wed, 2 Apr 2008 00:22:28 +0200
2008/4/2, Steve Greenland <steveg@moregruel.net>:
> On 01-Apr-08, 16:13 (CDT), Ulrik Sverdrup <ulrik.sverdrup@gmail.com> wrote:
>  > Package: general
>  > Severity: normal
>  >
>  > The impact of a misconfigured /etc/hosts file can be quite grave.
>  >
>  > Prime example: If the hostname is not in /etc/hosts, sudo does not run
>  > which means that the problem can not be resolved without direct root
>  > login or single user mode. See also bug #473827
>
>
> I can't duplicate this, on a up to date lenny system. Even
>  commenting-out all the IP4 addresses didn't cause a problem.
>
>  Removing /etc/hostname *and* /etc/resolv.conf causes:
>
>  $ sudo -s
>  sudo: unable to resolve host orca
>  root@orca:~#
>
>  But it still works.
>
>  Steve

When I encountered this, described briefly but a bit more in #473827,
I didn't see anything as long as I had network/internet access.
However, when totally offline, the bug triggered. Thus you could try
to pull out the network cable and try again. I'll have to come up with
a practical restore method before trying to reproduce it myself
though.

Ulrik




Information forwarded to debian-bugs-dist@lists.debian.org, <debian-devel@lists.debian.org>:
Bug#473828; Package general. Full text and rfc822 format available.

Acknowledgement sent to Steve Greenland <steveg@moregruel.net>:
Extra info received and forwarded to list. Copy sent to <debian-devel@lists.debian.org>. Full text and rfc822 format available.

Message #20 received at 473828@bugs.debian.org (full text, mbox):

From: Steve Greenland <steveg@moregruel.net>
To: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
Cc: 473828@bugs.debian.org
Subject: Re: Bug#473828: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Tue, 1 Apr 2008 17:43:02 -0500
On 01-Apr-08, 17:22 (CDT), Ulrik Sverdrup <ulrik.sverdrup@gmail.com> wrote: 
> 
> When I encountered this, described briefly but a bit more in #473827,
> I didn't see anything as long as I had network/internet access.
> However, when totally offline, the bug triggered. Thus you could try
> to pull out the network cable and try again. I'll have to come up with
> a practical restore method before trying to reproduce it myself
> though.

Pulling the cable on eth0: no change - error message, but sudo works

Trying 'ifdown lo': now sudo has wait for a timeout of some sort, but
eventually it still printed error, and worked.

(All still with no resolv.conf or hostname file, and hosts with no IPv4
info.)

Steve
-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net




Reply sent to Holger Levsen <holger@layer-acht.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Ulrik Sverdrup <ulrik.sverdrup@gmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #25 received at 473828-done@bugs.debian.org (full text, mbox):

From: Holger Levsen <holger@layer-acht.org>
To: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>, 473828-done@bugs.debian.org
Subject: Re: Bug#473828: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Wed, 2 Apr 2008 00:11:59 +0100
[Message part 1 (text/plain, inline)]
Hi Ulrik,

On Tuesday 01 April 2008 23:13, Ulrik Sverdrup wrote:
> The impact of a misconfigured /etc/hosts file can be quite grave.

Then you probably shouldn't do this.

> Prime example: If the hostname is not in /etc/hosts, sudo does not run
> which means that the problem can not be resolved without direct root
> login or single user mode. See also bug #473827

That bug is about gnomes network-admin damaging your /etc/hosts file and is 
tracked there. So no need to file a new bug.

Closing this bug, as it is none. /etc/hosts is set up correctly after you 
installed Debian.


regards,
	Holger
[Message part 2 (application/pgp-signature, inline)]

Message #26 received at 473828-done@bugs.debian.org (full text, mbox):

From: "Ulrik Sverdrup" <ulrik.sverdrup@gmail.com>
To: "Holger Levsen" <holger@layer-acht.org>
Cc: 473828-done@bugs.debian.org
Subject: Re: Bug#473828: hosts: Unreasonable impact of misconfigured /etc/hosts file
Date: Wed, 2 Apr 2008 01:20:10 +0200
2008/4/2, Holger Levsen <holger@layer-acht.org>:
> Hi Ulrik,
>
>
>  On Tuesday 01 April 2008 23:13, Ulrik Sverdrup wrote:
>  > The impact of a misconfigured /etc/hosts file can be quite grave.
>
>
> Then you probably shouldn't do this.
>
>
>  > Prime example: If the hostname is not in /etc/hosts, sudo does not run
>  > which means that the problem can not be resolved without direct root
>  > login or single user mode. See also bug #473827
>
>
> That bug is about gnomes network-admin damaging your /etc/hosts file and is
>  tracked there. So no need to file a new bug.
>
>  Closing this bug, as it is none. /etc/hosts is set up correctly after you
>  installed Debian.
>
>
>  regards,
>
>         Holger

Thank you for your comments

I think that the sudo bug is indeed grave bug it should be tracked separately.

It is widely reported. An Ubuntu bug is here
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/32906

However, the reason I filed this general bug was that I didn't know
where to turn with the other issues that are. After I corrected my
hosts file all my gnome applications sped up; incidently I found an
ubuntu bug about that too
https://bugs.launchpad.net/ubuntu/+source/gnome-desktop/+bug/94048

Regards
Ulrik




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 30 Apr 2008 07:36:19 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 14:04:37 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.