Home » Questions » Computers [ Ask a new question ]

Create specific GID for a group and add a user to it on Mac OS X 10.5

Create specific GID for a group and add a user to it on Mac OS X 10.5

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

Asked by: Guest | Views: 338
Total answers/comments: 1
Guest [Entry]

"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:

Click on the Groups tab on the left side. The icon with multiple people.
Click New Group from the toolbar
Enter a name, and set the Group ID: to 33
Click on the Members tab, and then press the '+' button and drag and drop your user name into the list.
Press Save, then quit the program."