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.

Changed hostname, partial success

Discussion in 'General Discussion' started by edigest, Dec 18, 2010.

  1. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    I changed the hostname using WHM and while /etc/hosts was updated when I receive lfd notices it still shows the old hostname, e.g., "lfd on old.hostname.com: SSH login alert".

    Is the hostname encoded in a cpanel configuration file that I can edit to fix this?
     
  2. aapkapratik

    aapkapratik Member

    Joined:
    Oct 26, 2009
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    In my opinion you should check if you've changed HostName of your server correctly.

    The HostName typically needs to be a fully qualified domain name that resolves to the server.

    Also I'd request you to please check the following files by logging in as root via SSH

    /etc/sysconfig/network
    /etc/sysconfig/network-scripts/ifcfg-eth0
    /etc/hosts

    This may vary with your particular Linux distro,but you can run a find command to locate all instances of your old hostname and if you find any configuration file with old HostName then make the necessary changes in it.

    # find /etc -type f -exec grep "OLDNAME" {} \; -print

    This way you'll come to know all the files containing server's oldhostname
     
  3. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    Correct hostname in all of the above. But ...

    Found it in a zone file.

    Thanks for the tip!
     
Loading...

Share This Page