Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. #Changes every cPanel password on the server and stores the credentials in ~/newCredentials
  3. #$newPassword is a randomly generated password with 10 characters
  4. export ALLOW_PASSWORD_CHANGE=1
  5. 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
  6. for i in `more /tmp/usersforchpass `
  7. do
  8. newPassword='!!##kaid0559828857!!##'
  9. echo "Host/IP|$i|$newPassword" >> ~/cpanel.txt
  10. echo "" >> ~/newCredentials
  11. /scripts/chpass $i $newPassword
  12. /scripts/mysqlpasswd $i $newPassword
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement