Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on a Mac (Snow Leopard) and I would like to add myself to the "wheel" group? How do I do that? I there a way I can see all the groups am I in?

share|improve this question
up vote 14 down vote accepted

You can see what groups you are in using the id command:

$ id testacc 
uid=1089(testacc) gid=1096(testacc) groups=1096(testacc)

the dscl utility can be used to add users to groups:

$ dscl . append /Groups/admin GroupMembership username

where username is the user short name of the user you wish to add to the particular group.

share|improve this answer

There is arguably a better command to check what group one belongs to. The "groups" command. Example:

$ groups

staff _developer _lpoperator _lpadmin _appserveradm admin _appserverusr localaccounts everyone

The command to add group wheel:

$ sudo dscl . append /Groups/wheel GroupMembership username

Where "username" is your username. Then re-run "groups" to see that you have indeed been added to group wheel, like so:

$ groups                                                  
staff _developer _lpoperator _lpadmin _appserveradm admin _appserverusr localaccounts everyone wheel
share|improve this answer
groups(1) does work as well, but it's deprecated in favour of id(1) (at least as of OSX 10.7). – Viktor Haag Dec 19 '11 at 16:26

protected by studiohack Apr 27 '11 at 1:28

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.