Want to use Touch ID with sudo but annoyed that the change gets reset every time macOS updates? Here's a hacky solution to fix that!
- Compile
pam-touchid-setup.c
clang -o pam-touchid-setup pam-touchid-setup.c
- Copy the binary and set its permissions
sudo cp pam-touchid-setup /usr/local/bin/ sudo chown root:wheel /usr/local/bin/pam-touchid-setup sudo chmod 755 /usr/local/bin/pam-touchid-setup
- Open System Preferences -> Security and Privacy, go to the Privacy tab and add
/usr/local/bin/pam-touchid-setup
under "Full disk access" - Copy
sh.nhp.PAMTouchIDSetup.plist
into/Library/LaunchDaemons/
- Activate the LaunchDaemon
sudo launchctl load -w /Library/LaunchDaemons/sh.nhp.PAMTouchIDSetup.plist
Seems to work intermittently on macOS Sequoia, not sure if beta oddities or if Apple is tightening security down