A reseller is sold a plan that includes up to 50 accounts and access to the silver and gold packages. The reseller creates 80 accounts, half on a package they were never supposed to sell. The team finds out from billing — the reseller is over their account allotment, sold packages outside their entitlement, and there’s no automated enforcement of either limit. WHM’s reseller limit controls exist but require setting on the reseller record; without them, a reseller can create as many accounts on as many packages as their ACLs permit.
What’s happening
A reseller record in /var/cpanel/resellers is a flat list of usernames; the limits are stored separately in /var/cpanel/resellers-nameservers (for nameserver configuration), the reseller’s own user file /var/cpanel/users/acmevpn for bandwidth/quota aggregates, and a per-reseller config that defines which packages they can create from. The “max number of accounts” limit is a single number; the “allowed packages” is a list; both must be set explicitly or both are unlimited.
How to verify
Audit a reseller’s current limits and their actual count:
whmapi1 get_reseller_data user=acmevpn
whmapi1 listaccts search=acmevpn searchtype=owner | grep -c '^acct='
whmapi1 list_packages
whmapi1 listpkgsforreseller reseller=acmevpn
cat /var/cpanel/resellers-package-restrictions/acmevpn 2>/dev/null
The get_reseller_data shows configured limits. The count of accounts they actually own should be at or below the limit. The list of packages they’re allowed should be a subset of the global list.
The fix
- Set the account-count limit:
whmapi1 setresellerlimits user=acmevpn account_limit=50. Once set, attempts to create the 51st account return an error. - Set the allowed package list:
whmapi1 setresellerpackagelimit reseller=acmevpn package=silver allowed=1for each package the reseller may sell;allowed=0for those they may not. The default after creation is “all packages allowed”. - Set bandwidth and disk aggregates:
whmapi1 setresellerlimits user=acmevpn bwlimit=10737418240 diskquota=53687091200. These cap the sum across all the reseller’s accounts. - For existing resellers exceeding the new limits, the system does not auto-suspend — it just refuses new creates. To bring them into compliance, work through their account list with them and either remove or transfer overage accounts.
- Audit quarterly with a script that compares
get_reseller_datato the actual usage. Any reseller above 80% of their limit is a candidate for a conversation about upsell or housekeeping.
For shops with significant reseller business, Stack Harbor’s agency partner practice scripts the reseller-limit enforcement so the policy at sale matches the policy in WHM automatically.