You'll need to download the module from the link above to /usr/local/cpanel/Cpanel/LogmeIn.pmHow can we use this modual do I need to have a logmein account?
I upgraded my cPanel 11.24.4-R32603 but can't find this modual anywhere.
Thank you,
#!/usr/bin/perl
use lib '/usr/local/cpanel';
use Cpanel::LogMeIn ();
my $user = '__USERNAME__'; #or lookup from your records
my $pass = '__PASSWORD__'; #or lookup from your records
my $host = '__HOSTNAME__'; #or lookup from your records
my $service = 'cpanel'; #or whm or webmail to access those interfaces
my($login_ok,$login_message,$login_url) = Cpanel::LogMeIn::get_loggedin_url('user'=>$user,'pass'=>$pass,'hostname'=>$host,'service'=>$service,'goto_uri'=>'/');
if ($login_ok) {
print "Location: $login_url\r\n\r\n";
} else {
print "Content-type: text/plain\r\n\r\n";
print "LOGIN FAILED: $login_message\n";
}
exit (0);
This feature was added to the RELEASE tree on:Any idea when this is going to be a feature in an official release?
I was wondering if it is possible to log a user in.. without knowing the password. following is the possible scenario:This feature was added to the RELEASE tree on:
Release 32486
2008-12-19 15:50:30
You can get updates about when it is included into STABLE by subscribing to the RSS feed at cPanel - The Leading Control Panel - Change Log
I'm only trying to use this for Cpanel, not for WHM or Webmail.Well, of the top of my head - it's not going to be possible to log a user in without knowing the password (at this time).
You will have to keep a password database, however we do have hooks so this database can be kept up to date.
WritingFunctionHooks < DevHooks < TWiki
That being said, I am never an advocate of keeping a password database
Also, are you wanting this for JUST WHM or for cPanel and webmail as well?
If it's just WHM.. you could use accesshashes to log the user in.
The reason behind asking for this function is that we sell domain names as well as web hosting and we want to be able to allow users to login to cpanel by just one click? i.e. a url that can be use once to login to cpanel. User will be already logged into our website, before we give them this url, hence there is no need to authenticate the user twice.Well, of the top of my head - it's not going to be possible to log a user in without knowing the password (at this time).
You will have to keep a password database, however we do have hooks so this database can be kept up to date.
WritingFunctionHooks < DevHooks < TWiki
That being said, I am never an advocate of keeping a password database
Also, are you wanting this for JUST WHM or for cPanel and webmail as well?
If it's just WHM.. you could use accesshashes to log the user in.
Thank you sir...@goodlifeclt - you likely would want to utilize the cPanel API tools to create a new account. I'd recommend reading through the details here to get started as this is our creatacct API:
Create cPanel account · cPanel & WHM Developer Portal
This function creates a cPanel account and sets up its domain information. **Note:** * On servers that run CentOS 7, you may see a `named` warning about the absence of SPF resource records on DNS. * This warning is **not** relevant on CentOS 7 servers, because [RFC 7208 deprecated SPF...api.docs.cpanel.net