Access cPanel/WHM Without Password

cPanel is the most commonly used panel for Linux servers which provides an easy to use user interface. The Web Host Manager (WHM) is a powerful program that allows us to administer the server. cPanel is the site management panel where each individual account can be controlled by the owner of that particular account.

The WHM portal is mainly accessible through http://IP-address:2086 or https://IP-address:2087 with “root” as Username and password as the server root Password. cPanel is accessible through http://IP-address:2082 or https://IP-address:2083 with the exact account username and password. 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.

 

 

Create WHM root session by using whmapi1 command

You can simply create a temporary WHM root session by doing the following in the cli.

# whmapi1 create_user_session user=root service=whostmgrd locale=en

The output will be as the following:

data:

cp_security_token: /cpsess7930048577

expires: ‘1491540516’

locale: en

service: whostmgrd

session: root:LCKz_G4ZISNdw77u:create_user_session,96b5e9c677a842314de146743ed1b030

url:https://server.demo.com:2087/cpsess7930048577/login/?locale=en&session=root%3aLCKz_G4ZISNdw77u%3acreate_user_session%2c96b5e9c677a84234h45h6743ed1b030

metadata:

command: create_user_session

reason: Created session

result: 1

version: 1

Just copy the WHM URL and paste it into the browser and this allows you to access WHM without entering the password. This is a one-time user session to access the WHM panel. If you want to access the reseller WHM account just change the “user” name as reseller account username from the root.

# whmapi1 create_user_session user=reseller service=whostmgrd locale=en

 

Create cPanel user session by using whmapi1 command

To create cPanel account user session you can execute below command and copy the URL and paste it on the browser, this will allow you to access cPanel account for that particular user without entering password.

# whmapi1 create_user_session user=myowndom service=cpaneld locale=en

The output will be as the following:

data:

cp_security_token: /cpsess5912188631

expires: ‘1491539384’

locale: en

service: cpaneld

session: myowndom:ROD5U7R74EF3G3e0:create_user_session,c9ffbc44e75b866374096d78c1726f02

url:https://server.demo.com:2083/cpsess5912188631/login/?  locale=en&session=myowndom%3aROD5U7R74EF3G3e0%3acreate_user_session%2cc9ffbc44e756352g4526d78c1726f02

metadata:

command: create_user_session

reason: Created session

result: 1

version: 1

 

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