Skip to content

Instantly share code, notes, and snippets.

@zoghal
Created March 6, 2021 14:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoghal/6cb0ff17587982ae800683d27cc81c64 to your computer and use it in GitHub Desktop.
Save zoghal/6cb0ff17587982ae800683d27cc81c64 to your computer and use it in GitHub Desktop.
how to Mass Change All cPanel Account Passwords
#! /bin/bash
# auther: saleh souzanchi(github.com/zoghal)
export ALLOW_PASSWORD_CHANGE=1
ls -1 /var/cpanel/users | while read user; do
echo "START: $user "
pass=`</dev/urandom tr -dc "!@#$&A-Za-z0-9" | head -c16`
echo "$user $pass" >> passwords.txt
/scripts/realchpass $user $pass
/scripts/mysqlpasswd $user $pass
/scripts/ftpupdate
echo "END: $user "
echo "-------------------------------------------------------------"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment