LDAP & Mantis

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

LDAP & Mantis

Post 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
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post 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
Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post 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).
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post by atrol »

Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post 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
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post 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)
Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post by sva059 »

Do you mean the password for $g_ldap_bind_dn ?
It is the correct one.
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post by atrol »

No, I mean the password of the MantisBT user when trying to login using the MantisBT login page.
Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post by sva059 »

shouldnt it be taking the userid and the password of the logged on user automatically since we are using LDAP?
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post 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.
Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post 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.
Attachments
30-04-2015 15-08-04.jpg
30-04-2015 15-08-04.jpg (75.43 KiB) Viewed 10553 times
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post by atrol »

Try clearing your browser cookies
Please use Search before posting and read the Manual
sva059
Posts: 8
Joined: 28 Oct 2010, 08:54

Re: LDAP & Mantis

Post by sva059 »

It didnt help.
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP & Mantis

Post by atrol »

Maybe enabling logging for LDAP helps to find the problem
https://www.mantisbt.org/docs/master-1. ... IG.LOGGING
Please use Search before posting and read the Manual
Post Reply