Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    91

    Default change all user cpanel password

    how to change all user cpanel password for 300 users in one time using SSH or WHM ?

    any simple script

  2. #2
    BANNED
    Join Date
    Aug 2009
    Posts
    83

    Default Re: change all user cpanel password

    Hello,

    There is not a method within cPanel or WHM to mass change account passwords. This would more than likely need to be done manually by you on an account by account basis unless you feel comfortable enough writing a script that utilizes the 'passwd' command in a loop for every user on the server.

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: change all user cpanel password

    Hello,

    I wanted to further mention that if you use passwd, it doesn't sync up the FTP passwords for the users either, so you should instead be calling the following to change the passwords:

    Code:
    /scripts/realchpass username password
    Additionally, this script does not handle the MySQL password any longer and you then need to call this script to change the MySQL password for the user:

    Code:
    /scripts/mysqlpasswd username password
    For both of the above examples, username is the cPanel username and password is the MySQL password.

    Again, to re-iterate, please do not use passwd for changing passwords, the cPanel and FTP passwords are handled by /scripts/realchpass and the MySQL passwords are handled by /scripts/mysqlpasswd scripts. If you use passwd, then only the cPanel password will change and not be synced with the FTP or MySQL passwords. If you use only /scripts/realchpass, then the MySQL password won't be changed. You must use both scripts to get the password changed for all 3 services.

    Thanks.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  4. #4
    Member
    Join Date
    Jun 2007
    Posts
    150

    Default Re: change all user cpanel password

    FYI: This alone will not work. I ran /scripts/realcphass username password for a bunch of accounts that were compromised via FTP. But afterwards was still able to log in with the old password. Not until I went into WHM and ran "Synchronize FTP Passwords" did it work. After that the old password no longer worked, and the new one did.

    Posting this in case anyone else runs into this problem.

  5. #5
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,066

    Default Re: change all user cpanel password

    In addition, you can force cPanel users to change their own passwords by clicking, in the WebHost Manager, Main >> Account Functions >> Force Password Change. You can use this to force some or all cPanel users to change their passwords the next time they log in.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

Similar Threads & Tags
Similar threads

  1. Change Cpanel user password
    By melvin in forum cPanel Developers
    Replies: 1
    Last Post: 09-20-2010, 12:20 AM
  2. how to change password of database user from cpanel?
    By giuly in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-10-2009, 06:01 PM
  3. cPanel user can't change password
    By robert420 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-11-2008, 05:56 PM
  4. 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
  5. Change CPanel/MySQL password for user at the same time
    By monks in forum New User Questions
    Replies: 1
    Last Post: 03-15-2006, 08:45 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube