Mac OSX repair "staff" group

2

I accidentally removed the "staff" group from my Mac OS X 10.6.8 while trying to remove jenkins from it:

$ sudo dseditgroup -o delete -a jenkins -t user staff

I tried to repair this with

$ sudo dscl . create /Groups/staff GroupMembership `whoami`
$ sudo dscl . -append /groups/staff gid 20

Is this enough to repair the staff group? Or does this have any other consequences?

André Ricardo

Posted 2012-09-20T16:01:44.483

Reputation: 123

Answers

2

On Mac OS X 10.8.1 root belongs to staff:

$ sudo dscl . -read /groups/staff 
Password:
AppleMetaNodeLocation: /Local/Default
GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014
GroupMembers: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000
GroupMembership: root
Password: *
PrimaryGroupID: 20
RealName: Staff
RecordName: staff BUILTIN\Users
RecordType: dsRecTypeStandard:Groups
SMBSID: S-1-5-32-545

or

$ grep staff /etc/group
staff:*:20:root

I guess in 10.6.8 it also was the case, so you may want to add root to staff.

If the group is recreated as it existed originally (same Group ID, same members) I tend to think (from my Linux experience) that there are no other consequences.

jaume

Posted 2012-09-20T16:01:44.483

Reputation: 4 947