Page 1 of 1

LDAP / Active Directory / AD headaches

Posted: 15 Jun 2015, 15:16
by akimeu007
Hi all-

This is the first time I'm implementing MantisBT 1.2.19 using AD. I dabbled my way through the parameters, and I think I'm making a connection at least now. However, no matter what I try, the response is that
06-14-2015 12:48 CDT ldap Binding to LDAP server
06-14-2015 12:48 CDT ldap Attempting connection to LDAP URI 'ldap://servername:389'.
06-14-2015 12:48 CDT ldap Connection accepted by LDAP server
06-14-2015 12:48 CDT ldap Setting LDAP protocol version to 3
06-14-2015 12:48 CDT ldap Attempting bind to ldap server with username and password
06-14-2015 12:48 CDT ldap Bind to ldap server successful
06-14-2015 12:48 CDT ldap Searching for (&(uid=username))
06-14-2015 12:49 CDT ldap No matching entries found
06-14-2015 12:49 CDT ldap Unbinding from LDAP server
06-14-2015 12:49 CDT ldap Authentication failed
After many different tries, these are a my settings:

Code: Select all

	$g_login_method			= LDAP;
#	$g_ldap_simulation_file_path	= 'C:\inetpub\wwwroot\test2.csv';
	$g_ldap_protocol_version 	= 3;
	$g_ldap_server 			= 'ldap://servername:389'; 
	$g_ldap_root_dn 		= 'ou=Users,ou=Accounts,dc=domainName,dc=com';
	$g_ldap_bind_dn 		= 'mydomainname\\serviceAccount';
	$g_ldap_bind_passwd 	= 'myserviceAcccountPwd'; 
	$g_log_level 			= LOG_LDAP;
	$g_log_destination 		= 'file:C:\inetpub\wwwroot\mantisbt.log';
Can anyone point me in the right direction here? Our Sys Admin swears that this is the path where the "username" resides within the AD.

Thanks in advance,
Alex

Re: LDAP / Active Directory / AD headaches

Posted: 19 Jun 2015, 03:17
by akimeu007
Fixed it!

In case others struggle with active directory integration, here is my final config file. The missing piece was the ldap_uid_field value, which by default, will not work on AD.

Code: Select all

$g_login_method         = LDAP;
#   $g_ldap_simulation_file_path   = 'C:\inetpub\wwwroot\test2.csv';
   $g_ldap_protocol_version    = 3;
   $g_ldap_server          = 'ldap://servername:389'; 
   $g_ldap_root_dn       = 'ou=Users,ou=Accounts,dc=domainName,dc=com';
   $g_ldap_bind_dn       = 'mydomainname\\serviceAccount';
   $g_ldap_bind_passwd    = 'myserviceAcccountPwd'; 
   $g_log_level              = LOG_LDAP;
   $g_log_destination       = 'file:C:\inetpub\wwwroot\mantisbt.log';
   $g_ldap_uid_field	= 'sAMAccountName';
Mantis Rocks! Thanks Victor, atrol, and all others that contributed to make such a great piece of software ... FREE for the rest of us to enjoy!

Alex

Re: LDAP / Active Directory / AD headaches

Posted: 19 Jun 2015, 20:33
by atrol
Thanks for providing the solution.