Last active
March 25, 2022 09:30
-
-
Save s1037989/83006e40f0cdf482c06bf850f0ba8c7a to your computer and use it in GitHub Desktop.
security log for sudo use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sudo { local sudo=$(which sudo) what; sudo -v || return; whatis $1 &>/dev/null && what=$(whatis $1 | perl -pE 's/^.*?- //') || while :; do what=$(zenity --entry --title "Sudo Log" --text "What are you doing with \$($*)") && [ ${#what} -ge 5 ] && break; done; echo "Security Log: $what | sudo $*" | logger; $sudo -E $*; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment