Created
July 5, 2020 07:59
-
-
Save zzh1996/434df3c17f65e5f2222c7eb39eb648b3 to your computer and use it in GitHub Desktop.
Enable sudo with Touch ID on macOS
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 | |
set -e | |
set -x | |
set -u | |
set -o pipefail | |
f="/etc/pam.d/sudo" | |
/bin/cat "$f" | /usr/bin/grep pam_tid && exit | |
/bin/chmod +w "$f" | |
/usr/bin/sed -i '' '2i\'$'\n''auth sufficient pam_tid.so'$'\n' "$f" | |
/bin/chmod -w "$f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment