Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Last active July 26, 2020 17:11
Show Gist options
  • Save billmeyer/8cf373c6176645a0174907445b6f025e to your computer and use it in GitHub Desktop.
Save billmeyer/8cf373c6176645a0174907445b6f025e to your computer and use it in GitHub Desktop.

Add and Remove user from group on macOS

Procedure

Add user ernie to group _www.

sudo dseditgroup -o edit -a ernie -t user _www

To list all members of a group _www.

dscacheutil -q group -a name _www

To remove a user ernie from a group _www.

sudo dseditgroup -o edit -d ernie -t user _www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment