LDAP authentication in Mantis 1.1.8

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
mtassinari
Posts: 3
Joined: 03 Jul 2009, 16:39

LDAP authentication in Mantis 1.1.8

Post by mtassinari »

Hi everybody :)

I've been trying to activate mantis authentication over LDAP (mantis V1.1.8, LDAP 2.4.9 on ubuntu server 8.04) but I've been quite unsuccessful :(

here is my config_inc.php, LDAP section

Code: Select all

	#############################
	# Mantis LDAP Settings
	#############################

	# look in README.LDAP for details

	# --- using openldap -------------
	$g_ldap_server			= 'ldap://127.0.0.1:389/';
	#$g_ldap_port			= '';
	$g_ldap_root_dn			= 'ou=Users,dc=agews,dc=com';
	$g_ldap_organization	= '';    # e.g. '(organizationname=*Traffic)'
	$g_ldap_uid_field		= 'uid'; # Use 'sAMAccountName' for Active Directory
	$g_ldap_bind_dn			= 'cn=admin,dc=agews,dc=com';
	$g_ldap_bind_passwd		= 'svp2admin';
	$g_use_ldap_email		= OFF; # Should we send to the LDAP email address or what MySql tells us
	
	# The LDAP Protocol Version, if 0, then the protocol version is not set.
	$g_ldap_protocol_version = 3;



	# --- login method ----------------
	# CRYPT or PLAIN or MD5 or LDAP or BASIC_AUTH
	# You can simply change this at will. Mantis will try to figure out how the passwords were encrypted.
	$g_login_method				= LDAP;
but whenever I try to login I get an error message saying the account might have been disabled or I may have put wrong username/password.

If I try an ldapsearch using those parameters all works fine. If also noticed that in login.php there is no case that handles the LDAP login method :?

Any help will be greatly appreciated!
mtassinari
Posts: 3
Joined: 03 Jul 2009, 16:39

Re: LDAP authentication in Mantis 1.1.8

Post by mtassinari »

No one can help with this? :(
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: LDAP authentication in Mantis 1.1.8

Post by vboctor »

Do you know that the account must be created first before users can use it for login? So far user XXX to login, the XXX account must be created, then users can use it + LDAP password to login to MantisBT.

In 1.2.0rc2 (yet to be released), LDAP mode will auto-create the account on first login.
Migrate your MantisBT to the MantisHub Cloud
macl
Posts: 1
Joined: 24 Aug 2009, 08:20

Re: LDAP authentication in Mantis 1.1.8

Post by macl »

Hello everyone. I've successfully configured Mantis 1.1.8 to authenticate with our Netware-based LDAP. As far as I can tell, it seems accounts do not need to be created first in mantis. Look like mantis creates them by itself, but every user has the same config (with an informer profile) and now I cannot access the mantisbt default administrator user, so I cannot configure accounts permissions. Should I create mantisbt user in LDAP so I can access as an administrator? Is there any way to fallback to basic authentication if LDAP fails?

Thanks in advance for any help. Oh! One tip for the original poster: I would try to set the LDAP port in $g_ldap_port and remove it from $g_ldap_server.

Miguel Angel
Miguel Á. Campos
http://macl.blogspot.com
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: LDAP authentication in Mantis 1.1.8

Post by vboctor »

As per MantisBT 1.2.0rc2, there is no fallback from LDAP to native auth. Feel free to open a feature request under "LDAP" category in the bug tracker.
Migrate your MantisBT to the MantisHub Cloud
Kirill
Posts: 638
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: LDAP authentication in Mantis 1.1.8

Post by Kirill »

Victor, can you set email and full name to db from ldap?
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: LDAP authentication in Mantis 1.1.8

Post by vboctor »

I've just checked in a change that copies the realname, email address and md5(password) from LDAP server to the database whenever the user logs in.
http://www.mantisbt.org/bugs/view.php?id=11078
Migrate your MantisBT to the MantisHub Cloud
Kirill
Posts: 638
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: LDAP authentication in Mantis 1.1.8

Post by Kirill »

Thank very much. In some next days I check how it work.
k.irfee
Posts: 1
Joined: 25 Feb 2010, 11:23

Re: LDAP authentication in Mantis 1.1.8

Post by k.irfee »

Hi ,

I have seen the existing posts and trying to authenticate mantis by ldap. but I am not able to login as ldap user nor with inbuilt user.

Any suggestions !!!

Thanks in Advance!!!

My config_inc.php file is as follows ;
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'mantisbt';
$g_db_username = 'mantisbt';
$g_db_password = '';

# LDAP
$g_login_method = 'LDAP';
$g_ldap_server = 'ldap://127.0.0.1';
$g_ldap_port = '389';
$g_ldap_root_dn = 'dc=company,dc=com';
$g_ldap_organisation = 'objectClass=*'; # e.g. '(organizationname=*Traffic)'
$g_ldap_uid_field = 'uid'; # Use 'sAMAccountName' for Active Directory
$g_ldap_bind_dn = 'cn=root,dc=company,dc=com';
$g_ldap_bind_passwd = 'abc@123';
# Should we send to the LDAP email address or what MySql tells us
$g_use_ldap_email = OFF;

# The LDAP Protocol Version, if 0, then the protocol version is not set.
$g_ldap_protocol_version = 3;

# --- signup ----------------------

$g_allow_signup = OFF;
$g_lost_password_feature = OFF;
Post Reply