Use Touch ID for Sudo on Mac

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • pam-watchid

    PAM plugin module that allows the Apple Watch to be used for authentication (by insidegui)

  • Very handy. But you can use your Apple Watch for sudo which is even better: [0]

    [0] https://github.com/insidegui/pam-watchid

  • pam-touchid

    Pluggable Authentication Module for TouchID enabled MacBooks (by spaghetti-)

  • Interesting, I hacked a small pam module together 4 years ago for the first generation of touch id enabled macbooks[0] and I wonder if pam_tid.so was always present and I just missed it. D'oh!

    [0] https://github.com/spaghetti-/pam-touchid

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pam_reattach

    Reattach to the user's GUI session on macOS during authentication (for Touch ID support in tmux)

  • If you run things under tmux, you'll also need this: https://github.com/fabianishere/pam_reattach

  • sudo-touchid

    A fork of `sudo` with Touch ID support.

  • I just have a setuid root sudo binary (compiled from sudo-touchid: https://github.com/mattrajca/sudo-touchid) in my home folder ~/bin. This has worked a treat across OS updates, without hacking PAM stuff. It’s extremely convenient and has probably saved me cumulative hours in typing out my long password :)

  • WSL-Hello-sudo

    Let's sudo by face recognition of Windows Hello on Windows Subsystem for Linux (WSL). It runs on both WSL 1 and WSL 2. This is a PAM module for Linux on WSL.

  • Similarly for WSL2 using Windows Hello:

    https://github.com/nullpo-head/WSL-Hello-sudo

  • sekey

    Use Touch ID / Secure Enclave for SSH Authentication!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts