-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Fatal error: Uncaught Error: Call to undefined function Ltb\\ldap_sasl_bind() #1008
Comments
You can give a look to the configuration procedure with docker: https://self-service-password.readthedocs.io/en/stable/installation.html#docker I have just tested the docker image by myself, but I don't have any error:
You should set at least a local configuration file with the LDAP URL and credentials. |
Hi David, I have already read all the documentation , but I'm stuck with that error. Here is my main configuration: ssp.conf.php
docker-compose.yml
ldap.conf
I also verified that, with Ldap Admin, I can sucessfully change the password of an AD user, using the same parameters that I'm trying to use with SSP. Also I can successfully search with ldapsearch in that AD with that parameters. I'm not familiar with PHP, but two things are not clear to me. First this error:
It is about this line: Or should it be like that? The second error:
It is about an undefined function. Am I missing something? Should I install something else on the docker container? |
Indeed, this is a bug in our code. Could you open an issue at the ltb-common project for this?
This one is weird. Maybe it is a consequence of the first bug. ldap_sasl_bind is a function available in standard php ldap library. It should be available already. |
I reproduce this bug on my side: PHP Fatal error: Uncaught Error: Call to undefined function Ltb\ldap_sasl_bind() in /var/www/vendor/ltb-project/ltb-common/src/Ltb/PhpLDAP.php:41 Also, the variables ldap_binddn and ldap_bindpw, even when empty ("") do not permit to use gssapi auth. I think the test must be fixed |
I fixed the "Undefined variable $ldap_krb5ccname" on my side and opened the issue as per your request. The second error still remains. I checked if any module is missing in the container, but don't know if this is correct.
This is the output of php -i: I see in particular: The GASL could be connected to the missing ldap_sasl_bind() method? |
Yes, there is indeed a problem with the docker image. |
@luandrea could you try building the new docker image using the branch: https://github.com/ltb-project/self-service-password/tree/1008-fix-ldap-sasl-bind-docker You can build with this command:
Anyway, thanks for the bug report |
Hi @davidcoutadeur , However , I'm getting another error now: Bind error -6 (Unknown authentication method)
|
I think there was still a missing module for enabling GSSAPI: libsasl2-modules-gssapi-mit |
Ok, also this error has gone! I still cannot connect to the AD, this is the stacktrace now:
Now I don't see any useful information in it. Could you help me? |
Indeed this error is not quite precise... Maybe do you have more details in system logs? (especially security logs) Other possibility: maybe you need a saslauthd daemon for treating this authentication. You could try this by entering manually in the container and installing sasl2-bin, and then running manually saslauthd |
Ok, I didn't find any useful log. BUT I found that I was missing the correct permission for the Kerberos token cache that I create using kinit and then mount in the container. I do it like this for now because I want to check if everything works before automating it through k5start. After fixing the permissions, as you can see, I get a successful connection (status: Connected) to the AD server, but, as I understand, the search does not return what I'm searching:
If I make the same search using ldasearch I get the correct result:
Output:
|
This one is a connectivity problem:
either ABC.local is not reachable, either the TLS establishment has problems. |
Hi @davidcoutadeur , About TLS, if I remove the cert, I get a specific error, something like this:
I added again this row in ldap.conf that I removed in previous tests:
Now I get a different error:
I will investigate better tomorrow. |
I'm trying to run self-service-password using docker container ( image: ltbproject/self-service-password:latest ) to connect to AD, but I'm getting this stacktrace:
Could you help me?
Is there something I have to install to the container?
Best regards,
Luca
The text was updated successfully, but these errors were encountered: