Skip to content

Instantly share code, notes, and snippets.

@fraune
Last active December 27, 2023 05:49
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fraune/0831edc01fa89f46ce43b8bbc3761ac7 to your computer and use it in GitHub Desktop.
Save fraune/0831edc01fa89f46ce43b8bbc3761ac7 to your computer and use it in GitHub Desktop.
Enable a Macbook's Touch ID to authorize the `sudo` command in MacOS Terminal
sudo grep -q -F 'auth sufficient pam_tid.so' /etc/pam.d/sudo || sudo sed -i '' '2i\
auth sufficient pam_tid.so
' /etc/pam.d/sudo
@JorgeGarciaEnki
Copy link

Great, thanks!

@fatso83
Copy link

fatso83 commented Jun 15, 2023

If anyone wants to get this running in bash, try changing the read prompt:

  read -p "Touch ID is not enabled for sudo. Would you like to enable it now? [y/n]: " response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment