Cloud Linux, CPanel / WHM

whmapi to list users accounts using SSH.

If you want to list the all the accounts username using SSH then run below command.

whmapi1 list_users

It will show list of all the accounts hosted on the server. It will show output like below:

[[email protected] ~]# whmapi1 list_users
--- 
data: 
  users: 
    - abcded
    - dfgdfgdfg
    - dfgdfgdfg
    - rtytryrty
    - gfhjgfhj
    - fghfghfgh
    - iopuiopyuio
    - ghjkhjkhjk
metadata: 
  command: list_users
  reason: OK
  result: 1
  version: 1
[[email protected] ~]#