hostname keeps resetting to 127.0.0.1

James Cummings cummings.james at gmail.com
Mon Jun 5 09:42:59 UTC 2006


Hiya,

Whenever I reboot a certain ubuntu server (running breezy still), the
/etc/hostname
file gets:

127.0.0.1 localhost.localdomain

prepended to it.  Note this is /etc/hostname not /etc/hosts.

This means that the login prompt, shell prompt, uname -a, and anything
which relies on hostname uses '127' or '127.0.0.1' instead of the
machine's actual name.

Manually doing a 'sudo hostname machinename.domain.name' fixes this.
However, it is a bit disconcerting.

Any suggestions on why it might be doing this and how to stop it?

Many thanks,
-James
-- 
James Cummings, Cummings dot James at GMail dot com




More information about the ubuntu-users mailing list