Comment 38 for bug 32906

I ran into this recently. My use case was copying virtual machines and then changing the hostname by editing the /etc/hostname and running hostname -F. I was surprised to see sudo stop working following this and requiring me to boot into single user mode to fix. My surprise was because there was no reason for sudo to be doing a hostname lookup. In fact I'm not convinced that sudo should ever be doing a hostname lookup. The only case where one could argue the necessity is if one uses an IP address as a Host_Alias. I've never done that, and don't see much sense in it. But certainly if an IP address is not specified as a Host_Alias there's no reason to be doing a lookup. This raises my curiosity as to exactly what sudo is doing and whether it can be exploited.

> Not being able to resolve the local hostname is a broken and unsupportable state for any *X system.

I beg to differ. No Ubuntu system thus far has required the local hostname to be /etc/hosts. None of the desktop systems I am using running Gutsy have such an entry. Thus, if this is not fixed, assuming that Hardy is not going to modify the /etc/hosts file, this bug has the potential to break a large number of systems when they attempt to upgrade. I'd be very careful and get this resolved correctly.