sierra_k

Member
Jul 29, 2003
6
0
151
Hey everyone. I need to change my hostname from

mydomain.com to hostname.mydomain.com

I use the "Change hostname" option in WHM and it says its changed but after reboot it reverts to the old hostname.

I was reading on here that you have to manually change the hostname. So I edited these files and saved them

/etc/resolv.conf
/etc/hosts
/etc/sysconfig/network

I manually saved the "network" file with the new hostname and verified it. However after REBOOT it changed the file back to its original state with the old hostname. Im banging my head against a wall. Anyone know what Im missing or failing to do?

Thanks
Shawn
 
Last edited:

erobs

Well-Known Member
Nov 24, 2002
48
0
156
It did for me. I have a site on a servint vps. There must be something in there vps config that changes it back. I finally contact there support asking about it and they corrected the issue and told me to be sure and let them know if I change the hostname again.

Rob
 

iain-uk

Member
Jul 16, 2003
19
0
151
edinburgh, scotland, uk
Hey sierra,

Changing the hostname isnt something thats always made obvious, instead of editting them files its actually a lot easier.

SSH into your box as root (or anyone then use su) then type "hostname your.host.name.here -v" then it will store, also stick that into the change hostname function in web host manager then its all done :)
 

iain-uk

Member
Jul 16, 2003
19
0
151
edinburgh, scotland, uk
Originally posted by iain-uk
Hey sierra,

Changing the hostname isnt something thats always made obvious, instead of editting them files its actually a lot easier.

SSH into your box as root (or anyone then use su) then type "hostname your.host.name.here -v" then it will store, also stick that into the change hostname function in web host manager then its all done :)
Stick your hostname into the web host manager not with the "-v" incase i made it sound confusing, hope that helps.
 

sierra_k

Member
Jul 29, 2003
6
0
151
Thanks man, Ill try that! Unfortunately I wont know if it worked until I reboot the next time and see if the hostname reset. But I will keep you updated

Thanks Again!
SK
 

kmsd

Well-Known Member
May 21, 2003
73
0
156
I had the same issue with ServInt VPS, it took several nights of the CPanel cron update before ServInt found the issue and fixed it for good, but, since they fixed it no issues.

Thanks,
kmsd