Seamless Sudo Access: Leveraging Touch ID Authentication on MacOS

Seamless Sudo Access: Leveraging Touch ID Authentication on MacOS

·

1 min read

In the realm of macOS, security measures play a crucial role in safeguarding sensitive operations. In this blog post, we will explore how to leverage the power of Touch ID, the fingerprint authentication feature, to streamline and fortify the security of administrative tasks performed through the sudo command. Discover how enabling Touch ID for sudo can enhance user experience, minimize typing efforts, and reinforce the security of your MacOS workflow.

Open up your terminal and enter the command

sudo nano /etc/pam.d/sudo

This will open the configuration file for sudo - PAM (Pluggable Authentication Modules)

image.png

This would be the default configuration

Add the following line to this file

auth sufficient pam_tid.so

Hit Ctrl+O and Ctrl+X. Allow if this prompts

image.png

Restart your terminal and from now on you can sudo via Touch ID

image.png