Changed hostname, partial success

edigest

Active Member
Nov 24, 2010
44
0
56
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?
 

aapkapratik

Member
Oct 26, 2009
24
0
51
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