From: Bennett Haselton on
I have a CentOS 5.4 machine that resets its hostname to
"wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
tried setting the hostname to something else while the machine is
running.

After I change it to what I want with the "hostname www.candyshadow.com"
command, the "hostname" command does indeed give:
[root(a)www ~]# hostname
www.candyshadow.com
as its output. However next time I reboot the machine it will be back
to giving me "wyzantdb1.wyzant.net" as the output.

All of the Google results I've found refer to the /etc/hosts file,
the /etc/hostname file or the /etc/sysconfig/network file, but on my
machine, none of those contain the string "wyzant". The contents of
those files are:

[root(a)www ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
69.63.181.12 www.facebook.com

[root(a)www ~]# cat /etc/hostname
www.candyshadow.com[root(a)www ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAY=66.232.103.1
[root(a)www ~]#

So where else could the hostname be stored?
From: Greg Russell on
On Mon, 05 Apr 2010 00:09:52 -0700, Bennett Haselton wrote:

> I have a CentOS 5.4 machine that resets its hostname to
> "wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
> tried setting the hostname to something else while the machine is
> running.
>
> After I change it to what I want with the "hostname www.candyshadow.com"
> command, the "hostname" command does indeed give: [root(a)www ~]# hostname
> www.candyshadow.com
> as its output. However next time I reboot the machine it will be back
> to giving me "wyzantdb1.wyzant.net" as the output.
>
> All of the Google results I've found refer to the /etc/hosts file, the
> /etc/hostname file or the /etc/sysconfig/network file, but on my
> machine, none of those contain the string "wyzant".
....
> So where else could the hostname be stored?

/etc/sysconfig/network
/etc/sysconfig/networking/profiles/default/network
/etc/sysconfig/networking/profiles/default/hosts