Link to home
Start Free TrialLog in
Avatar of c_hockland
c_hocklandFlag for Greece

asked on

Red Hat 6 and Ldap question

Hi ,

I have installed and configured ldap on RHEL6. How ever i am getting an error during testing the connection to the ldap server

# ldapsearch -h localhost -D "cn=Manager," -w password -b "" -s sub "objectclass=*"
ldap_bind: Invalid credentials (49)

Any ideas ?
here is the config files

< slapd.conf >

database    bdb
suffix      "dc=company,dc=com"
rootdn      "cn=Manager,dc=company,dc=com"
rootpw      {SSHA}lh7jQlIZu8bjXKfAcBn2iBfFpHU/I2PM
# PPolicy Configuration
overlay ppolicy
ppolicy_default "cn=default,ou=policies,dc=company,dc=com"
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory   /var/lib/ldap
Avatar of skullnobrains

don't specify the passord on the command-line if you're not using basic authentication (default should be SASL) is not the same as dc=company,dc=com

use verbose mode and post the debug if that does not help
Hi Watch out for  


It should be

# ldapsearch -h localhost -D "cn=Manager,dc=company,dc=com" -w password -b "" -s sub "objectclass=*"

Avatar of c_hockland


Hi ,

how can i go and add a user and then with this user id and password ? do i just need to do a useradd or do i need to edit a certain file ?
I am sorry , what i meant with the previous post was to create a few users and then test the ldap authentication using the command

# ldapsearch -h localhost -D "cn=Manager,dc=company,dc=com" -w password -b "" -s sub "objectclass=*"
i have added a new user user1 with passwd password and i am testing

# ldapsearch -h localhost -D "cn=user1,dc=company,dc=com" -w password -b "" -s sub "objectclass=*"

i am getting
ldap_bind : invalid credentials (49)

Any ideas ?
if your ldap does not accept basic authentication, specifying passwords on the command-line will produce this error, because basic auth will be forced.

your search base looks weird and if you do not have access to the search base you'll get that error

not sure either of the previous is the problem, but definitely sure the verbose mode would give decent debug information which we do not have right now
1. how can i make it accept basic authentication ?

2. i dont want to bring up a client ( license limitation) and test against the ldap server , so if i get it to work with the command line test it will suffice.
i told you i was unsure this was the issue.
use the verbse mode and post the output if you want some help.
i'm not wildly guessing what your problem may be until i find out while debugging it is trivial given proper information.
i am sorry how can i get the verbose mode ? Not a RHEL expert..
Avatar of skullnobrains

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok , thanks so much for your help. I will assign you the points b/c u have been helping a lot and i will re open another thread if i still have issues.  I was also told that i will be available to bring up a test server and use it as a client.  So stay tuned for updates.