我怎样才能获得域名用户通过Active Directory登录到一台Mac [英] How can I get the domain name for a user logged into a Mac via Active Directory

查看:171
本文介绍了我怎样才能获得域名用户通过Active Directory登录到一台Mac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的可可应用程序怎么走时,他们通过Active Directory登录?当前用户的域

In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory?

我需要确定两件事情:

  1. 如果当前用户登录到Active Directory域(只需要处理的Active Directory)。
  2. 如果1,用户的域。

我发现引用<一个href="http://developer.apple.com/Mac/library/documentation/Networking/Reference/Open%5FDirectory%5FRef/Reference/reference.html">Directory服务和<一href="http://developer.apple.com/mac/library/documentation/Networking/Conceptual/Open%5FDirectory/Introduction/Introduction.html">Open目录编程指南,但后者只为10.6(我必须支持10.5+),我无法找到这给了我什么,我需要做的想法前任何的例子。

I've found references to Directory Services and the Open Directory Programming Guide but the latter is 10.6 only (I must support 10.5+) and I could not find any examples for the former that gave me an idea of what I needed to do.

推荐答案

dsconfigad -show

dsconfigad -show

它会告诉你是否绑定到一个目录和详细信息的目录,如果约束。然后,你就会知道如何编写脚本DSCL。

It will tell whether you are bound to a directory and details about that directory if bound. Then you will know how to script dscl.

这篇关于我怎样才能获得域名用户通过Active Directory登录到一台Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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