On macOS Sonoma and newer, sudo still defaults to password authentication.
If your Mac has Touch ID, you can enable fingerprint approval with a local PAM config that persists across updates.
Enable Touch ID for sudo
Open
/etc/pam.dand confirm the template file exists.$ cd /etc/pam.d $ ls -l sudo* .r--r--r-- 283 root 16 Sep 15:28 sudo .r--r--r-- 179 root 16 Sep 15:28 sudo_local.templateCreate
sudo_localfrom the template.sudo cp sudo_local.template sudo_localEdit
sudo_local.sudo -e sudo_localUncomment the Touch ID line so the file includes:
/etc/pam.d/sudo_local# sudo_local: local config file which survives system update and is included for sudo # uncomment following line to enable Touch ID for sudo auth sufficient pam_tid.so
Verify
Open a new terminal session and run any sudo command. You should get a Touch ID prompt instead of password-only auth.
Troubleshooting
- Re-check
/etc/pam.d/sudo_localand confirmpam_tid.sois uncommented. - If you want to revert, comment the
pam_tid.soline again.
Further reading: Allow Touch ID for sudo (Apple Support)