Re: Querying AD



I fired up ldp.exe like you suggested then connected and binded to our main
DC. (this is the first time I've used this tool)

When donig a search for base DN of

CN=test,OU=testou1,DC=corp,DC=mydomain,DC=com

I do get a positive return. But, when I try:

CN=test,OU=testou1,OU=testou2,DC=corp,DC=mydomain,DC=com

It returns 0 entries.

When I look at the properties of the 2nd OU (by right clicking on it in AD
Users and Computers), under the Object tab, I get this:

corp.mydomain.com/testou1/testou2

Yep, I'm lost now. Is my DN malformed (OU=testou1,OU=testou2) ?

I'll take this up with the ADSI group if necessary but I was hoping to
resolve it here before I took it deeper.

Thanks Joe!



"Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ePvl9lBlIHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
Are you sure that the value you are using for memberOf in your filter is
the actual DN of the group?

I recommend using a lower level LDAP query tool like ldp.exe for testing
these types of queries and examining the actual values of attributes in AD
objects so you can see what is really going on.

I also recommend you redirect these types of questions to the
ms.public.adsi.general group as that is where most of the AD programming
discussions go on. It isn't a big deal, but this type of question is less
likely to get lost there.

Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net




.



Relevant Pages

  • Re: Trying to add a user to AD via LDIFDE but receiving an error stating "Unable to update the passw
    ... Basically, you need to set the unicodePwd attribute with the password value, ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: How to find out file owner?
    ... origin of the account. ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services ...
    (microsoft.public.dotnet.security)
  • Re: Need help getting the domain SID when given a DC=XXX,DC=YYY,CD
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... this code for getting the domain object? ...
    (microsoft.public.platformsdk.security)
  • Re: Need help getting the domain SID when given a DC=XXX,DC=YYY,CD
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... this code for getting the domain object? ...
    (microsoft.public.platformsdk.security)
  • Re: Querying AD
    ... also search for the group based on its CN or sAMAccountName and see what its ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... I recommend using a lower level LDAP query tool like ldp.exe for testing ...
    (microsoft.public.windows.server.active_directory)