TouchID for Sudo

Enable TouchID when using Sudo

Overview

Instead of having to type our password each time we use sudo we can instead use Touch ID on our mac keyboards.

Instead, we can

  • Copy the file /etc/pam.d/sudo_local.template to /etc/pam.d/sudo_local

  • Then remove the # in front of the auth like below

# /etc/pam.d/sudo_local
𝗮𝘂𝘁𝗵    𝘀𝘂𝗳𝗳𝗶𝗰𝗶𝗲𝗻𝘁   𝗽𝗮𝗺_𝘁𝗶𝗱.𝘀𝗼

Then save, and the next time you run sudo, you'll be prompted for Touch ID instead of your password.

Last updated

Was this helpful?