• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using DirectoryService to Find Users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Using DirectoryService to Find Users
      • From: "stephen joseph butler" <email@hidden>
  • Prev by Date: Re: regarding transparent NSWindow.
  • Next by Date: Re: Why is my document not always marked as modified after a save?
  • Previous by thread: Re: Getting a list of files/folders in a folder/drive
  • Next by thread: Re: Using DirectoryService to Find Users
  • Index(es):
    • Date
    • Thread