ulajuhda
Beginner 2.0
salam hormat master2 disini, ijin share lagi
1. login ssh
2. generate user cpanel
3. buat file changepass.sh
4 chmod changepass.sh
5. run
6. lihat hasilnya ada di folder dimana kita menyimpan file changepass.sh dengan nama
1. login ssh
2. generate user cpanel
ls -la /home | awk '{print $3}' | grep -v root | grep -v wheel | grep -v cpanel | grep -v apache >> list.txt
3. buat file changepass.sh
#!/bin/bash
# This is script for bulk cPanel account password change
export ALLOW_PASSWORD_CHANGE=1
for i in `cat list.txt`;
do
password=`</dev/urandom tr -dc ~!@#$%^*+=?A-HJ-NP-Za-hj-km-np-z2-9 | head -c 11`
echo "$i $password" >> newpass.txt
echo "$i : $password"
/usr/local/cpanel/scripts/realchpass $i $password
/usr/local/cpanel/scripts/mysqlpasswd $i $password
done
/usr/local/cpanel/scripts/ftpupdate
echo "Rotation Complete"
echo "Have a nice day devilzc0de.id!"
4 chmod changepass.sh
chmod +x changepass.sh
5. run
sh changepass.sh
6. lihat hasilnya ada di folder dimana kita menyimpan file changepass.sh dengan nama
newpass.txt