user290043
user290043

Reputation:

Can't Bind for successful connection

I am trying to test a connection to AD using OpenLDAP and this is what I try on the command line:

/usr/bin/ldapsearch -h names.myorg.com \
    -p 389 \
    -D "cn=conapps readonly,cn=users,dc=myorg,dc=com" \
    -LLL \
    -x \
    -b "ou=MyOrg Staff,ou=People,dc=myorg,dc=com" \
    -s sub "(objectClass=*)" DN sn givenName mail userPrincipalName employeeID usertype \
    -W

However, I keep getting the following error:

Operations error (1)
Additional information: 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece

Can anybody see what I am doing incorrectly?

Upvotes: 24

Views: 155930

Answers (2)

Lee Ballard
Lee Ballard

Reputation: 1119

Try port 3268 instead, see http://technet.microsoft.com/en-us/library/cc978012.aspx for more information

This command works for me:

$ ldapsearch -x -LLL -H ldap://test.com:3268 -dbc=test,dc=com -D 'DOMAIN\username' -W name=username dn

Upvotes: 29

Teja Kantamneni
Teja Kantamneni

Reputation: 17472

I think your password for bindDN is wrong, The bindDn which you are specifying is cn=readonly,cn=users,dc=myorg,dc=com and the password using -W is empty. It may be wrong and it is unable to authenticate you before doing a search.

Upvotes: 15

Related Questions