Introduction:
There may be an occasion where you need to generate a one-time login URL (AKA a login session) to any of the cPanel-related interfaces (WHM/cPanel/Webmail). This capability is built into your cPanel installation and can be achieved in a few different ways.
Procedure:
When logged into SSH as the root user, use the create_user_session API call to generate a login session for the desired service:
- Creating a login session for WHM:
whmapi1 create_user_session user=root service=whostmgrd
As a shortcut, you can also run the following script:/scripts/whmlogin
- Creating a login session for a cPanel user:
whmapi1 create_user_session user=cptest service=cpaneld
- Creating a login session for webmail:
whmapi1 create_user_session user=test@cptest.tld service=webmaild
The command generates a one-time use link to be pasted into your browser. If the session is not used within 15 minutes, it expires automatically.
Comments
0 comments
Article is closed for comments.