Skip to content

Instantly share code, notes, and snippets.

@squidsoup
Created January 16, 2014 03:30
Show Gist options
  • Save squidsoup/8449333 to your computer and use it in GitHub Desktop.
Save squidsoup/8449333 to your computer and use it in GitHub Desktop.
OS X setup script
#!/bin/sh
# Disable Gatekeeper
/usr/sbin/spctl --master-disable
# Grant full Remote Management privs to itadmin
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users itadmin -privs -all -restart -agent -menu
# Grant ssh access to itadmin
/usr/sbin/systemsetup -setremotelogin On
/usr/bin/sudo /usr/bin/dscl . read /Groups/com.apple.access_ssh || /usr/bin/sudo /usr/bin/dscl . create /Groups/com.apple.access_ssh
/usr/bin/sudo /usr/bin/dscl . append /Groups/com.apple.access_ssh GroupMembership itadmin
/usr/bin/sudo /usr/bin/dscl . append /Groups/com.apple.access_ssh GroupMembers `dscl . read /Users/itadmin GeneratedUID | cut -d " " -f 2`
# Import CA Cert
security import cacert.pem -k /Library/Keychains/System.keychain || true
# Build `locate` index
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment