Created
April 5, 2013 09:08
-
-
Save mikezter/5317838 to your computer and use it in GitHub Desktop.
# This script will add a user "devteam" with password "devteam" and allow him to
# view your screen.
This file contains hidden or 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/bash | |
# | |
# This script will add a user "devteam" with password "devteam" and allow him to | |
# view your screen. | |
dscl . -delete /Users/devteam &> /dev/null | |
maxid=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1) | |
newid=$((maxid+1)) | |
dscl . -create /Users/devteam | |
dscl . -create /Users/devteam UniqueID "$newid" | |
dscl . -create /Users/devteam UserShell /bin/bash | |
dscl . -passwd /Users/devteam devteam | |
dscl . -append /Groups/com.apple.access_screensharing GroupMembership devteam | |
defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false | |
launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment