Unlock "sudo" with TouchID on your Mac
January 4, 2024
#macos #touchid
Since I got my Magic Keybord with integrated TouchID, I don't rely on my password anymore to authenticate myself on my local machine. So I thought why not enable it for "sudo" commands in the Terminal as well?
Here is how:
Copy sudo_local file
sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
Edit sudo_local file
Uncomment the following line in the newly copied sudo_local
file (e.g. with sudo vi /etc/pam.d/sudo_local
):
auth sufficient pam_tid.so
Save the file, and voilà!
You might have to exit
your current shell or open a new one before it works
🚀 If you liked this article, follow me on Twitter. That is where I am most active.
📸 Photo by Midjourney (prompts by Marc Backes)