在Mac OS X上打开目录目录域名 [英] Open Directory directory domain name on Mac OS X

查看:301
本文介绍了在Mac OS X上打开目录目录域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用NSUserName()检索登录的用户名,但是如何获取Open Directory目录域名或其他成员的域?即类似于Windows中的登录用户为DOMAIN\USERNAME的情况,其中DOMAIN是其本地计算机,工作组或Active Directory域。

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.

推荐答案

您可以使用目录服务。或者,查看10.6中介绍的新的Open Directory API;您可以选择基于Core-Foundation的API 基于Cocoa的API

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.

这篇关于在Mac OS X上打开目录目录域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆