If you're trying to add a user to a group under OSX you might get stumped. This is straight forward enough on linux right, you go
$ usermod -a -G thegroup theuser
And job done. But OSX uses Open Directory rather than traditional flatfiles like /etc/passwd and /etc/group to store information about users and domains. So the typical unix commands we are used to, don't work.
The dscl (directory service command line) utility lets you manipulate Open Directory values and in our case, add a user to an additional group, handy if for example, you want to add your user to the wheel group to make use of password free sudo.
$ dscl localhost --append /Local/Default/Groups/<groupnamehere> <usernamehere>