Page 1 of 1

AD authentication issue in 2.25.2

Posted: 08 Apr 2022, 09:08
by ctl_erp_support
Hi,

Our mantis versions is below.
MantisBT Version 2.25.2
Schema Version 211
PHP Version 7.2.24
Database Driver mysqli
Database Version 8.0.26

This is ldap configuration done in config_inc.php

$g_login_method = LDAP;
$g_ldap_server = 'ldap://awsds01.creaf.com:389/';
$g_ldap_root_dn = 'dc=creaf,dc=com';
$g_ldap_organization = ''; # e.g. '(organizationname=*Traffic)'
$g_ldap_uid_field = 'sAMAccountName'; # Use 'sAMAccountName' for Active Directory
$g_ldap_bind_dn = 'thiruxxxxx'; # Username
$g_ldap_bind_passwd = 'password'; # Password
$g_ldap_realname_field = 'cn';
$g_ldap_follow_referrals = OFF;
$g_use_ldap_realname = ON;
$g_use_ldap_email = ON;
$g_ldap_use_starttls = OFF;
$g_ldap_protocol_version = 3;

$g_log_level = LOG_LDAP;
$g_log_destination = 'file:/var/log/httpd/mantis-ldap.log';

when launching Mantis servier, APPLICATION ERROR #140
LDAP Server Connection Failed.

The following is the log file contents.
2022-04-08 17:03 +08 LDAP ldap_api.php:373 ldap_authenticate_by_username() Binding to LDAP server
2022-04-08 17:03 +08 LDAP ldap_api.php:67 ldap_connect_bind() Checking syntax of LDAP server URI 'ldap://awsds01.creaf.com:389/'.
2022-04-08 17:03 +08 LDAP ldap_api.php:76 ldap_connect_bind() LDAP server URI syntax check succeeded
2022-04-08 17:03 +08 LDAP ldap_api.php:89 ldap_connect_bind() Setting LDAP protocol version to 3
2022-04-08 17:03 +08 LDAP ldap_api.php:142 ldap_connect_bind() Attempting bind to ldap server as 'thiruxxxxx'
2022-04-08 17:03 +08 LDAP ldap_api.php:50 ldap_log_error() ERROR #-1: Can't contact LDAP server
2022-04-08 17:03 +08 LDAP ldap_api.php:152 ldap_connect_bind() Bind to ldap server failed

We can ping and telnet to the LDAP server.
We went through all forum suggestion. we are still facing issues.

Please advise us how to resolve it.