OpenLDAP CLI Authentication failed

337 Views Asked by At

I have a OpenLDAP Server running on my Ubuntu 16.04 machine. I also installed PhpLDAPAdmin, the PHPLdapAdmin works fine and I can authenticate. Also if I run for example at the CLI ldapsearch it works fine. But as soon as I try to run a CLI Function where authentication is required I get always a authentication failed:

ubuntu@LDAP-machne:~$ ldapwhoami -H ldap://localhost -w PWD
   SASL/DIGEST-MD5 authentication started
   ldap_sasl_interactive_bind_s: Invalid credentials (49)

In the PHPLdapAdmin if I check my password it works, do I have to make a additional command or explicit encoding? The Encoding is ssha.

If run the same command as openldap user it works. But per default I should be able to run ldap commands also as root.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

ldapwhoami tries to connect using an SASL authorization identity, your command is the same as :

ldapwhoami -H ldap://localhost -w PWD -X u:<login>. If you have not in your directory users to match this authentication request it will not work.

Try : ldapwhoami -H ldap://localhost -w PWD -x -D <dn of the entry with password "PWD">