HostOnNet Blog


Find List of Resellers from Commandline in Cpanel Server

In Cpanel Server, resellers and privileges are stored in file

/var/cpanel/resellers

Content of the file look like

root@s20 [~]# cat /var/cpanel/resellers
RESELLER-USER-NAME-1:add-pkg,create-acct,create-dns,disallow-shell,edit-dns,edit-mx,edit-pkg,kill-acct,kill-dns,list-accts,park-dns,passwd,show-bandwidth,suspend-acct,upgrade-account,viewglobalpackages
RESELLER-USER-NAME-2:add-pkg,create-acct,create-dns,disallow-shell,edit-dns,edit-mx,edit-pkg,kill-acct,kill-dns,list-accts,park-dns,passwd,show-bandwidth,software-attracta,suspend-acct,upgrade-account,viewglobalpackages
hoston:create-acct,create-dns,disallow-shell,edit-dns,edit-mx,kill-acct,kill-dns,list-accts,mailcheck,news,park-dns,passwd,restart,show-bandwidth,software-ConfigServer-csf,software-attracta,ssl,ssl-buy,ssl-gencrt,stats,status,suspend-acct,upgrade-account
root@s20 [~]# 

To get list of all reseller user names, use cut command.

root@s20 [~]# cat /var/cpanel/resellers | cut -d":" -f1
RESELLER-USER-NAME-1
RESELLER-USER-NAME-2
hoston
root@s20 [~]#

Posted in Cpanel Server