About WHM/cPanel WHMAPI1

Posted on August 17th, 2018

About WHM/cPanel WHMAPI1

You can access WHM/cPanel without knowing the actual password if you have shell access to the server. This can be done by executing the command “whmapi1” via Linux shell terminal. WHMAPI1 is the utility to execute WHM API calls, to perform server administration tasks, manage cPanel and WHM services and administrate cPanel and WHM reseller accounts. Please refer following KB Access cPanel/WHM Without Password to access WHM/cPanel without a password.

In this tutorial, we will discuss how to get cPanel account details via cli. If you have WHM access you can see cPanel account details via WHM. Home >>Account Functions >>Modify an Account.

From there you can see account details of the cPanel user. But this will take more time to perform these tasks. If you are a server administrator, you can find cPanel account details via command line. You will get all cPanel account details by running a single command whmapi1. As a server administrator, you can save more time by using this command.

1) Connect to the server via SSH as a root user.

2) Run the command as follows:

whmapi1 listaccts search=username searchtype=user

The “searchtype” is a parameter and if you do not specify the parameter, you will get all accounts details. By using that parameter, you will get a clean output and almost all details.

The output will be as the following.

data:

acct:

backup: 1

disklimit: 1024M

diskused: 22M

domain: domainname.com

email: [email protected]

inodeslimit: unlimited

inodesused: 1348

ip: xxx.xxx.xxx.xxx

ipv6: []

is_locked: 0

legacy_backup: 1

mailbox_format: maildir

max_defer_fail_percentage: “*unknown*”

max_email_per_hour: “*unknown*”

maxaddons: “*unknown*”

maxftp: 20

maxlst: 20

maxparked: “*unknown*”

maxpop: 20

maxsql: 20

maxsub: 20

min_defer_fail_to_trigger_protection: 5

outgoing_mail_hold: 0

outgoing_mail_suspended: 0

owner: ezonehq2

partition: home

plan: ezonehq2_1GB

shell: /usr/local/cpanel/bin/noshell

startdate: 17 Jul 19 16:17

suspended: 0

suspendreason: not suspended

suspendtime: 0

temporary: 0

theme: paper_lantern

uid: 778

unix_startdate: ‘1500459477’

user: globaltechpteltd

metadata:

command: listaccts

reason: OK

result: 1

version: 1

 

3) If you would like to know only disk usage detail run below command.

whmapi1 listaccts search=username searchtype=user | grep disk

The output will be as the following.

disklimit: 1024M

diskused: 22M

 

4) Also, you can check inode usage or particular details by using this command.

Here is the example to fetch inode details of that cPanel account.

whmapi1 listaccts search=username searchtype=user | grep inode

The output will be as the following.

inodeslimit: unlimited

inodesused: 1348

 

If you need any further assistance please contact our support department.

 

Leave a Reply