Skip to content

Instantly share code, notes, and snippets.

@uhlhosting
Created January 20, 2016 23:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uhlhosting/650fafff489331a5508e to your computer and use it in GitHub Desktop.
Save uhlhosting/650fafff489331a5508e to your computer and use it in GitHub Desktop.
Change password for all cpanel users
ls -1 /var/cpanel/users | while read user; do
pass=`</dev/urandom tr -dc "A-Za-z0-9*-/+.*=_\|\\#" | head -c16`
echo "$user $pass" >> passwords.txt
/scripts/realchpass $user $pass
/scripts/ftpupdate
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment