Touch ID when "wants to make changes"

How can I use Touch ID for messages like this? osascript wants to make changes


Solution 1:

For sudo to accept Touch ID for authentication, you'll need to configure your Pluggable Authentication Modules (PAM) system to accept the Touch ID authentication module.

Edit /etc/pam.d/sudo and add the following to the top of the list:

auth    sufficient  pam_tid.so

When osascript ‘wants to make changes’, likely because of a ‘with administrator privileges’ modifier, it uses the same authentication as ‘sudo’.

This affects how authentication will work for sudo, not just when using AppleScript. You'll now see the Touch ID prompt when using sudo on the command line, such as in Terminal, or when using other applications which request elevation using sudo.

                      Touch ID dialog prompt on screen to make changes

              Touch Bar prompt for authentication