Skip to content

Setting a sane cPanel password policy in WHM Tweak Settings

The cPanel password-strength controls that exist, where they live, and how to set values that are strict enough to matter but not so strict that customers reuse passwords elsewhere.

cPanel’s password-strength enforcement is spread across two screens. WHM > Security Center > Password Strength Configuration sets the minimum strength score for each surface (cPanel logins, email accounts, FTP, MySQL). WHM > Tweak Settings has a handful of related toggles. Used together, they prevent the Password1! problem without making customers hate you.

What’s happening

cPanel scores passwords on a 0–100 scale that approximates entropy. The default is permissive: 50 for most surfaces, 25 for some. A score of 50 admits passwords like Welcome2026 that any list-based attack will get on the first thousand tries. A score of 65 or 70 makes the score-gaming much harder but still allows memorable passphrases.

How to verify

whmapi1 get_requiredstrengths
whmapi1 get_password_strength
grep -E "(passwordstrength|minpwstrength)" /var/cpanel/cpanel.config
whmapi1 list_users | head

get_requiredstrengths returns each scoring surface and the current minimum.

The fix

  1. WHM > Security Center > Password Strength Configuration: set the minimum to 65 for cPanel logins, email accounts, FTP, and MySQL. Set 70 for any operator-tier surface.
  2. WHM > Tweak Settings: confirm Allow weak passwords is off. Confirm Auto-enable expiration on new accounts matches your policy (we use 365 days for cPanel logins, no expiration for service accounts).
  3. Reject password reuse history: cPanel does not natively prevent reuse — document this gap in the customer terms and rely on the strength score plus 2FA as the actual control.
  4. Email account passwords: every spam-relay incident we see traces to an email account with a weak password. Mail account strength is more important than cPanel login strength on a multi-tenant host.
  5. Communicate the policy change before flipping the strength threshold up. Existing customers do not get re-checked, but every password reset triggers the new minimum and they will hit it.
  6. Pair with 2FA on the cPanel login. Strength alone is not enough; 2FA covers the gap on stolen passwords. See the 2FA rollout article for the procedure.

Stack Harbor maintains password-policy baselines across managed cPanel hosts under WHM server management.