Published Date: March 6, 2020

cPanel/WHM is the most commonly used web hosting control panel for Linux servers which provides an easy to use user interface.

The Web Host Manager (WHM) is a powerful web interface program by cPanel 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.

The 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 the 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.hostname.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 the below command and copy the URL and paste it on the browser, this will allow you to access the cPanel account for that particular user without entering a 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.hostname.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

XeonBD is a certified NOC partner of cPanel Inc here in Bangladesh. Need cPanel server license, place your order at https://www.xeonbd.com/hosting-addons/cpanel-license-price

Comments

comments

Recommended Posts
Contact Us

We'd love to hear from you, we'll get back to you soon.

Start typing and press Enter to search