简体   繁体   English

如何在LDAP中标识计算机名称属性? (活动目录)

[英]How computer name property is identified in LDAP? (active directory)

Using .net, I'm trying to pull info from this AD field: Computer Name(pre-Windows 2000). 使用.net,我试图从此AD字段中提取信息:Computer Name(Windows 2000之前的版本)。 However, I don't know what the property identifier for it is. 但是,我不知道它的属性标识符是什么。

For instance, if you want to look for the city property, you use "l". 例如,如果要查找city属性,请使用“ l”。 I'm wondering what the corresponding identifier is for computer name. 我想知道计算机名称对应的标识符是什么。

dSearch.PropertiesToLoad.Add("l"); //load city property
dSearch.PropertiesToLoad.Add("?"); //what is computer name?

Does anyone know what to use here? 有人知道在这里用什么吗? Help would be much appreciated. 帮助将不胜感激。

The AD ldap attribute for the pre-Windows 2000 computer name is "sAMAccountName". Windows 2000以前版本的计算机名称的AD ldap属性为“ sAMAccountName”。 I verified it myself on AD by creating a bogus computer account, giving it a unique pre-win 2000 name, and then checking the AD attributes using LDAP Admin . 我在AD上通过创建一个虚假的计算机帐户对其进行了验证,为其指定了一个唯一的2000年以前的名称,然后使用LDAP Admin检查了AD属性。

In our environment both of these return the computer name but I can't tell which is tied to Computer Name(pre-Windows 2000). 在我们的环境中,这两个都返回计算机名称,但我无法确定哪个与计算机名称(Windows 2000之前的版本)相关。

dSearch.PropertiesToLoad.Add("cn");
dSearch.PropertiesToLoad.Add("name");

原来标识符是“ employeeID”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM