mantis cannot login with openldap

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
foxzenith
Posts: 3
Joined: 15 Aug 2008, 03:01

mantis cannot login with openldap

Post by foxzenith »

first, I'm sorry for my poor english,I'm running an apache server, v2.0.52, php v4.3.9 and mysql v5.0.51b on CentOS 4.6 ,Mantis 1.1.2. I want to configure OpenLDAP 2.2.13 authentication for Mantis.
Here is my Mantis config_inc.php:
$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "";
$g_database_name = "bugtracker";
$g_db_type = "mysql";

$g_ldap_server = 'ldap://localhost';
$g_ldap_port = '389';
$g_ldap_root_dn = 'dc=example,dc=com';
$g_ldap_organization = ' ';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'cn=admin,dc=example,dc=com';
$g_ldap_bind_passwd = 'ghl';
$g_use_ldap_email = OFF;
$g_ldap_protocol_version = 3;

and my Openldap slapd.conf is:
database bdb
suffix "dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
rootpw secret


apache's authz_ldap.conf is:
<IfModule mod_authz_ldap.c>

<Directory />
AuthzLDAPMethod ldap
AuthzLDAPServer localhost
AuthzLDAPUserBase ou=People,dc=example,dc=com
AuthzLDAPUserKey uid
AuthzLDAPUserScope base

AuthType basic
AuthName "ldap@example.com"
require valid-user
</Directory>


There's a directory authentication when I access to Mantis's web, and i can pass it with the user name and password what i config in the openldap .ldif files. But what i want is to configure OpenLDAP for the users and passwords authentication for Mantis,when I use the users and passwords in .ldif files,I can't pass the login and get the error message as follow:
"APPLICATION ERROR #1200
Invalid email."

Any help will be really appreciated. With Best regards!
foxzenith
Posts: 3
Joined: 15 Aug 2008, 03:01

Re: mantis cannot login with openldap

Post by foxzenith »

Anybody help me?~~~~~ I think if this error message means that my .ldif files is incorrect? Because my ldif files are create from linux user accounts with this command:
./migrate_passwd.pl /etc/passwd > /worktmp/user.ldif

When i use ldapsearch -x -b "dc=example,dc=com" command,the result contain these:

dn: uid=user1,ou=People,dc=example,dc=com
uid: user1
cn: user1
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$OQ5VZQHX$2SKl1zQeExDL6M1vQf4fi/
shadowLastChange: 14096
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 500
gidNumber: 501
homeDirectory: /home/user1
..........................

And these messages do not have a mail address, Whether this ldif file lead the #1200 error(invalide email)?
Can anybody upload a ldif file for me ? thank a lot!
foxzenith
Posts: 3
Joined: 15 Aug 2008, 03:01

Re: mantis cannot login with openldap

Post by foxzenith »

anybody?help me~thank!
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: mantis cannot login with openldap

Post by vboctor »

I'm not very experience with the LDAP integration, but make sure you create an account for the LDAP users in Mantis. Then the LDAP integration will use the account for access level, project access, etc - and will use LDAP for password and possibly email address.
Migrate your MantisBT to the MantisHub Cloud
rd1089
Posts: 1
Joined: 28 Dec 2016, 11:14

Re: mantis cannot login with openldap

Post by rd1089 »

vboctor wrote:I'm not very experience with the LDAP integration, but make sure you create an account for the LDAP users in Mantis. Then the LDAP integration will use the account for access level, project access, etc - and will use LDAP for password and possibly email address.
The original config is correct with the above answer. I had all other settings in place except the users created in Mantis.
Post Reply