Last active
August 19, 2022 14:55
-
-
Save stevenharman/4e3aef5762cd5a9cd6c070bdd41c4956 to your computer and use it in GitHub Desktop.
Enable TouchID for sudo permissions on macOS
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
#!/usr/bin/env bash | |
if grep 'pam_tid.so' /etc/pam.d/sudo --silent; then | |
echo "TouchID is already enabled ✅" | |
else | |
echo "Enabling TouchID for sudo 🪪"; | |
sudo sed -i -e '1s;^;auth sufficient pam_tid.so\n;' /etc/pam.d/sudo | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment