Enable TouchID for sudo in iTerm 2/3

  • by

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:

  1. 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
  2. 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.
Obrazek posiada pusty atrybut alt; plik o nazwie 1.png
iTerm2 -> Preferences…
Obrazek posiada pusty atrybut alt; plik o nazwie 2.png
Setting – Allow sessions to survive logging out and back in.

Leave a Reply

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