Last active
January 1, 2024 13:45
-
-
Save agmm/ffc4c0d3d0ab683bb82e00a2c50eac09 to your computer and use it in GitHub Desktop.
Script to enable Touch ID authentication for sudo commands
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/bash | |
# Script to enable Touch ID authentication for sudo | |
echo "Current config:" | |
cat /etc/pam.d/sudo | |
echo "Press ENTER to continue" | |
read | |
echo "# sudo: auth account password session | |
auth sufficient pam_tid.so | |
auth sufficient pam_smartcard.so | |
auth required pam_opendirectory.so | |
account required pam_permit.so | |
password required pam_deny.so | |
session required pam_permit.so" | sudo tee /etc/pam.d/sudo | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment