Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Argument is the default password to check for every user listed in /etc/shadow file
  4.  
  5. while IFS= read -r line
  6. do
  7. IFS=':' read -r -a elem <<< "$line"
  8. username="${elem[0]}"
  9. password="${elem[1]}"
  10. IFS='$' read -r -a passelem <<< "$password"
  11.  
  12. done < "/etc/shadow"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement