sysPass icon indicating copy to clipboard operation
sysPass copied to clipboard

LDAP Connection error

Open kitenberg opened this issue 8 years ago • 11 comments

Hi I installed sysPass and everything work properly except the LDAP integration which fail. Every time I try to test it, I get the following error: Connection error (BIND) LDAP ERROR : Can't contact LDAP server (-1) LDAP DN : cn=xxx,ou=xxxe,ou=xxx,dc=xxx,dc=xxx,dc=net,dc=xxx (masked the details)

image

Every time I'm tying to test, a Decryption error log is appears in /syspass.log.

I also captured the traffic and there are no packets to the active directory server.

Does anyone familiar with that issue?

Thanks, Dor

kitenberg avatar Jul 23 '18 04:07 kitenberg

Hi, it could be caused by an ADs DNS issue since sysPass will pick a random server from _msdcs zone in DNS.

Regards

nuxsmin avatar Jul 23 '18 07:07 nuxsmin

By capturing the traffic, I could see a DNS request for that server but I can also see that he gets a response with a proper AD IP.

Any Idea how can I debug it?

kitenberg avatar Jul 25 '18 00:07 kitenberg

It could be caused by SSL requirements from AD. There are some related issues like #968 or #951.

Regards

nuxsmin avatar Jul 25 '18 12:07 nuxsmin

Hi, I add the se linux configuration and now it works. But now it fails on the SSL handshake to the AD. I can see that the AD sends the server certificate and it validated by the syspass client but the client (syspass server) is not sending any certificate back and it fails. Not sure where I configure the ldap client to use the right client cert+key.

Any ideas?

kitenberg avatar Jul 27 '18 01:07 kitenberg

Hi, it's most likely that they are stored in /etc/ssl but it depends on the Linux distribution. You would need to import the CA's certificate in order to avoid security warnings or no-op on the client side.

nuxsmin avatar Jul 27 '18 05:07 nuxsmin

I did that but it still doesn't work. I'm trying now to use just normal LDAP without SSL but it says that the Domain Controller requires Strong Authentication. Which is not true, I'm using other system with regular LDAP authentication and it works just fine. image

How can I solve it?

kitenberg avatar Jul 31 '18 06:07 kitenberg

@kitenberg I haven't seen this message before. It's thrown by the PHP module, since sysPass does not enforce any connection method. Are you using a blank password for binding?

nuxsmin avatar Jul 31 '18 14:07 nuxsmin

No, I'm using the correct password.

kitenberg avatar Aug 01 '18 03:08 kitenberg

Please, take a look to these posts:

https://stackoverflow.com/questions/5991591/php-ldap-stronger-authentication-required https://blogs.technet.microsoft.com/askds/2009/09/21/understanding-ldap-security-processing/ https://www.dirwiz.com/kb/346

nuxsmin avatar Aug 01 '18 05:08 nuxsmin

Hey, I added the mentioned line to the ldap.conf and now it works using TLS (LDAPS).

I don't understand why a user needs to put the master password with every first login. It's not practical. I must give everyone the master password.

Is there any way to disable this?

kitenberg avatar Aug 06 '18 02:08 kitenberg

@kitenberg I'm glad it's running now.

Regarding the master password, it's needed because it isn't stored anywhere, so every first login will require to enter it. You can use the temporary master password feature, so you don't need to send the real master password and it will expire by the time you set.

nuxsmin avatar Aug 06 '18 07:08 nuxsmin