Created
January 16, 2014 03:30
-
-
Save squidsoup/8449333 to your computer and use it in GitHub Desktop.
OS X setup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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