As far as I know, the only reliable way to get users accounts is to use DirectoryServices but Apple do not provide Obj-C API for Directory Services. There is an obj-C wrapper in the DSTools project of Darwin (http://www.opensource.apple.com/darwinsource/ ), so you may have a look at it. Anyway, do not try to parse system files, you result will be wrong. For example, you think you users are stored in /etc/passwd, so you probably don't know /var/db/dslocal ;-) and you also have to be aware that the local user list storage has change between 10.4 and 10.5

Le 11 mars 08 à 07:00, Mac QA a écrit :

Hi,

I am seeking the nice clean Cocoa way of getting a list of user
accounts on the local system. Ultimately in the form of an NSArray of
NSStrings of user account short names. There must be a way without
parsing obscure system files, or spawning off NSTasks and parsing
output, right? Any and all suggestions greatly appreciated. Thanks!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to