Using this ldif file:
# LDIF Export for cn=sample,dc=example,dc=org
# Server: ldap-service (ldap-service)
# Search Scope: sub
# Search Filter: (objectClass=*)
# Total Entries: 3
#
# Generated by phpLDAPadmin (http://phpldapadmin.sourceforge.net) on February 8, 2018 7:38 pm
# Version: 1.2.3
version: 1
# Entry 1: cn=sample,dc=example,dc=org
dn: cn=sample,dc=example,dc=org
cn: sample
gidnumber: 500
objectclass: posixGroup
objectclass: top
# Entry 2: cn=John Doe,cn=sample,dc=example,dc=org
dn: cn=John Doe,cn=sample,dc=example,dc=org
cn: John Doe
gidnumber: 500
givenname: John
homedirectory: /home/users/jdoe
loginshell: /bin/sh
objectclass: inetOrgPerson
objectclass: posixAccount
objectclass: top
sn: Doe
uid: jdoe
uidnumber: 1000
userpassword: {MD5}X03MO1qnZdYdgyfeuILPmQ==
# Entry 3: cn=Sally Hudson,cn=sample,dc=example,dc=org
dn: cn=Sally Hudson,cn=sample,dc=example,dc=org
cn: Sally Hudson
gidnumber: 500
givenname: Sally
homedirectory: /home/users/shudson
loginshell: /bin/sh
objectclass: inetOrgPerson
objectclass: posixAccount
objectclass: top
sn: Hudson
uid: shudson
uidnumber: 1001
userpassword: {MD5}X03MO1qnZdYdgyfeuILPmQ==
I have populated an openldap server running on localhost on default port 389 and verified the connection/content:
Now I would like to test that the user: John Doe can login using ldapsearch. I have tried:
ldapsearch -x -h localhost -p 389 -x -D 'cn=sample,cn=John Doe,dc=example,dc=org' -w password
ldapsearch -x -h localhost -p 389 -x -D 'cn=John Doe,dc=example,dc=org' -w password
ldapsearch -x -h localhost -p 389 -x -D 'uid=jdoe,cn=sample,dc=example,dc=org' -w password
but they all fail with:
ldap_bind: Invalid credentials (49)
even after I have tried to update the password (using Apache Directory Studio).
Also tried updating with a plain text password: qwerty
$ ldapsearch -x -h localhost -p 389 -x -D 'uid=jdoe,cn=sample,dc=example,dc=org' -w 'qwerty'
ldap_bind: Invalid credentials (49)
Same error.
Any suggestions?
0 Answers