hostname reverted back to initial setup after reboot

vod

Verified User
Joined
Oct 25, 2005
Messages
129
Hi guys,

i changed the hostname through directadmin and issued a hostname command through ssh. the hostname changed prefectly. in order to make sure everything is correct, i rebooted the box through directadmin. once rebooted, the hostname reverted back to the initial hostname defined during setup.

my /etc/hosts now look like this

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
myip oldhostname.mydomain.com
myip newhostname.mydomain.com

any idea whats wrong with this and how to fix this?

thanks a lot
 
centos 3.

how to change it manually? remove the old entry from the hosts file?

fyi, DA control panel is showing the new hostname however ssh 'hostname" showing old hostname. if i change the hostname again through DA, the hostname will get changed. but a reboot will destroy everything and revert it back to old hostname again.
 
Is this by chance a VPS? If so, your provider may need to update your hostname in your Virtual Environment.
 
Back
Top