If you have MacBook Pro with Touch Bar, you can improve your experience of the command line. You can enable Touch ID to authenticate sudo.

Open the file /etc/pam.d/sudo:

sudo vi /etc/pam.d/sudo

Then add the following line.

auth       sufficient     pam_tid.so

Your /etc/pam.d/sudo should now like this:

# sudo: auth account password session
auth       sufficient     pam_smartcard.so
auth       sufficient     pam_tid.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

If you use sudo now, you will be asked for your fingerprint.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.