Accessing cPanel/WHM without a Password
Login cPanel/WHM without a PasswordcPanel is the most commonly used panel for Linux servers and allows users to control their server with an easy-to-use interface. The Web Host Manager (WHM) is a powerful program which grants you the ability to administer the server. cPanel is the site management panel where every individual account is accessible by the owner of that specific account. You may access the WHM portal through ‘http://IP-address:2086‘ or ‘https://IP-address:2087‘ with ‘root’ as the Username. The password should be the same as the server root Password. You can access cPanel from ‘http://IP-address:2082’ or ‘https://IP-address:2083’ with the right account username and password. However there is a way to access WHM/cPanel without the correct password;. If you have shell access to the server then you can do this by running the command ‘whmapi1’ using the Linux shell terminal. WHMAPI1 is the utility to run WHM api commands which is used to run administrative tasks, manage cPanel and WHM services, as well as administrating cPanel and WHM reseller accounts. Make the WHM root session by executing the ‘whmapi1’ command You can create a temporary WHM root session by using the following in the cli.
# whmapi1 create_user_session user=root service=whostmgrd locale=enYou should receive the below output.
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: 1Copy the WHM Url and put it in the browser; then you should be able to access WHM without having to use a password. This will be a one time user session to access the WHM panel. If you would like to access the reseller WHM account simply replace the ‘user’ name as the reseller account username from the root.
# whmapi1 create_user_session user=reseller service=whostmgrd locale=enCreate a cPanel user session by using ‘whmapi1’ command. To make a cPanel account user session, you can run the command below before copying the URL and pasting it to the browser; this will grant you the ability to access cPanel for that specific user with out having to put in your password.
# whmapi1 create_user_session user=myowndom service=cpaneld locale=enYou should receive the following output:
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
Updated on 05 Mar 2018
Add a comment