Developer from the UK, currently making cool stuff at The Outlook Creative Group.
Podcasting weekly at munchtech.tv.


Using Touch ID with sudo in Terminal

December 15, 2020

I've always found it slightly odd that when using any sudo command in Terminal on the Mac you would have to enter your password if your Mac has Touch ID. Well, after some Googling it looks like it's super simple to allow your Mac to authenticate sudo commands with Touch ID (and I assume the Apple Watch if my experience testing is anything to go by).

Run:

sudo nano /private/etc/pam.d/sudo

At the top of this file add:

auth sufficient pam_tid.so

Save and exit nano (ctrl + o, ctrl + x). That should be it! Now when you next need to use sudo, it should prompt you for Touch ID instead of your password!

Not sure if this has any downsides or long term affects yet, we'll find out!