Use TouchID for sudo execution
1. Background information
In order to make use of TouchID in terminal we need to update /etc/pam.d/sudo
file, which is a configuration file for PAM (Pluggable Authentication Modules) that manages authentication for the sudo command.
2. Edit /etc/pam.d/sudo
file and reload the terminal
Edit /etc/pam.d/sudo
file by executing:
nano /etc/pam.d/sudo
Then, insert the following line into the file:
auth sufficient pam_tid.so
The file structure after the change, should present as follows:
Save changes and reload the .zshrc
file by running:
source ~/.zshrc
3. Remember to edit the advanced preferences
If You are using iTerm
make, sure to toggle Allow sessions to survive logging out and back in
to No