The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hostname keeps resetting

Discussion in 'General Discussion' started by sierra_k, Oct 21, 2003.

  1. sierra_k

    sierra_k Member

    Joined:
    Jul 29, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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
     
    #1 sierra_k, Oct 21, 2003
    Last edited: Oct 21, 2003
  2. erobs

    erobs Well-Known Member

    Joined:
    Nov 24, 2002
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    Are you on a VPS?
     
  3. sierra_k

    sierra_k Member

    Joined:
    Jul 29, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    151
    yes, will that make a difference?
     
  4. erobs

    erobs Well-Known Member

    Joined:
    Nov 24, 2002
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    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
     
  5. iain-uk

    iain-uk Member

    Joined:
    Jul 16, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    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 :)
     
  6. iain-uk

    iain-uk Member

    Joined:
    Jul 16, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    edinburgh, scotland, uk
    Stick your hostname into the web host manager not with the "-v" incase i made it sound confusing, hope that helps.
     
  7. sierra_k

    sierra_k Member

    Joined:
    Jul 29, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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
     
  8. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    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
     
Loading...

Share This Page