tomd1976
asked on
Help with LDAP query
Hi
I am running Windows 2008 DC's. I have an application running on a seperate Windows 2003 server and I want the app to perform an LDAP call. Within the app, the only fields I have to input are:
Query Root:
Query:
The DC I want to use is dc31.domain.com. It is located in Domain\domain controllers OU.
I want the query to run at the root of my domain so it captures all users and objects. I know what the query should be, but what should the query root be so that I can also have the DC listed in there?
Secondly, if I wanted the query to only search within an OU named Marketing that was located in Domain\UK\Marketing, how would the Query root look?
I am running Windows 2008 DC's. I have an application running on a seperate Windows 2003 server and I want the app to perform an LDAP call. Within the app, the only fields I have to input are:
Query Root:
Query:
The DC I want to use is dc31.domain.com. It is located in Domain\domain controllers OU.
I want the query to run at the root of my domain so it captures all users and objects. I know what the query should be, but what should the query root be so that I can also have the DC listed in there?
Secondly, if I wanted the query to only search within an OU named Marketing that was located in Domain\UK\Marketing, how would the Query root look?
ASKER
Hi
Regarding Query Root, that just specifies the DC's doesn't it? It doesn't actually tell the app where to search?
And what if I wanted to change where the app searches, as per question #2?
Regarding Query Root, that just specifies the DC's doesn't it? It doesn't actually tell the app where to search?
And what if I wanted to change where the app searches, as per question #2?
It greatly depends on the software if it adds the mandatory LDAP:// prefix...
LDAP://dc31.domain.com/ou=Marketing,ou=UK,dc=domain,dc=com
Oh, I reread your comment... If you specify server name, you bind to that specific server and not to defaultNamingContext (serverless binding).
ASKER
Hi
Ok, so I don't need to specify the actual location of the DC in the LDAP string, it's just:
LDAP://<dc>/<location where I want to run the query>
Am I correct?
And how do you mean defaultnamingcontext? Are you saying there's a way to run the query without specifying a DC (better for us in case DC goes offline)
Ok, so I don't need to specify the actual location of the DC in the LDAP string, it's just:
LDAP://<dc>/<location where I want to run the query>
Am I correct?
And how do you mean defaultnamingcontext? Are you saying there's a way to run the query without specifying a DC (better for us in case DC goes offline)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So for Query Root, we can just run:
LDAP://ou=Marketing,ou=UK, dc=domain, dc=com
It will automatically find the closest DC? Or will just find any DC?
LDAP://ou=Marketing,ou=UK,
It will automatically find the closest DC? Or will just find any DC?
It will propably choose the server that authenticated you but basically, it's able to choose any server, while it prefers servers on the same AD Site.
Open in new window
And for Query
Open in new window