How to get a list of all cPanel users under a specific re-seller via command line – WHM/cPanel server

If you wish to list all cpanel accounts under specific re-seller , Then its very simple to list all cPanel users name via command line interface.

There is a file ‘/etc/trueuserowners‘ in your WHM server which has the record of all cPanel username and it’s owner’s name details.

List all users under a reseller account

Please follow the steps below to list out all cPanel accounts for a specific reseller account:

Step 1 : SSH to your server via putty as root user.

Step 2 : You can use the grep command to list all users’ name from /etc/trueuserowners file.

grep $Re-seller's-name /etc/trueuserowners | cut -d : -f 1

That’s all.