Skip to content

Instantly share code, notes, and snippets.

@flannon
Last active June 9, 2016 15:52
Show Gist options
  • Save flannon/e4ebf937a96aae902efc3f09316a76ce to your computer and use it in GitHub Desktop.
Save flannon/e4ebf937a96aae902efc3f09316a76ce to your computer and use it in GitHub Desktop.
Enable screen sharing/VNC
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw <password> -restart -agent -privs -all
List all groups
$ dscl . list /groups
List group members
$ dscacheutil -q group -a name <group name>
Create a new group and add group number
$ sudo dscl . -append /groups/<group name> gid <gid #>
Add user to group
$ sudo dseditgroup -o edit -a <username> -t user <group name>
List regular users
$ dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment