how to create user, site and DB from WHM plugin without access hash?
Hello. I need to create user, domain and DB from WHM plugin.
I know, that's possible only with XML-api, but it requires login/pass or access hash.
It seems strange, because i already logged into WHM as root and have session in url. This session is not valid for requests, sent from local script (php/curl xml api request).
I wish i could call API without any access creds.
Is this possible in the current version of cPanel? If so, how can it be accomplished?
-
If you're already logged in as root, you'll have read access to /root/.accesshash. Just load it out of the file and use it to make the API call Be warned that you should use an appconfig file to make sure your WHM plugin executes as the logged in user so that other users cannot act as root via your plugin. 0 -
Hello :) I just wanted to note the documentation on AppConfig is found here: cPanel - AppConfig Thank you. 0
Please sign in to leave a comment.
Comments
3 comments