PDA

View Full Version : hostname reverted back to initial setup after reboot



vod
11-12-2005, 11:40 AM
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

jmstacey
11-12-2005, 02:59 PM
What Operating system?
Change it manually.

vod
11-12-2005, 07:44 PM
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.

jaredroussel
11-14-2005, 06:55 AM
Is this by chance a VPS? If so, your provider may need to update your hostname in your Virtual Environment.