Page 1 of 1

LDAP authentication

Posted: 11 Jun 2007, 18:15
by Sneefy
I'm a complete beginner at LDAP (and Mantis, for that matter).

I want to enable LDAP authentication for Mantis, but am quite green to this and not sure exactly where to begin. I've found and read through config_inc.php.sample and config_defaults.inc.php but I need assistance in interpreting what the various values mean. (below)

Our domain is a mixed Windows Server 2k/2k3 environment with AD.

Thanks in advance for any info. I'm pretty green at this and appreciate the help.


$g_ldap_server = 'ldaps://ldap.example.com.au/';
$g_ldap_port = '636';
$g_ldap_root_dn = 'dc=example,dc=com,dc=au';
$g_ldap_organization = ''; # e.g. '(organizationname=*Traffic)'
$g_ldap_uid_field = 'uid'; # Use 'sAMAccountName' for Active Directory
$g_ldap_bind_dn = '';
$g_ldap_bind_passwd = '';
$g_use_ldap_email = OFF; # Should we send to the LDAP email address or what MySql tells

$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "";
$g_database_name = "bugtracker";
$g_db_type = "mysql";

Okay, this what I have so far...

Posted: 14 Jun 2007, 15:19
by Sneefy
This is what I have at this point. Can someone please tell me what I'm missing?

<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'bugtracker';
$g_db_username = '******';
$g_db_password = '******';

$g_login_method = LDAP;
$g_ldap_server = 'ldap//*******.******.org';
$g_ldap_port = '389';
$g_ldap_root_dn = 'dc=****,dc=org';
$g_ldap_organization = '';
$g_ldap_uid_field = 'SamAccountName';
$g_use_ldap_email = OFF;
?>


I know we're missing some info, or entered it incorrectly, but we're stuck at this point.

Do I need to enter anything for ldap_organazation?

I'm running Mantis on a Microsoft 2k3 server, using Active Directory and want to integrate authentication with that so people can enter their regular username and password and it will authenticate them in Mantis.

Please, any info would be much appreciated.

Posted: 18 Jun 2007, 10:34
by gerb42
Sneefy,

first, AD does not allow anonymous queries, so you need to specify an account for queries using $g_ldap_bind_dn and $g_ldap_bind_passwd. Second, AFAIR LDAP is case-sensitive, so you need to specify $g_ldap_uid_field as "sAMAccountName"

Posted: 18 Jun 2007, 12:00
by deboutv
And make sure that users are defined in the Mantis database.