loading...
Cover image for How to use MacOS's Touch ID on Terminal

How to use MacOS's Touch ID on Terminal

equiman profile image Camilo Martinez Updated on ・1 min read

I know... use a fingerprint scanner and never come back. No need to write passwords, pins or patterns. But on the terminal when we use the magic word sudo ask for your password... yuck!!!

Yucky

Don't worry. It can be solved easily. Edit this file /etc/pam.d/sudo with your favorite editor. Mine is the VS Code because can deal with admin permission. Run this command on a terminal.

code /etc/pam.d/sudo

Add the following line on top

auth sufficient pam_tid.so

Easy Peasy Japanesey

Extra

On default terminal works like a charm, but on iTerm2 need an extra configuration. Go to Prefs -> Advanced -> Allow sessions to survive logging out and back in and set value to no.

Easy Peasy Japanesey

Restart and enjoy it.


That's All Folks!
Happy Coding 🖖

Buy me a cofee

Discussion

pic
Editor guide
Collapse
andresreyesdev profile image
Andrés Reyes Galgani

Gracias amigo y ¡¡Viva Colombia!!

Saludos desde Chile 🇨🇱

Collapse
equiman profile image
Camilo Martinez Author

Con gusto Andrés!

Collapse
tterb profile image
Brett Stevenson

This is great! Just what I was looking for!

Collapse
phantomfactotum profile image
phantomfactotum

Bless your soul

Collapse
gabrielbb profile image
Gabriel Basilio Brito

Works like a charm

Collapse
ben profile image
Ben Halpern

Really slick UX here