Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    2

    Default Change CPanel/MySQL password for user at the same time

    This is my first post.

    I´ve done som searching and couldn´t find what i was looking for.
    Currently I´v got at php page in my customers cpanel that let them change their cpanel password. The php page does that with this function:

    PHP Code:
    function changepass ($host,$user,$accesshash,$usessl,$acctpass,$acctuser) {
        
    $result whmreq("/scripts/passwd?remote=1&nohtml=1&password=${acctpass}&domain=${acctuser}&user=${acctuser}&submit-domain=Change%0D%0A++++++Password",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;

    The reaseon I don´t want them to change their password via the original cpanel password page is that I want to update another DB thats located on another server with some information whenever a user change the password.

    I don´t want the user to be able to create or delete their databases och db-user so before I give a user their login/pass i set this up.

    eg.
    cpanel username: tester
    cpanel password: whatever

    mysql db: tester_tester
    mysql user: tester_tester
    mysql password: whatever

    so here comes my question.
    Is it possible to change the password for the mysqluser with a script like the one to change the cpanel password, so whenever a user change their cpanel password the mysql password also changes to the new password.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    2

    Default

    Nevermind.
    I figured out how to do it.

Similar Threads & Tags
Similar threads

  1. Replies: 0
    Last Post: 01-18-2011, 09:08 AM
  2. No users under MySQL User change DB owner password.
    By KeB in forum Database Discussions
    Replies: 1
    Last Post: 01-05-2011, 06:43 PM
  3. How can I change the password of a mysql user?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-11-2008, 05:06 AM
  4. let end user change mysql password?
    By kieranmullen in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-21-2008, 03:21 PM
  5. Change a User or Database Password ,WHM says Mysql is not installed?
    By Jedia in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-07-2004, 08:59 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube