When working in a terminal (iTerm), continuously entering a long secure password can be oppressive. Macbook’s Pro equipped with TouchBar have TouchID this is a fingerprint reader. It’s possible in macOS Catalina (10.15) to use TouchID into sudo operations.
Enabling it’s very easy:
- Open in text editor file
/etc/pam.d/sudo
sudo nano /etc/pam.d/sudo
add (at the top) line:auth sufficient pam_tid.so
- Go to iTerm (iTerm2 -> Preferences…) – or use shortcut cmd and comma
⌘,
im Advanced tab scroll to category Session i change Allow sessions to survive logging out and back in. to No.
Super useful, only wish it persisted after Mac OS updates. I’ve had to add this line back a few times to the file, at least I’m pretty sure the updates are overwriting the file when Mac updates to a new minor version.