You may need to change passwords of all the cpanel accounts sometimes because of the security concerns. Following script will allow you to change the passwords of all the accounts.
1. Create and open a file “changepass.sh” in your favorite editor and add following details to it.
ls -1 /var/cpanel/users | while read user; do
pass=`</dev/urandom tr -dc “A-Za-z0-9*-/+.*=_\|\\#” | head -c16
echo “$user $pass” >> new-pass.txt
/scripts/realchpass $user $pass
2. Give executable permission to our script.
# chmod +x changepass.sh
3. Execute the script.
# sh changepass.sh
The script will change all the passwords of cPanel and ftp accounts and create text file with the name ” new-pass.txt” which contains all the new passwords.