22

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

35

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

  • Is it significant that tabs are used as separators instead of spaces? The source for this answer uses tabs, but when you copy/paste from StackOverflow, you get spaces. – BallpointBen Jun 4 '18 at 20:39
  • @BallpointBen Any non-zero whitespace will work, tabs or spaces. You might like to use spaces to align the text with the existing ‘columns’ in the file. – grg Jun 4 '18 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .