I can retrieve the logged in user name using NSUserName(), but how do I get the Open Directory "directory domain name" or other domain he is a member of? i.e. similar to the notion in Windows where a logged-in user is DOMAIN\USERNAME, where DOMAIN is his local machine, workgroup or Active Directory domain.
A:
You may be able to do this with Directory Services. Alternatively, check out the new Open Directory APIs introduced in 10.6; you have a choice between a Core-Foundation-based API and a Cocoa-based API.
Peter Hosey
2009-11-19 02:26:33
Thanks for the tip, however I don't see a recipe for locating the directory domain name. Can you point me to some code which does this or even anything similar to this?
Glen Low
2009-11-20 02:17:28