dseditgroup on Tiger (was: 2.0.1)

Ryan Schmidt ryandesign at macports.org
Sat Jul 30 20:59:38 PDT 2011


On Jul 30, 2011, at 20:23, Joshua Root wrote:

> Looking at the source, it will use the local node if you don't specify
> any -n value. Does it work that way?

Yes! That works on Tiger:


$ sudo dseditgroup -v -o create macports
dseditgroup verbose mode
Options selected by user:
Create option selected
Username determined to be <root>
Groupname provided as <macports>

dsFindDirNodes using local node
dsGetRecordList found no record
dsDoAttributeValueSearch found no record
Next free gid value determined and added
GUID value created and added
Group Record <macports> Created

Recordname <macports>
5 attribute(s) found
Attribute[1] is <dsAttrTypeStandard:AppleMetaNodeLocation>
        Value[1] is </NetInfo/DefaultLocalNode>
Attribute[2] is <dsAttrTypeStandard:RecordType>
        Value[1] is <dsRecTypeStandard:Groups>
Attribute[3] is <dsAttrTypeStandard:RecordName>
        Value[1] is <macports>
Attribute[4] is <dsAttrTypeStandard:PrimaryGroupID>
        Value[1] is <504>
Attribute[5] is <dsAttrTypeStandard:GeneratedUID>
        Value[1] is <75B7432E-9567-4790-8121-19D04F4A479E>


I tested on Snow Leopard and it also seems to work. So is it ok to just unconditionally change that, in the two places where we use dseditgroup?

Then I think we should still fix the macports user's PrimaryGroupID. For example we could use:


$ dscl . -read /Users/macports PrimaryGroupID
PrimaryGroupID: Invalid


If the second word is not a number (e.g. "Invalid"), set the PrimaryGroupID to the macports group's id. (Not sure what the command is to do that.)






More information about the macports-dev mailing list