Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I create a group with a specific GID and add a user to it on Mac OS X 10.5?

The problem is that macfuse is not smart enough to handle groups when it mounts, so I can't open files which on the remote site that do not belong to my user (though I should be able to open them due to group permissions).

Since I see those files as belonging to group "33" I need to create a group with gid=33 and hope that it fixes the problem.

share|improve this question

1 Answer 1

up vote 10 down vote accepted

If you're looking for a more easy to use GUI, I suggest download the Server Admin Tools for your appropriate version (in this case Mac OS X 10.5.7 Server Admin Tools). The program Workgroup Manager can provide a UI to manage users and groups.

The alternative will use dscl on the Terminal and does not require downloading any additional software.


To change Mac OS X's users and groups from the command line you want to use a command called dscl.

To create a new group (change groupName to your group name - avoid spaces, shortusername should be your short user name):

dscl . -create /Groups/groupName
dscl . -create /Groups/groupName name groupName
dscl . -create /Groups/groupName passwd "*"
dscl . -create /Groups/groupName gid 33
dscl . -create /Groups/groupName GroupMembership shortusername

If you want to use Workgroup Manager; you need to open the application and login onto localhost using your username and password. (This all assumes you're a local administrator). Once in the program:

  1. Click on the Groups tab on the left side. The icon with multiple people.
  2. Click New Group from the toolbar
  3. Enter a name, and set the Group ID: to 33
  4. Click on the Members tab, and then press the '+' button and drag and drop your user name into the list.
  5. Press Save, then quit the program.
share|improve this answer
    
omg that's a perfect answer, it worked, thanks! –  Lohoris Nov 23 '09 at 19:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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