Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Manually Updated Hostname Alert - WHM  (Read 5155 times)

0 Members and 1 Guest are viewing this topic.

Jithin M

  • Guest
Manually Updated Hostname Alert - WHM
« on: March 07, 2015, 08:39:51 pm »
If the cPanel server has been recently updated to version: 11.46, there are chances that an email alert with the content as shown below will be received:

=========
WHM has detected a manual hostname change.
To fix this problem, we recommend that you perform the following action:
Update your hostname in WHM (http://new.hostname.com:2087/scripts2/changehostname) interface (Home » Networking Setup » Change Hostname).
=========

If the hostname had been changed, then that means that the hostname was updated outside of WHM after cPanel was installed on that server.

To fix the issue, one will have to manually change the cPanel-configured hostname by editing the HOST definition in /etc/wwwacct.conf:


Code: [Select]
-bash-4.1# hostname
new.hostname.com


Code: [Select]
-bash-4.1# grep HOST /etc/wwwacct.conf
HOST old.hostname.com


You will be able to see that the hostname that gets displayed while running the command: 'grep HOST /etc/wwwacct.conf' will be different to the one that gets displayed while running the command: 'hostname'. So, editing the HOST definition in /etc/wwwacct.conf file will fix the issue.

Once that’s done, one can test that the server will no longer send an alert by running the hostname validation script manually:


Code: [Select]
-bash-4.1# /usr/local/cpanel/scripts/check_valid_server_hostname
OK

;)
« Last Edit: March 07, 2015, 08:42:25 pm by Jithin M »