Skip to content

Instantly share code, notes, and snippets.

@n8felton
Created May 8, 2013 16:05
Show Gist options
  • Save n8felton/5541508 to your computer and use it in GitHub Desktop.
Save n8felton/5541508 to your computer and use it in GitHub Desktop.
#!/bin/sh
KICKSTART="/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart"
CONFIG_PARAMS="-configure -access -on -privs -none -allowAccessFor -specifiedUsers -clientopts -setmenuextra -menuextra no -setdirlogins -dirlogins yes"
RESTART_PARAMS="-activate -restart -agent -console"
ADMIN_GROUP="MAIN\LABSVCS-Admins"
/usr/sbin/dseditgroup -o delete -t group com.apple.local.ard_admin 2>&1
/usr/sbin/dseditgroup -o create com.apple.local.ard_admin 2>&1
/usr/sbin/dseditgroup -o edit -a "${ADMIN_GROUP}" -t group com.apple.local.ard_admin 2>&1
${KICKSTART} ${CONFIG_PARAMS}
${KICKSTART} ${RESTART_PARAMS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment