frenziedfox

Well-Known Member
Mar 9, 2010
49
10
58
Hi,

A while back I had an issue where the server hostname had been set as one of the user domains and it caused some mail routing issues. It seems the problem has come back to haunt me.

Every time the server is rebooted it resets the hostname back to the wrong domain.

If I correct it in WHM 'Change Hostname' it puts the correct entries in /etc/hosts and /etc/sysconfig/network as you'd expect.

But after a reboot the hostname has changed back to the wrong one in all the above files and in WHM!

I can't figure out where it is getting this from!

any ideas?

thanks,

Alex
 

WiredTree Joe

Well-Known Member
Dec 13, 2006
68
1
158
Chicago, IL
Is your server a VPS? If you don't change the hostname on the parent hardware node, it will get reset back to the old on reboot in most cases. If it is a VPS, have your provider make the hostname change for you on the parent node so it stays how you want it through reboots.
 

frenziedfox

Well-Known Member
Mar 9, 2010
49
10
58
Hi Joe,

Thanks for your reply. Yes, it's running in a Xen virtual environment.

I had considered this may be the case, however it let me change the hostname to the wrong one in the first place a couple of months back, it's just now that it won't let me change it back for some reason!

I'll contact the hosts, I suppose it's possible they have changed the config?

In the meantime I have got around it by doing a chattr +i to /etc/hosts and /etc/sysconfig/network

thanks,

Alex
 

frenziedfox

Well-Known Member
Mar 9, 2010
49
10
58
Just a quick update... it was indeed a setting on the control panel page provided by our hosts that was resetting the hostname. It was taking the hostname from a reverse DNS setting that I had overlooked!

Problem now solved.

Thanks again for your assistance.

Alex