Skip to content

Instantly share code, notes, and snippets.

@dwallraff
Created September 17, 2020 21:43
Show Gist options
  • Save dwallraff/f563cfb53cd10553670402e838d7bf4f to your computer and use it in GitHub Desktop.
Save dwallraff/f563cfb53cd10553670402e838d7bf4f to your computer and use it in GitHub Desktop.
mac laptop changes for better admin
#! /usr/bin/env bash
# mac laptop changes for better admin
# You need to have local admin and be on the VPN
# Check this with a successful 'sudo su'
# If that command fails, so will this script
echo "$USER ALL=(ALL:ALL) ALL" | sudo tee --append /etc/sudoers
sudo mkdir -p /Library/Developer/CommandLineTools
sudo tee /etc/pam.d/sudo2 > /dev/null <<'EOF'
# 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
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment