Skip to content
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

LDAPS error #442

Closed
BadouDream opened this issue Oct 5, 2023 · 2 comments
Closed

LDAPS error #442

BadouDream opened this issue Oct 5, 2023 · 2 comments

Comments

@BadouDream
Copy link

BadouDream commented Oct 5, 2023

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Rocky 9.2

Server informations

Perl version : 5.32.1
Mysql / Mariadb / Percona version : Mariadb 10.5.16

OCS Inventory informations

Ocs server version : 2.12.1

Problem's description

LDAP connection (not anonymous) work. But when I change protocol ldap by ldaps and port 389 to 636, I have a blank page when I validate my login.
In log/php-fpm/www-error.log, I have this error :
[05-Oct-2023 19:26:48 Europe/Paris] PHP Fatal error: Uncaught TypeError: ldap_search(): Argument #1 ($ldap) must be of type LDAP|array, bool given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php:83
Stack trace:
#0 /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php(83): ldap_search()
#1 /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php(66): search_on_loginnt()
#2 /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php(45): verif_pw_ldap()
#3 /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/auth.php(100): require_once('...')
#4 /usr/share/ocsinventory-reports/ocsreports/require/header.php(321): require_once('...')
#5 /usr/share/ocsinventory-reports/ocsreports/index.php(44): require('...')
#6 {main}
thrown in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/ldap.php on line 83

ldap.conf is not located at /etc/ldap/ldap.conf but in /etc/openldap/ldap.conf. I have all prerequis.

I have GLPI on this same server and it's work perfect in LDAPS with SSO.
Can you help me ?

Thanks

@Lea9250
Copy link
Contributor

Lea9250 commented Dec 11, 2023

Hi @BadouDream,

Would you be able to try and edit your var.php file, setting AUTH_LDAP_SKIP_CERT to true ? It will skip the certificate verification and allow you to test ldap auth again, see if the issue might be coming from the certificate.

Regards,
Léa

@Lea9250
Copy link
Contributor

Lea9250 commented May 15, 2024

Hi @BadouDream

I'm closing this since there was no answer but feel free to reopen if the issue is still relevant.

Regards,
Léa

@Lea9250 Lea9250 closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants