I want to test an ldap directory with ldapsearch
. No passwords are stored in the LDAP directory. Account passwords are stored in Kerberos and LDAP contains a pointer to the Kerberos principal. The ldap has an attribute userPassword
Attribute Name: 'userPassword'
OID: 2.5.4.35
URN: urn:oid:2.5.4.35
Multiple Values: Multi-valued (treated as Single-valued)
I tried to search an user with the command
$ ldapsearch -vvv -x -D 'cn=xxxxxx,ou=xxx,dc=xxxx,dc=xxx' -h 'xxxxxxxx.xxxx.xxx' -W
ldap_initialize( ldap://xxxxxxxx.xxxx.xxx )
Enter LDAP Password:
ldap_bind: Invalid credentials (49)
Seems the ldap server cannot get the credential since itself doesn't store the passwords. Can the search be done under this circumstances? How to authenticate logins using ldap via kerberos?