Change hostname

Hello,

I would like to change the hostname on a Linux server (RHEL4).
I try different methods in vain :

  • by using hostname command
  • by changing /etc/hosts and /etc/hostname

But after restarting server, the old hostname re-appears... :confused:
And the file ./proc/sys/kernel/hostname contains again the old value (however modified after hostname command)

Any idea ?

Correction : OS version is RHEL 2.1

check under /etc/sysconfig

[root@myBOX etc]# cd /etc/sysconfig/

[root@myBOX sysconfig]# grep myBOX *
network:HOSTNAME=myBOX.domain.com

Here is a quote from the net :