Possible Help for ERROR #49: Invalid credentials for AD

General discussion of Mantis.

Moderators: Contributor, Developer

Post Reply
tegger
Posts: 1
Joined: Sep 12, 2017 8:32 am

Possible Help for ERROR #49: Invalid credentials for AD

Post by tegger » Sep 13, 2017 6:44 am

Hi,
i got problems with ldap and Active Directory with ad-admin-user and found a solution

Code: Select all

2017-08-24 16:31 CEST LDAP ldap_api.php:326 ldap_authenticate_by_username() Binding to LDAP server
2017-08-24 16:31 CEST LDAP ldap_api.php:63 ldap_connect_bind() Attempting connection to LDAP server/URI 'ldap://XXX.YYY.ZZZ.XXX:389'.
2017-08-24 16:31 CEST LDAP ldap_api.php:66 ldap_connect_bind() Connection accepted by LDAP server
2017-08-24 16:31 CEST LDAP ldap_api.php:79 ldap_connect_bind() Setting LDAP protocol version to 3
2017-08-24 16:31 CEST LDAP ldap_api.php:101 ldap_connect_bind() Attempting bind to ldap server with username and password
2017-08-24 16:31 CEST LDAP ldap_api.php:46 ldap_log_error() ERROR #49: Invalid credentials
2017-08-24 16:31 CEST LDAP ldap_api.php:111 ldap_connect_bind() Bind to ldap server failed
i changed g_ldap_bind_dn to an @ login

Code: Select all

#$g_ldap_bind_dn 		= 'CN=ad-admin-user,cn=Users,dc=aaa,dc=lan';
$g_ldap_bind_dn 		= 'ad-admin-user@aaa.lan';
and this is working, my complete setup in the config_inc.php

Code: Select all

$g_login_method 		= LDAP;
$g_ldap_server 			= 'ldap://XXX.YYY.ZZZ.XXX:389'; 
$g_ldap_root_dn 		= 'DC=aaa,DC=lan'; 
$g_ldap_organization 	= '(objectClass=*)';
$g_ldap_realname_field  = 'cn';

#$g_ldap_bind_dn 		= 'CN=userinad,cn=Users,dc=aaa,dc=lan';
$g_ldap_bind_dn 		= 'userinad@aaa.lan';

$g_ldap_bind_passwd 	= 'PASSWORD'; 
$g_ldap_protocol_version = 3;
$g_ldap_uid_field 		= 'sAMAccountName'; 
$g_use_ldap_email     	= OFF;
$g_use_ldap_realname   	= OFF;
$g_ldap_follow_referrals = OFF;
#$g_log_level = LOG_LDAP ;
#$g_log_destination = 'file:C:/tmp/mantisbt.log';
so, i hope this will help anyone with the same problem

Post Reply