How to generate logs for auth failures?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
bhasker.varma
Posts: 4
Joined: 12 Feb 2010, 07:58

How to generate logs for auth failures?

Post by bhasker.varma »

Hi there,

I am using Mantis Stable r1.1.8. Its running off a CentOS 5 host and configured to use MySQL (DB is on same host as Mantish) and using a Microsoft AD for LDAP auth. It was working fine for about month and half.
But, last evening its auth suddenly stopped working and users were unable to log-on. Every user (including Mantis administrator) is getting a message "Your account may be disabled or blocked or the username/password you entered is incorrect."

Now, I did basic check (like using LDP.exe to connect to my MS AD server using the same parameters that are specified in config_inc.php ) and they passed.

What is puzzling me is that we have not changed anything (at all!) Neither in Mantis nor in AD and still all of a sudden this problem has popped up. To debug I want to look at logs but ones generated by httpd aren't telling me anything useful.

Can I tweak some parameter somewhere so that I can force Mantis to spit out verbose logs related to LDAP communication?


-Bhasker
bhasker.varma
Posts: 4
Joined: 12 Feb 2010, 07:58

Re: How to generate logs for auth failures?

Post by bhasker.varma »

Few more things I debugged.

I can connect on port 389 of my LDAP server from the host where Mantis is running.
I connected to my DB using MySQL command-line, using the credentials supplied in config_inc.php and it shows me all the users (and they are enabled)
If I specify incorrect password in config_inc.php then I get following if attempt to authenticate.
APPLICATION ERROR #1400

LDAP Authentication Failed.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
If put the correct password back in its place and error message changes to what I have mentioned in previous post.

Heres my config_inc.php
<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'mantisbt';
$g_db_username = 'root';
$g_db_password = 'xxx';

$g_login_method = LDAP;
$g_ldap_server = 'ldap://192.168.10....';
$g_ldap_port = 389;
$g_ldap_root_dn = 'DC=Phenixlabs,DC=eng';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'CN=Mantis...,OU=Phenixlabs,DC=Phenixlabs,DC=eng';
$g_ldap_bind_passwd = 'xxx';
$g_use_ldap_email = OFF;
$g_ldap_protocol_version = 3;
$g_ldap_follow_referrals = OFF;
?>

I also tried pointing it to my test MS LDAP environment. And that didn't work too! Note that Mantis' integration with the test MS LDAP environment was working almost a month back and only after that I integrated Mantis with prod AD environment.


-Bhasker
Post Reply