There comes a time in everyone's security life you need to rebuild a cpanel server.. i'm talking about the OS, whm/cpanel and it's modules.. not websites. I wanted to document the process I use to rebuild it:
Force an CentOS/Redhat Reinstall by:
Create an empty directory: mkdir /tempreinstall
CD into the new empty directory: cd /tempreinstall
Force a Yum update: yum reinstall *
delete the temp empty directory
Force cpanel to update with:
/scripts/upcp --force
Force the webmail systems to update with:
Roundcube:
/usr/local/cpanel/bin/update-roundcube –-force
Horde:
/usr/local/cpanel/bin/update-horde –-force
Squirrelmail
/usr/local/cpanel/bin/update-squirrelmail –-force
Reinstall MySQL:
/scripts/mysqlup --force
Your mileage may very, and you may run into issues on the OS reinstall.. so backup first.