Thursday, 24 October 2013

Script to Change the Passwords of all Cpanel Accounts


Copy and paste the following into the file.
 
==========
#! /bin/bash
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
/scripts/ftpupdate
done
==========
 
Give execute permission to the file.
chmod +x changepass.sh
Execute
sh changepass.sh



No comments:

Post a Comment