Open Directory directory domain name on Mac OS X

北城以北 提交于 2019-12-11 03:34:55

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/1756143/open-directory-directory-domain-name-on-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!