#! /bin/bash
rm New-Password.txt
echo " " >> New-Password.txt
echo " " >> New-Password.txt
echo "======================================" >> New-Password.txt
echo "Thank you for using iServerSupport.com" >> New-Password.txt
echo "======================================" >> New-Password.txt
echo " " >> New-Password.txt
echo "Passwords of all your cPanel account has changed below are the new passwords" >> New-Password.txt
echo " " >> New-Password.txt
cat /etc/domainusers|awk -F: '{print $1}' | while read user; do
pass=`</dev/urandom tr -dc A-Za-z0-9 | head -c 20`
echo $user $pass >> New-Password.txt
/scripts/realchpass $user $pass > /dev/null
/scripts/ftpupdate > /dev/null
done
echo " " >> New-Password.txt
echo " " >> New-Password.txt
cat New-Password.txt
Create a file called change password.sh and copy above contents into it
vi changepassword.sh
Give execution permission for the file
chmod +x changepassword.sh
Run the script
sh changepassword.sh
No comments:
Post a Comment