在 Active Directory 中查找用户的 CN [英] Finding CN of users in Active Directory

查看:30
本文介绍了在 Active Directory 中查找用户的 CN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查找可以访问或控制 Active Directory 中所有用户的用户的基本 DN,以便将其放入我的 LDAP 中.

I'm trying to find the Base DN of the user that can access or controls all the users in Active Directory so I can put it in my LDAP.

通常有人会给我这个,它看起来像 DC=domain,DC=company,DC=com

Usually someone will give me this, and it looks like DC=domain,DC=company,DC=com

但是管理员不可用,所以我不知道如何在 Active Directory 中找到它.

But the admin is not available, so I don't know how to find this in Active Directory.

我正在逐步查找此信息.要打开哪些树和选项卡以及如何构建它.我的用户是:admin,服务器是:controller-16.domain.company.com但我不知道他们是否添加了 OU 或组或其他内容

I'm looking for a step by step to find this info. Which tree and tabs to open and how to construct it. My user is: admin, the server is: controller-16.domain.company.com But I don't know if they added OU or groups or something else

我知道:

CN=admin,DC=domain,DC=company,DC=com

不起作用.也没有:

DC=domain,DC=company,DC=com

如果 Base DN 在 Gawor 的 LDAP 浏览器,那么它将适用于我的 LDAP.

If the Base DN works on Gawor's LDAP Browser, then it will work for my LDAP.

推荐答案

你可以试试我的 Beavertail ADSI 浏览器 - 它应该向您显示当前的 AD 树,并且您应该能够从中找出路径和所有内容.

You could try my Beavertail ADSI browser - it should show you the current AD tree, and from it, you should be able to figure out the path and all.

或者,如果您使用的是 .NET 3.5,使用 System.DirectoryServices.AccountManagement 命名空间,您也可以通过编程方式进行:

Or if you're on .NET 3.5, using the System.DirectoryServices.AccountManagement namespace, you could also do it programmatically:

PrincipalContext ctx = new PrincipalContext(ContextType.Domain);

这将创建一个基本的默认域上下文,您应该能够查看它的属性并从中找到很多东西.

This would create a basic, default domain context and you should be able to peek at its properties and find a lot of stuff from it.

或者:

UserPrincipal myself = UserPrincipal.Current;

这将再次为您自己提供一个 UserPrincipal 对象,其中包含大量要检查的属性.我不能 100% 确定您在寻找什么 - 但您很可能能够在上下文或某处的用户主体中找到它!

This will give you a UserPrincipal object for yourself, again, with a ton of properties to inspect. I'm not 100% sure what you're looking for - but you most likely will be able to find it on the context or the user principal somewhere!

这篇关于在 Active Directory 中查找用户的 CN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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