Page 1 of 1

LDAP & Mantis

Posted: 26 Apr 2015, 12:03
by sva059
Hi,

Could you please provide step by steps to use LDAP extension with Mantis?

I am using MantisBT 1.2.19, PHP 5.6.7, My SQL and Apache web server.

My OS is windows 2012 64 bit.

Thanks,

Sreeja

Re: LDAP & Mantis

Posted: 27 Apr 2015, 20:17
by atrol
Set

Code: Select all

$g_login_method = LDAP;
in your config_inc.php and set the options described at https://www.mantisbt.org/docs/master-1. ... .AUTH.LDAP

Re: LDAP & Mantis

Posted: 28 Apr 2015, 04:06
by sva059
Hi,

I have all these variables setup as below:

$g_login_method = LDAP;
$g_ldap_protocol_version = 3;
$g_ldap_server = 'ldap://XXXX.com;
$g_ldap_port = 389;
$g_ldap_root_dn = 'OU=Users,OU=XXX,DC=XXX,DC=XXX,DC=com';
$g_ldap_organization = '';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'domain\username;
$g_ldap_bind_passwd = '*********';


But I get
APPLICATION ERROR #1404
LDAP Extension Not Loaded.

also,

<?php var_dump( extension_loaded ( 'ldap' ) );

gives bool(false).

Re: LDAP & Mantis

Posted: 28 Apr 2015, 06:04
by atrol

Re: LDAP & Mantis

Posted: 29 Apr 2015, 05:32
by sva059
I had done all these steps; except adding PHP folder to PATH variable.
After adding to PATH, a restart of the server also required.

Now I am getting:
Your account may be disabled or blocked or the username/password you entered is incorrect

Re: LDAP & Mantis

Posted: 29 Apr 2015, 21:07
by atrol
Are you sure that you entered the right password (now the one that is stored in LDAP Server and no longer the one that has been stored in MantisBT database)

Re: LDAP & Mantis

Posted: 30 Apr 2015, 09:30
by sva059
Do you mean the password for $g_ldap_bind_dn ?
It is the correct one.

Re: LDAP & Mantis

Posted: 30 Apr 2015, 09:38
by atrol
No, I mean the password of the MantisBT user when trying to login using the MantisBT login page.

Re: LDAP & Mantis

Posted: 30 Apr 2015, 10:21
by sva059
shouldnt it be taking the userid and the password of the logged on user automatically since we are using LDAP?

Re: LDAP & Mantis

Posted: 30 Apr 2015, 11:15
by atrol
I don't use LDAP for MantisBT myself, thus my knowledge is theory from what I read in source code.
sva059 wrote:shouldnt it be taking the userid and the password of the logged on user automatically since we are using LDAP?
No.
MantisBT asks the LDAP server if the password for the given user in login page is the right one.
Thus, you can be logged on as user A in the operating system, but can be logged in as user B in MantisBT.

Re: LDAP & Mantis

Posted: 30 Apr 2015, 12:09
by sva059
I get the error message "Your account may be disabled or blocked or the username/password you entered is incorrect" even before I enter the the username and password. (Attached the screenshot)

I also tried entering my userrid and password; but it still shows the same error.

Re: LDAP & Mantis

Posted: 30 Apr 2015, 15:51
by atrol
Try clearing your browser cookies

Re: LDAP & Mantis

Posted: 04 May 2015, 10:17
by sva059
It didnt help.

Re: LDAP & Mantis

Posted: 05 May 2015, 17:31
by atrol
Maybe enabling logging for LDAP helps to find the problem
https://www.mantisbt.org/docs/master-1. ... IG.LOGGING