The WHM/cPanel can be accessed 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. If you have the shell access through SSH Keypair or using VPS nodes on the server, you can simply access the WHM panel without knowing the actual root password of the server.
I am going to explain the steps to create a session to access the WHM panel for root or any reseller accounts without a password.
This can be done by executing the “whmapi1” command via Linux Shell. WHM API 1 accesses the WHM interface’s features. You can make use of this API to administrate cPanel and WHM reseller accounts, perform server administration tasks and manage cPanel & WHM services.
Whmapi command to create a WHM root session from the command line.
By executing the following command you can create a temporary root WHM session:
# whmapi1 create_user_session user=root service=whostmgrd
The output will be as the following:
CT-xxxxxxxxx-bash-4.2# whmapi1 create_user_session user=root service=whostmgrd
reason: Created session
This is a one-time-use session to access WHM panel. You can paste the WHM URL in the browser which would in turn bypass the need to enter a root password.
Create a WHM session for reseller account
# whmapi1 create_user_session user=USERNAME service=cpaneld
Replace USERNAME with the exact cPanel username.
This is a one-time-use session to access WHM/cPanel panel. The system destroys the temporary session after 15 minutes of inactivity.