Skip to content

Instantly share code, notes, and snippets.

@stevenharman
Last active August 19, 2022 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenharman/4e3aef5762cd5a9cd6c070bdd41c4956 to your computer and use it in GitHub Desktop.
Save stevenharman/4e3aef5762cd5a9cd6c070bdd41c4956 to your computer and use it in GitHub Desktop.
Enable TouchID for sudo permissions on macOS
#!/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