Script to reset all the cPanel  accounts password on the server . Use below code in script file name passwdreset.sh and execute it as root user from the shell
===========================================================
#/bin/bash
cat /etc/trueuserdomains | sort -t” ” -k2 > LIST.txt
exec 7<> LIST.txt
for i in `cat /etc/trueuserdomains | awk ‘{ print $2 }’ | sort`; do
read <&7
DAT=`mkpasswd -l 8 -C 3`
NAM=`echo $i | awk ‘{ print substr($1,3) }’`
/scripts/chpass $i “#”$DAT
echo $REPLY “#”$DAT >> pass
sleep 1
done

===========================================================