MacOS TouchID support in sudo

I just recently got a shiny new Apple MacBook Pro 2018 including TouchID. iTerm2/sudo won’t support TouchID out of the box. Here’s what you need to do:

1
2
3
sudo  sed -i '' '2i\
auth sufficient pam_tid.so
' /etc/pam.d/sudo