Using DirectoryService to Find Users
Using DirectoryService to Find Users
- Subject: Using DirectoryService to Find Users
- From: King Chung Huang <email@hidden>
- Date: Thu, 04 Jan 2007 23:01:46 -0700
(I'm not sure if this is the best list to post this question on. If
there's a more appropriate list, please let me know!)
I'm trying to use DirectoryService to get a list of users with uid >
500 (ie: "normal" users). Using Technical Q&A 1462 as a starting
point, I modified its search parameters to find kDS1AttrUniqueID
that's eDSGreaterThan "500". But, it only returns one result, and
it's the Unknown User with uid 99. Does anyone know what's wrong with
my code? Here's a snippet of it, and a link to the full code.
patternToMatch = dsDataNodeAllocateString(dirRef, "500");
matchType = dsDataNodeAllocateString(dirRef, kDS1AttrUniqueID);
requestedAttributes = dsBuildListFromStrings(dirRef,
kDS1AttrDistinguishedName, kDS1AttrUniqueID, NULL);
status = dsDoAttributeValueSearchWithData(nodeRef, dataBuff,
&recordTypesToSearchFor, matchType, eDSGreaterThan, patternToMatch,
requestedAttributes, FALSE, &numResults, &context);
http://apollo.ucalgary.ca/~king/DSSearchPractice.zip
Thanks in advance for any help!
King Chung Huang
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden