Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am in a windows network and want to use Linux' LDAP search. For this I need to find out my DN.

I am already logged in on a Windows computer using Outlook to the exchange server and this one seems to be able to access the Active directory and global address book.

How can I find out my own bind DN?

I already tried "cn=myusername,cn=Users,DC=ourdomainname,DC=local":

# ldapsearch -H ldap://hostname.ourdomainame.local -v -x -D "c=myusername,cn=Users,DC=ourdomainname,DC=local" "cn=John Doe" -w Foobar

ldap_initialize( ldap://hostname.ourdomainame.local:389/??base )
ldap_bind: Invalid credentials (49)
    additional info: 80090308: LdapErr: DSID-0C0903AA, comment: AcceptSecurityContext error, data 525, v1772


according to the error code 525 I get means "user not found".

I also tried -D "uid=myusername" and -D "uid=mymailname,dc=ourdomainname,dc=com"

share|improve this question

The tool AD Explorer does the trick:

  1. download the tool
  2. Connect to the ad using only the Windows user name and password
  3. Browser through the AD to find your user
  4. Copy the value from the distinguishedName attribute of your user.

In my case this was:

CN=Doe\, John,OU=SBSUsers,OU=OURCOMPANY,DC=ourdomainname,DC=local
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.