views:

45

answers:

1

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

/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?

A: 

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.

Teja Kantamneni
-W according to the man page, is "Prompt for simple authentication." So, it should prompt me for it. Also, I had a typo in the example above but fixed it. the bindDn is: cn=conapps readonly,cn=users,dc=myorg,dc=com
Eric
Also, if I change to -w and provide the password on the command line, I get the same error message.
Eric
you should pass a `-` after `-W` and it will prompt for a password.
Teja Kantamneni