Mac OS X Add Group Command Terminal Howto

October 4th, 2011 by Regaz

First you need to Find a free Group ID. To Catch it perform:

groupmaxid=$(dscacheutil -q group | awk '{print $2}' | sort -ug | tail -1)
groupnewid=$(groupmaxid+1)

Now the Next Free ID is stored in the newid Variable and you can use it wile Adding the New Group. Then to Add your New Group you Perform:

dscl . -create /Groups/mysql gid $groupnewid
(Visited 5 times, 1 visits today)

Tags: , , , , ,