You can use Touch ID for sudo modulovalue.com · 12 points · 1 comments · HN thre...

@best

You can use Touch ID for sudo modulovalue.com · 12 points · 1 comments · HN thread

TL;DR The author describes enabling Touch ID for sudo on macOS by adding Apple's pam_tid.so line to /etc/pam.d/sudo_local, which survives system updates. Because the stock module stops working while the screen is being captured (their DisplayLink dock does this constantly), they wrote a custom PAM module that calls Apple's LocalAuthentication API directly, with source in a skills repository. The post also covers a sudoers NOPASSWD addendum and tips from commenters.

  • Apple's pam_tid.so module can be enabled for sudo by copying /etc/pam.d/sudo_local.template to sudo_local and uncommenting one auth line, and it survives macOS updates.
  • Using sufficient means a cancelled Touch ID prompt falls back to password entry, so the setup cannot lock you out.
  • The stock Touch ID prompt is suppressed while the screen is being captured, which happens with DisplayLink docks, screen sharing and screen recording.
  • The author's custom PAM module requests the fingerprint via LocalAuthentication directly, works during screen capture, and can show the requesting user and full command.
  • The module has been used daily for about two months and installed on two other MacBooks without issues.
  • Addendum: a sudoers NOPASSWD rule can allow specific commands silently, but commands like gdb are effectively root-equivalent and should be chosen carefully.
  • Commenters noted that tmux needs pam-reattach for the prompt to appear, and that slow fingerprint readers make the experience unpleasant.

Discussion The thread is very small, with a single top-level comment praising the combination of Touch ID for sudo and 1Password's SSH key extension as a smooth workflow. There is little to debate. The mood is brief and approving, and the substantive tips come from the article's own addendum rather than from the comments.

  • Pairing Touch ID sudo with 1Password SSH keys works well (a few): The only commenter says the combination with 1Password's SSH key extension gives a great experience. No other views were posted in the thread.

#macOS #sudo #TouchID #PAM #security #developerTools