Skip to content

Instantly share code, notes, and snippets.

@marzvrover
Last active December 20, 2020 16:24
Show Gist options
  • Save marzvrover/61f09a89134127c6e68d34f0c7bd8a90 to your computer and use it in GitHub Desktop.
Save marzvrover/61f09a89134127c6e68d34f0c7bd8a90 to your computer and use it in GitHub Desktop.
A simple tool to add Touch ID to sudo
# Write the new file
awk 'NR==2 {print "auth sufficient pam_tid.so"} 1' /etc/pam.d/sudo > /etc/pam.d/sudo.new
# Make a backup of the current file
cp /etc/pam.d/sudo /etc/pam.d/sudo.bak
# Replace the current file with the new file
mv /etc/pam.d/sudo.new /etc/pam.d/sudo
# If you need to restore the backup and do not have
# access to sudo due to the issue. Reboot into recoveryOS
# Mount your data volume
# Open the terminal and cd to
# /Volumes/<data volume>/private/etc/pam.d
# mv sudo.bak sudo
@stemount
Copy link

One would think by now with macOS 11 Big Sur that wouldn't be needed

One would think Big Sur isn't needed ;-)

I'll bookmark this thread and I'll play with Touch ID and other PAM methods that Big Sur supports on my M1 mini when I'm next out of things to do 💯

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