Skip to content

Account audit on cPanel takeover: what was the previous admin doing?

Inheriting a cPanel server means accepting whatever the last admin left behind. A two-hour audit before the first ticket lands tells you what you signed up for.

Taking over a cPanel server from another admin means you accept whatever they were doing — including the things they were doing badly. The audit window is small: the first ticket lands within days, and from that moment you are firefighting. A focused two-hour audit before normal operations resume tells you which surprises are coming and gives you the documentation the previous admin probably did not leave.

What’s happening

Every cPanel server accumulates: accounts with unusual quotas, mail forwarders to long-dead domains, custom Exim filters, modified WHM configurations, license drift, and cron jobs running as root that nobody documented. None of this is visible from the WHM dashboard. It is visible only from the command line, and only if you know where to look. Skipping the audit means inheriting all of it without knowing it.

How to verify

Run these as root on the inherited host:

# accounts and their owners
whmapi1 listaccts | grep -E "user|partition|owner"
# packages and resellers
whmapi1 listpkgs
whmapi1 listresellers
# resource limits and overrides
ls /var/cpanel/users
grep ^MAILBOX_FORMAT /var/cpanel/cpanel.config
# scheduled tasks at root and per-user
crontab -l
for u in /var/spool/cron/*; do echo "==> $u"; cat $u; done
# Exim customizations
ls /etc/exim.conf.local /etc/exim.conf.localopts 2>/dev/null
# AutoSSL state
whmapi1 get_autossl_problems

The fix

  1. Capture the inventory — paste the output of the above into a single document. This becomes the takeover artifact and the baseline for change tracking.
  2. Look for anomalies — accounts with no recent login (last -F | awk '{print $1}' | sort -u), mail forwarders that send outside the domain, cron jobs running as root that touch /home, packages with unlimited quotas.
  3. Check for shadow access — cat /root/.ssh/authorized_keys, look for non-root sudoers in /etc/sudoers.d/, check /etc/passwd for users with shell access that should not have it.
  4. License and updates — /usr/local/cpanel/cpkeyclt, /scripts/upcp --force if behind by more than a minor version. Schedule the catch-up for off-hours.
  5. Document the unknowns — anything you cannot explain (a script in /root/, an empty database with grants, a parked domain pointing at an unknown IP) goes into the unknowns list. Discuss before deleting.

The audit output is the artifact you give the customer or executive sponsor to show what they actually inherited. Stack Harbor delivers this audit as the first deliverable of cPanel server management — start a conversation when a takeover is on the calendar.