I was trying to find AD objects with ldapsearch under linux. But somehow it always returned “ldap_bind: Invalid credentials (49)”. I solved using “bind DN” format like object@domain. here is example. it will return nothing but at least you will see that authentication is working.
ldapsearch -H ldap://your.domain.com/ -x -D cn=youruid,dc=your,dc=domain -W
ldap_initialize( ldap://your.domain.com:389/??base )
Enter LDAP Password:
ldap_bind: Invalid credentials (49)
additional info: 80090308: LdapErr: DSID-0C0903AA, comment: AcceptSecurityContext error, data 525, v1772
ldapsearch -H ldap://your.domain.com/ -x -D “user@domain” -vvvvvvvv -W