- Open the sudo file:
sudo vim /etc/pam.d/sudo
- Add the line above in the first line of the sudo file
auth sufficient pam_tid.so
2.1) [Optional] For iTerm2 you should set the preference:
Allow sessions to survive logging out and back in: No
- Exit the vim and terminal
Press in order:
a) Esc
b) : (colon)
c) x!
d) exit
- Reopen the terminal