Portal Home > Knowledgebase > Articles Database > how to change cpanel&ftp password ?


how to change cpanel&ftp password ?




Posted by xserverx, 12-29-2009, 06:36 PM
Hello I have most of my users on my server had easy passwords sow every one can find the password easly how to change all users cpanel&ftp passwords for all users from ssh ? thank you

Posted by tix3, 12-29-2009, 06:57 PM
there is no automatic way. You have to write a script that uses the change function available in the /scripts directory

Posted by DigitalLinx, 12-29-2009, 07:04 PM
I do not believe there is a cpanel command line script to change ftp user's password, unless I'm missing something cPanel uses virtual users for either pureftp or proftpd daemons rather than system, so all the users should be in a mysql database/file. Would have to dig around a bit to see how cpanel actually handles ftp authentication.

Posted by madaboutlinux, 12-30-2009, 11:31 AM
You can use the chpass script to change the cPanel password of all the accounts but the new password won't be applicable to Ftp users. You have to sync the new passwords from WHM >> cPanel >> "Synchronize FTP Passwords" section. The syntax to change the cPanel password for a user is

Posted by jalapeno55, 12-30-2009, 12:11 PM
Create a data file and random password using php, then use chpasswd to change all the passwords, and then sync the ftp passwords.

Posted by cPanelDavidG, 12-30-2009, 02:20 PM
In addition to all of the above advice, I also recommend going to WHM -> Security Center (WHM -> Security -> Security Center on older versions of cPanel/WHM) and click on Password Strength Configuration to enforce a minimum password strength. We recommend a strength of at least 50. This will help curb the use of easily guessed passwords. In the version 11.25 release notes, we provide recommended security settings you may want to also consider implementing.

Posted by linux_crazy, 12-30-2009, 02:22 PM
if you are root you can do this via writing a shell script for changing cpanel passwords.

Posted by ianeeshps, 12-31-2009, 04:24 PM
yup it is possible via a simple script. You need to have mkpasswd utility in server. most of the server will have this as shadow is already installed. try this script, #! /bin/bash for i in `awk -F: '{print $2}' /etc/trueuserdomains` do tmp=`mkpasswd -s 0` /scripts/chpass $i $tmp echo "$i $tmp" >> newpasswds done save this in a .sh or some file and give exec perm chmod +x filename and then run it you will get all new users and passwords from newpasswds file in running location. email me @ ianeeshps@gmail.com if you need any changes to this. i will do it for u



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
VB Help (Views: 651)


Language: