Skip to content

Instantly share code, notes, and snippets.

@DeadlySurgeon
Last active April 15, 2020 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeadlySurgeon/6d0e35c2ce954aca8be30f06834ec8ca to your computer and use it in GitHub Desktop.
Save DeadlySurgeon/6d0e35c2ce954aca8be30f06834ec8ca to your computer and use it in GitHub Desktop.
Mac SUDO Touchbar

Sudo Touchbar

Done on macOS 10.15.3
This outlines basic instructions on how to make it so that when you run a sudo command, it asks for the touchbar. The only annoying part of this is that it pops up a window instead of just staying in the terminal.

sudo File

WARNING: If you fuck up this file, you probably won't be able to execute sudo.

So, these lines will need to be at the top of the /etc/pam.d/sudo file.

Stock Terminal App:
auth sufficient pam_tid.so

If you plan on using iTerm2:
auth optional pam_reattach.so

Also, you'll need to install this pam: https://github.com/fabianishere/pam_reattach

If you don't want to use pam_reattach then you can go to iTerm2 > Preferences > Advanced > Search(allow session) and turn it to "No" but that turns off the ability to allow sessions to survive relog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment