Missing hostname in /etc/hosts causes sudo to fail
Bug #19775 reported by
Dennis Kaarsemaker
This bug report is a duplicate of:
Bug #32906: sudo fails if it cannot resolve the local hostname and no MTA is installed.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcfg (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
As active helper in #ubuntu I encountered the following issue several times already:
Sometimes the installer does not add the hostname given in the install to
/etc/hosts correctly.
The line that should read
127.0.0.1 localhost.
only reads
127.0.0.1 localhost.
As a consequence, sudo fails to work.
The only info I have is that all systems where this occurs are fresh installs
(the owners never
have been able to use sudo).
Changed in netcfg: | |
assignee: | kamion → nobody |
To post a comment you must log in.
(In reply to comment #0) localdomain localhost myhostname localdomain localhost
> As active helper in #ubuntu I encountered the following issue several times
already:
>
> Sometimes the installer does not add the hostname given in the install to
> /etc/hosts correctly.
> The line that should read
>
> 127.0.0.1 localhost.
>
> only reads
>
> 127.0.0.1 localhost.
>
> As a consequence, sudo fails to work.
>
> The only info I have is that all systems where this occurs are fresh installs
> (the owners never
> have been able to use sudo).
I can confirm that this problem also occurs on fresh installs in debian sarge.
Whereas it is not a problem in debian, because of the existence of a root
password, it makes the whole problem difficult to solve in Ubuntu (try sudo bash
or sudo nano /etc/hosts) when the hostname is not in /etc/hosts...
It might come (untested) from the fact that the network wasn't configured
properly (in case, for instance, of a ppp network).
Thanks...