Comment 20 for bug 8980

Revision history for this message
Hendy Irawan (ceefour) wrote :

I have to admit my comment wasn't helpful at all.

I don't have "sudo" problems yet (and NOT looking forward to it! Especially not on a remote server.)

But there are some things:
* I never had any idea that /etc/hosts has a connection with the wellbeingness of "sudo"
* I've had sudo problems a few times before, but it seems to be related to incorrect time (time too future?). Rebooting "usually" works, IF you can get reboot privileges that is :-(
* There are gazillions of different opinions on how is the "best" /etc/hosts structure. All seem to agree to disagree. Each distro has their own preferred layout, and even in Ubuntu there are several different layouts depending on situation. This needs to be clarified. At least, make it an official document that describes the "rationale" behind the *official* Ubuntu /etc/hosts layout.
* Setting hostname is, I have to say, tricky.

I had to experiment with different /etc/hostname and /etc/hosts to get the effect that I "want".

i.e.:
* hostname returns the "proper" hostname (is this supposed to be short or long?)
* hostname -s returns the proper short hostname
* hostname -f returns the proper FQDN hostname
* all apps that auto-detects hostname is working
* Samba, Avahi, sudo, etc. doesn't have problems
* can detach and attach from the network anytime (with or without roaming), both on wired and wireless
* domain name lookups to itself doesn't conflict (i.e. by setting "mymachine.example.com" as 127.0.0.1, if an app looks up its own host then gives its IP address to other machine, then it would be incorrect)

I've had several times when calling hostname returns "localhost" or similar.

Another issue is that on my fresh Ubuntu Gutsy 7.10 Server x86_64 install, I don't get "localhost.localdomain" on the /etc/hosts. I'm not sure if that's critical, but the point is this is confusing.

I don't know who is right.