Touch ID on MacBook for sudo

Touch ID on MacBook for sudo

This instruction will teach you how to configure pam.d to use Touch ID on your MacBook to authenticate sudo commands. This is a quicker and more convenient way to sudo while still maintaining the security of your device.

Open the Terminal app on your MacBook and run:

sudo nano /etc/pam.d/sudo

Add pam_tid as a new auth method:

auth sufficient

This is how the whole file should look like:

# sudo: auth account password session
auth       sufficient
auth       sufficient
auth       required
account    required
password   required
session    required

That's it! After following these steps, you can use Touch ID to authenticate sudo commands on your MacBook.