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"
Best Answer
The tool AD Explorer does the trick:
distinguishedName
attribute of your user.In my case this was: