nkthen Posted March 13, 2008 Share Posted March 13, 2008 I am having issues with trying to update the client's cPanel login ID and password via WHMCS. I cannot update the password for cPanel login at all, even though WHMCS said that the password is updated but still reflecting the old password in the console. Can I know what happened? Also, I wanted to know if I change the password DIRECTLY at cPanel, will WHMCS know about it? 0 Quote Link to comment Share on other sites More sharing options...
mm1250 Posted March 13, 2008 Share Posted March 13, 2008 No, WHMCS does not sync the cPanel password if the user changes it in cPanel. What we did was just remove the change password button in cPanel so if they ever need to change the password they have to login to WHMCS to do it. Only way at the moment to control it. 0 Quote Link to comment Share on other sites More sharing options...
nkthen Posted March 13, 2008 Author Share Posted March 13, 2008 No, WHMCS does not sync the cPanel password if the user changes it in cPanel. What we did was just remove the change password button in cPanel so if they ever need to change the password they have to login to WHMCS to do it. Only way at the moment to control it. Remove password button at cPanel... Good idea. But I still have the problems of updating password from WHMCS to cPanel. Any help? 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted March 13, 2008 Share Posted March 13, 2008 i don't think this is possible at this time. afaik, the cpanel passwords are not available in raw format but well encrypted and WHMCS doesn't have a module(or the ability) to decrypt them yet. 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted March 13, 2008 Share Posted March 13, 2008 Remove password button at cPanel... Good idea. But I still have the problems of updating password from WHMCS to cPanel. Any help? 1. Open product details 2. Change the password in the box 3. Click save changes 4. Click change password 0 Quote Link to comment Share on other sites More sharing options...
nkthen Posted March 14, 2008 Author Share Posted March 14, 2008 1. Open product details2. Change the password in the box 3. Click save changes 4. Click change password Hi, that's what I've tried. The problem faced is: the password remains unchanged in WHMCS and the password is not change in cPanel side. But WHMCS gave a message that says "Password changed". Hmm... 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted April 4, 2008 Share Posted April 4, 2008 What we did was just remove the change password button in cPanel so if they ever need to change the password they have to login to WHMCS to do it. Only way at the moment to control it. Even so, this is a good idea, cause then the client can see important notices which he may have missed on email, but are published in WHMCS. And he's also one click away from the knowledge base, and ticket system if he gets stuck 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted April 8, 2008 Share Posted April 8, 2008 Ok, how do I remove the client's cPanel Change Password button? 0 Quote Link to comment Share on other sites More sharing options...
ihostct Posted April 11, 2008 Share Posted April 11, 2008 Ok, how do I remove the client's cPanel Change Password button? Were you asking about removing the change password option from within cpanel itself, or removing the option from within WHMCS? 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted April 16, 2008 Share Posted April 16, 2008 Sorry, lost track of this post... I'm looking to remove the "change password" button from cPanel. 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted April 17, 2008 Share Posted April 17, 2008 In the 'manage features' option in WHM uncheck 'Change Password' My question is, is there a way to ADD a button in their cPanel that says "Change Password" but takes them to WHMCS? 0 Quote Link to comment Share on other sites More sharing options...
ihostct Posted April 17, 2008 Share Posted April 17, 2008 In the 'manage features' option in WHM uncheck 'Change Password' My question is, is there a way to ADD a button in their cPanel that says "Change Password" but takes them to WHMCS? You would have to visit cPanel for this, as you may be able to create this type of function using a cpanel plugin: http://www.cpanel.net/plugins/devel/ I've been looking at this myself for a few other ideas I want to implement but haven't had time to investigate. 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted April 17, 2008 Share Posted April 17, 2008 Yay... now that I know how to disable the cPanel "Change Password" button, my following script makes sense and can sync your user's WHMCS and cPanel password stores. I've received a lot of help in general from this forum so far and this is me attempting to give back a little. Man, I hope that there wasn't an easier way to do this that I missed. First of all, I found the attached zip on PHPClasses.org after some serious googling. This solution uses the cPanel XMLAPI that they provide us. DISCALIMER: Please make backups of your code and since I'm just recently a PHP programmer (I'm an MSSQL DBA by day), don't cry to me if this breaks your code. Although, I'm sure there are folks here who can help if I can't. THIS ONLY WORKS WITH cPanel/WHM SERVERS. If you need this to work for Helm and resellers you can check http://forum.whmcs.com/showthread.php?t=6475 for tips on changing step 3. Also, this is just a first draft and it could use some logging/error handling... please feel free to contribute to this cause if you like. STEPS: 1) As stated before, log into WHM and under 'Feature Manager' option select the appropriate feature list(s) and then uncheck 'Password Change'. (has to be done since I only know how to sync one direction... WHMCS to cPanel) 2) Upload whm.php to your "whmcs/includes" folder from the attached .zip file. 3) Open clientareaproductdetails.tpl for editing and FIND : {$serverclientarea} AND REPLACE WITH... <td width="50%" align="center"> <input class="button" type="button" onclick="window.open('https://{$server.name}:2083/login?user={$username}&pass={$password}')" value="Login to cPanel"/> <input class="button" type="button" onclick="window.open('https://{$server.name}:2096/login?user={$username}&pass={$password}')" value="Login to Webmail"/> </td> If you don't do step 3 the password changes will occur but the login buttons will be out of sync until the page is refreshed... which will give the impression the update didn't make it to cPanel. I only consider https because you should have SSL for changing passwords. 4) Add the following code to the very beginning of your clientareaproductdetails.tpl file and be sure to update the access hash and whm_user with your info: {php} global $serverchangepassword; if (isset($serverchangepassword)) { require("includes/whm.php"); // create a new instance of whm class $whm = new whm; //capture available php variables global $server; global $username; global $newserverpassword1; //locate appropriate ipaddress or server name-- whm object will use either $get_ip = "SELECT ipaddress FROM tblservers WHERE id = $server LIMIT 1"; $data = mysql_query($get_ip) or die(mysql_error()); $info = mysql_fetch_array( $data ); $ipaddress = $info['ipaddress']; //initilize the whm object $whm->init($ipaddress,'whm_user', '0a3800e67f3b05954e3ec4b7a7c4d... ------------------------------------ YOUR VERY LONG ACCESS HASH CODE ------------------------------------ ...188bee9c1cf6954378bd7d87ab2d4'); $result = $whm->passwd($username,$newserverpassword1); //Error Handling and Logging should be added here. } {/php} //---------------------------------------------------------- Hope this helps some folks. I'm planning on doing some more custom stuff along these lines to help differentiate us... but I thought this would be a good thing to share with the class since I couldn't find any other methods to do this in the forums. I'd be curious to know if it works for everyone else or not. test.zip 0 Quote Link to comment Share on other sites More sharing options...
ihostct Posted April 19, 2008 Share Posted April 19, 2008 Wow! Pretty cool! Thank you for sharing that 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted April 20, 2008 Share Posted April 20, 2008 I'm confused, you seem to be adding an already existing feature to WHMCS... When a user changes their cPanel password in WHMCS it's already sent to WHM's API. 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted April 20, 2008 Share Posted April 20, 2008 Really? LOL... figures Is there a setting required to enable it? Although I could change passwords in WHMCS, they never affected cPanel for me. I was under impression from this thread that the functionality didn't include actually updating cPanel. 0 Quote Link to comment Share on other sites More sharing options...
worsin Posted May 1, 2008 Share Posted May 1, 2008 Really? LOL... figures Is there a setting required to enable it? Although I could change passwords in WHMCS, they never affected cPanel for me. I was under impression from this thread that the functionality didn't include actually updating cPanel. I have exact same problem. When i am in admin area of WHMCS and i try to open a clients Cpanel using the link provided in the profile area it will not work. Changing password does nothing, and the link address it provides is different then the link address sent in the confirmation email. the correct link to my cpanel should be https://mydomain:2082 but in whm it takes me to https://mydomain:2087 Not sure if these are related or not. 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted May 1, 2008 Share Posted May 1, 2008 The link provided is correct - it's not a link to cPanel, it's a link to WHM where it will then automatically log you into the right account. It's the same as clicking the little cPanel icon in the accounts list in WHM. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted May 8, 2008 Share Posted May 8, 2008 When i am in admin area of WHMCS and i try to open a clients Cpanel using the link provided in the profile area it will not work You need to have logged into WHM through your browser as root/your reseller first then it will work 0 Quote Link to comment Share on other sites More sharing options...
worsin Posted May 8, 2008 Share Posted May 8, 2008 You need to have logged into WHM through your browser as root/your reseller first then it will work I have tried this and it still doesn't work. I log into my WHM and WHMCS as root using same browser and when i click the link it asks me for the USER and PASS which when i type in never works 0 Quote Link to comment Share on other sites More sharing options...
worsin Posted May 8, 2008 Share Posted May 8, 2008 Looking back i made a mistake in my original post. i had written that my links should be the correct link to my cpanel should be https://mydomain:2082 but in whm it takes me to https://mydomain:2087 Not sure if these are related or not. It should have been the correct link to my cpanel should be http://mydomain:2082 but in whm it takes me to https://mydomain:2087 Not sure if these are related or not. Notice my WHM points to a http address and the WHMCS wants to send me to a https address. Did i set something up wrong? 0 Quote Link to comment Share on other sites More sharing options...
worsin Posted May 8, 2008 Share Posted May 8, 2008 Found the setting to change WHMCS to not use SSL and also found that in the Server Settings if i use the IP address instead of the domain name i get the problems. for example what i found was WHM uses the address. http://mydomain.net:2086/xfercpanel/i3wired and if you put the ip address instead of the domain in the server settings of WHMCS it takes me to http://(ip address):2086/xfercpanel/i3wired which wont work for me. Question is, did i set something up on my server wrong by chance? Should WHM be using the IP instead of the server domain name? Seems strange that i have to put the DOMAIN name in the IP setting box for it to work when its labled IP address. Will this make a difference? 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted May 8, 2008 Share Posted May 8, 2008 You really shouldn't be using a non-ssl connection for WHM regardless - you're sending your root password in plain text. 0 Quote Link to comment Share on other sites More sharing options...
jimmy1987 Posted May 15, 2008 Share Posted May 15, 2008 I'm just using the ssl connection in the servers part, as that works fine. But if i put in a ssl link for whmcs entirely, my whmcs will just not work cause i only have one ipaddress i think. But this is a good compromise as in this way my whmcs does work fine but my whm connection is secured. 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted May 15, 2008 Share Posted May 15, 2008 A compromise in security is never a good compromise. Try telling your customers that when someone has stolen the password or session you're sending in the clear to your WHMCS installation and steals all their details. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.