Last active
June 8, 2023 22:27
-
-
Save dardo82/433e6b7930c01cadfac0a772a27aae9f to your computer and use it in GitHub Desktop.
OSX sudo helper
This file contains 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
#!/bin/sh | |
BIN="/usr/local/bin/askpass"; touch $BIN; chmod 755 $BIN | |
security add-generic-password -a $USER -s login -T "" -w | |
echo "#!/bin/sh\\nsecurity find-generic-password -a $USER -s login -w" > $BIN | |
echo "\\n# Set sudo helper.\\nexport SUDO_ASKPASS=$BIN" >> ~/.${SHELL##/*/}rc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried searching on Google as I would do? 🧑💻