Comment 51 for bug 32906

Revision history for this message
George Durbridge (gdurbrid) wrote : Re: sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on

This is a bug in the network-admin tool. It is not just an upgrade problem, as I encountered it on a fresh install of Hardy.

The tool saves a hostname to /etc/hosts in the form "host.domain", even if you only enter "host". So if you provide for one IP the aliases "host" and "host.domain", it saves "host.domain" twice, and does not save plain "host" at all. When sudo looks up "host", there is no such entry.

You can get around the bug by deleting the domain from the General tab in the network-admin tool, before you use it to enter the hostname for localhost in /etc/hosts. If you restore the domain name later, however, the network-admin tool will corrupt the entries in /etc/hosts, replacing "host" with "host.domain".