During the times when you need to change multiple account passwords on a cPanel server, the script below helps to change passwords of all the accounts in cPanel:
#!/bin/bash
export ALLOW_PASSWORD_CHANGE=1
for i in `cat /etc/trueuserdomains | cut -d " " -f 2`;
do
pass=`openssl rand -base64 128 | head -c16 | xargs`
echo $i:$pass >> pass.txt
/scripts/realchpass $i $pass;
done;
/scripts/ftpupdate
Cheers