list of uids / names of System Preferences > Accounts

Posted by neoneye on Stack Overflow See other posts from Stack Overflow or by neoneye
Published on 2010-06-06T04:19:08Z Indexed on 2010/06/06 4:22 UTC
Read the original article Hit count: 298

Filed under:
|
|
|
|

How can I obtain an array with uid and names?

I could iterate from 0 to 99999 and do a getpwnam(). However most machines have less than 5 accounts, so it's not optimal. I don't know what framework is responsible for this and thus I have no clue what to search for.

Is there a more optimal solution that can traverse the accounts?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about mac