Many of those who have enabled Touch ID for Terminal/iTerm found out that the /etc/pam.d/sudo
is reverted to its original state after reboot.
Setting the permission to edit the file, adding a necessary line, and reverting the permission back are all trivial operations that can be automated.
If you are a bash
user, add these lines to your .bash_profile
:
ensure_touch_id() {
local AUTH_FILE_PATH="/etc/pam.d/sudo"
local AUTH_FILE_LINES=()