How to Count and List all users on cPanel, Plesk, CyberPanel or DirectAdmin

How to Count and List all users on cPanel, Plesk, CyberPanel or DirectAdmin

cPanel

To count users, run the following command:

grep -Po '^(?<!#)\s\w+\s(?=:)' /etc/userplans | wc -l

Also, it may be useful to list users. To do so, run the following command:

cut -d":" -f1 /etc/userplans | sort -n | uniq

Plesk

To count users, run the following command:

plesk db "SELECT COUNT(DISTINCT cl_id) FROM domains"

DirectAdmin

To count users, run the following command:

cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq | wc -l

Also, it may be useful to list users. To do so, run the following command:

cut -d":" -f2 /etc/virtual/domainowners | sort -n | uniq

CyberPanel

To count users, run the following command:

cat /etc/passwd
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.