Updated Apr. 19, 2020 for macOS Catalina.
Sudo with Touch ID
Typing your sudo password is a lot of work! Utilize the touchID Pluggable Authentication Module (PAM) to run those commands quickly!
cd /etc/pam.d sudo chmod +w sudo
Add a new first entry to include the PAM module
pam_tid.so (like so):
# sudo: auth account password session auth sufficient pam_tid.so auth sufficient pam_smartcard.so auth required pam_opendirectory.so account required pam_permit.so password required pam_deny.so session required pam_permit.so
If you’re using iTerm, you’ll need to disable this option in:
Preferences => Advanced => Allow sessions to survive logging out and back in
Restart your terminal and run a
*Actually* Disable App Relaunch On Restart
Apps relaunching on a reboot drives me crazy. I don’t want this “feature” ever, not on a crash, not when rebooting from a script, and definitely not when I reboot myself. I found this tip on Stackoverflow that restricts the permission on the file used to restore.
- Mark file as owned by root (or else MacOS will just regenerate the file)
sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*
- Steal all permissions
sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*
To restore, just
rm that file so macOS can regenerate it.
First Hour Installs
Below is a list of the software (off the top of my head) that I immediately install on a fresh Mac.
- Burp Suite Community
- VS Code
- Little Snitch
I back up my dotfiles and configuration settings. Notably some vim, vscode keybindings, and git settings. These are easy to restore with a symlink.