CPanel - Change email password without logging into Cpanel

Posted by keith70, 03-14-2007, 12:48 PM
Is there a script out there that will allow a user to change their password without logging into CPanel at all? Like a reset password script for cpanel?

Posted by sscon, 03-15-2007, 03:06 PM
Very sloppy as I am at work, but should give you an idea -

Posted by host-addiction, 03-15-2007, 03:26 PM
That should work, seen i code php scripts for cpanels,

Posted by keith70, 03-15-2007, 05:04 PM
Is there any security related issues with the above way of doing it? Thanks guys for your input!!!

Posted by brendandonhu, 03-17-2007, 03:42 PM
For security you might want to connect using SSL but other than that it should be fine. I wrote a class that can do this kind of thing: http://www.phpclasses.org/browse/package/3534.html

Posted by keith70, 03-18-2007, 08:36 PM
I downloaded that class and example. It worked! Now can you give me an example in php script that would just allow the user to change their passsword? Sorry, new to all this, but you guys are very helpful!

Posted by brendandonhu, 03-18-2007, 10:59 PM
You can make an HTML form where the user enters their name and old and new passwords, then write a script to login to the account and change it. Is there a certain part you're getting stuck on?

Posted by keith70, 03-19-2007, 08:13 AM
I can do the form and pass that information to the script. But I need the example of the PHP script that uses your class to actually change the password for the account.

Posted by IsMyLittleName, 03-19-2007, 09:12 AM
thanks this should help me a little with my site

Posted by brendandonhu, 03-20-2007, 07:01 PM
To change the password you do new cPanel() to login (see the example file for the parameters), and then $cPanel->setPassword('password').

Was this answer helpful?

 Print this Article

Also Read

Have they put HW or Software RAID ??

Posted by madrilian, 04-22-2009, 02:05 AMI have recently ordered a new server and I asked for two...

how to config my domain ???

Posted by hangnguyen, 03-27-2008, 12:50 PMPlease move this post if I posted on wrong box . I...

PHP bug? PHP can't resolve domains, server can..

Posted by Drifter13, 07-23-2007, 10:51 PMHello fellow techs, I'm having a strange problem. My...

Can a server log a user out of a script?

Posted by iowaguy1, 03-19-2007, 03:07 PMI am having a site coded for me and I noticed that I get...

Please help with php coding problem

Posted by registercheaper, 03-06-2010, 01:43 AMI have the following code for a video site. I need...