3

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

EDIT:

according to https://confluence.atlassian.com/display/CONFKB/LDAP+Error+Code+49 the error code 525 I get means "user not found".

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

1 Answer 1

4

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .