By default running sudo commands is done via entering your password. If you would rather use your fingerprint to authenticate you must modify your sudo
configuration.
- Copy
/etc/pam.d/sudo_local.template
tosudo_local
sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
- Remove the comment character (
#
) from theauth
line insudo_local
# sudo_local: local config file which survives system update and is included for sudo # uncomment following line to enable Touch ID for sudo auth sufficient pam_tid.so
- Open
/etc/pam.d/sudo
in your preferred text editor - Add
auth sufficient pam_tid.so
to the list ofauth
entries# sudo: auth account password session auth sufficient pam_tid.so auth sufficient pam_smartcard.so auth required pam_opendirectory.so account required pam_permit.so password required pam_deny.so session required pam_permit.so
- Save and close the file
Note: /etc/pam.d/sudo
is a default MacOS file so it will be overwritten by system updates.
You will have to reapply this change after each time you update MacOS.