We're on a corporate network thats running active directory and we'd like to test out some LDAP stuff (active directory membership provider, actually) and so far, none of us can figure out what our LDAP connection string is. Does anyone know how we can go about finding it? The only thing we know is the domain that we're on.
|
The ASP.NET Active Directory Membership Provider does an authenticated bind to the Active Directory using a specified username, password, and "connection string". The connection string is made up of the LDAP server's name, and the fully-qualified path of the container object where the user specified is located. The connection string begins with the URI For the server name, you can use the name of a domain controller in that domain-- let's say "dc1.corp.domain.com". That gives us The next bit is the fully qualified path of the container object where the binding user is located. Let's say you're using the "Administrator" account and your domain's name is "corp.domain.com". The "Administrator" account is in a container named "Users" located one level below the root of the domain. Thus, the fully qualified DN of the "Users" container would be: So, using an account in an OU named Combine the (You can use the domain's name in the connection string as opposed to the name of a domain controller. The difference is that the domain's name will resolve to the IP address of any domain controller in the domain. That can be both good and bad. You're not reliant on any single domain controller to be up and running for the membership provider to work, but the name happens to resolve to, say, a DC in a remote location with spotty network connectivity then you may have problems with the membership provider working.) |
|||||||
|
|
I just use this tool from Softerra (they make an excellent freeware LDAP Browser) to get the User DN from the currently-logged in user: http://www.ldapbrowser.com/download.htm |
||||
|
|
|
I always had problems finding the correct way to type out the OU. The command |
|||
|
|
|
Type Eg: |
||||
|
|
|
The full syntax is at http://www.faqs.org/rfcs/rfc2255.html |
|||
|
|
|
I´m not sure if I understand your problem correctly, but I guess this should help. It explains the Syntax of LDAP-Links. |
|||
|
|