Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 want to create a developers group on my OS-X system. I'm executing:

sudo dscl . -create /groups/developers
sudo dscl . -append /groups/developers passwd 'blah'

My understanding from reading various sources is that I should assign an id to the group with

sudo dscl . -append /groups/developers gid xxx

where xxx is the desired id. My question is, what is an appropriate value for xxx? Is there a convention? Are there any BAD choices? Do I have to worry that something else will want to use the same group id?

share|improve this question
up vote 2 down vote accepted

OS X conventionally uses different ID ranges for different types of accounts. Here's the current layout as I understand it:

up to 100: Reserved for static system-defined (built in) groups
101 - 199: Used by the OS for dynamically-created groups (e.g. share point access groups)
200 - ?: More static system groups (apparently 100 wasn't enough)
400 - 500: More dynamic system groups
501 and up: Local admin-created groups
1024 and up: Domain-based admin-created groups

Since you're creating a local group, I'd look for the first available ID number above 500.

share|improve this answer

One thing you have to take care when choosing a group id is that the id is not already used by another group. In order to list the existing group ids in numerical order you can do:

dscl . -list /groups PrimaryGroupID | awk '{print $2}' | sort -n
share|improve this answer

Your Answer


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.