No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Provost 50544f95f7 Add touchid role: enable Touch ID for sudo via sudo_local
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 10:09:50 -04:00
meta Add touchid role: enable Touch ID for sudo via sudo_local 2026-10-25 10:09:50 -04:00
tasks Add touchid role: enable Touch ID for sudo via sudo_local 2026-10-25 10:09:50 -04:00
.gitignore Add touchid role: enable Touch ID for sudo via sudo_local 2026-10-25 10:09:50 -04:00
README.md Add touchid role: enable Touch ID for sudo via sudo_local 2026-10-25 10:09:50 -04:00

touchid

Enables Touch ID for sudo on macOS by adding pam_tid.so to /etc/pam.d/sudo_local.

sudo_local (macOS Sonoma and later) survives OS updates, unlike editing /etc/pam.d/sudo directly. The lineinfile regexp also matches the commented-out template line, and leaves other lines (e.g. pam_reattach for tmux) untouched.

Requirements

  • macOS 14 (Sonoma) or later.
  • Privilege escalation: run with -K/--ask-become-pass (or have passwordless sudo), since the task writes to /etc/pam.d.

Role Variables

None. The task is skipped on hosts that aren't macOS.

Example Playbook

- hosts: anubis
  roles:
    - role: touchid

Notes

  • Tagged touchid.
  • Touch ID does not work over plain ssh sessions; inside tmux it needs pam_reattach.