Windows / Active Directory - User / Groups

﹥>﹥吖頭↗ 提交于 2019-12-05 11:20:46

Programatically or Manually?

Manually, i prefer AdExplorer, which is a nice Active directory Browser. You just connect to your domain controller and then you can look for the user and see all the details. Of course, you need permissions on the Domain Controller, not sure which though.

Programatically, it depends on your language of couse. On .net, the System.DirectoryServices Namespace is your friend. (I don't have any code examples here unfortunately)

For Active Directory, I'm not really an expert apart from how to query it, but here are two links I found useful:

http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm

http://en.wikipedia.org/wiki/Active_Directory (General stuff about the Structure of AD)

You need to go to the Active Directory Users Snap In after logging in as a domain admin on the machine:

  1. Go to start --> run and type in mmc.
  2. In the MMC console go to File -->
  3. Add/Remove Snap-In Click Add Select
  4. Active Directory Users and Computers and select Add.
  5. Hit Close and then hit OK.

From here you can expand the domain tree and search (by right-clicking on the domain name).

You may not need special privileges to view the contents of the Active Directory domain, especially if you are logged in on that domain. It is worth a shot to see how far you can get.

When you search for someone, you can select the columns from View --> Choose Columns. This should help you search for the person or group you are looking for.

You do not need domain admin rights to look at the active directory. By default, any (authenticated?) user can read the information that you need from the directory.

If that wasn't the case, for example, a computer (which has an associated account as well) could not verify the account and password of its user.

You only need admin rights to change the contents of the directory.

I think it is possible to set more restricted permissions, but that's not likely the case.

OU is an Organizational Unit (sort of like a Subfolder in Explorer), not a Group, Hence group1, 2 and 3 are not actually groups.

You are looking for the DN Attribute, also called "distinguishedName". You can simply use DOMAIN\DN once you have that.

Edit: For groups, the CN (Common Name) could also work.

The full string from Active Directory normally looks like this:

cn=Username,cn=Users,dc=DomainName,dc=com

(Can be longer or shorter, but the important bit is that the "ou" part is worthless for what you're trying to achieve.

Well, AdExplorer runs on your Local Workstation (which is why I prefer it) and I believe that most users have read access to AD anyway because that's actually required for stuff to work, but I'm not sure about that.

Install the "Windows Support Tools" that is on the Windows Server CD (CD 1 if it's Windows 2003 R2). If your CD/DVD drive is D: then it will be in D:\Support\Tools\SuppTools.msi

This gives you a couple of additional tools to "get at" AD: LDP.EXE - good for reading information in AD, but the UI kinda stinks. ADSI Edit - another snap-in for MMC.EXE that you can both browse AD with and get to all those pesky AD attributes you're looking for.

You can install these tools on your local workstation and access AD from there without domain admin privileges. If you can log on to the domain, you can at least query/read AD for this information.

Roy Rico

Thanks adeel825 & Michael Stum.

My problem is, though, i'm in a big corporation and do not have access to log in as the domain admin nor to view the active directory, so i guess my solution is to try and get that level of access.

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