[RESOLU] Mantis & LDAP

MantisBT forum for users who prefer to ask and answer questions in French.

Moderators: Developer, Contributor

Post Reply
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

[RESOLU] Mantis & LDAP

Post by Orbiumalex »

Bonjour,
Nous avons mis en place la fonctionnalité LDAP sur notre mantis.

Code: Select all

# --- General LDAP configuration ---
$g_login_method 		= LDAP;
$g_ldap_protocol_version 	= 3;
$g_ldap_server 		= "192.168.xxx.xxx";
$g_ldap_port 		= 389;
$g_ldap_bind_dn   		= 'CN=DCUser,OU=DCGroup,DC=domain,DC=com;
$g_ldap_uid_field 		= 'DCUser';
$g_ldap_bind_passwd		= 'PasswordDCUser';
$g_ldap_root_dn 		= "OU=DCGroup2,DC=domain,DC=com";
$g_ldap_organization 	= ' ';
$g_ldap_realname_field  	= 'cn';
$g_use_ldap_email 		= ON;
A ce stade il m'est impossible de me connecter avec un user sachant que dans mantis j'ai bien tous les users avec l'adresse mail.

J'aimerai savoir comment il fait la relation entre Mantis et l'AD. C'est à travers l'adresse mail ? DCUser@domain.com ?
Si oui, il y aurait un moyen d'utiliser plutôt "domain\firstname.lastname"

Je vous remercie d'avance de votre aide.
Cordialement,
Last edited by Lapinkiller on 19 Apr 2013, 14:12, edited 1 time in total.
Reason: tag [RESOLU] ajouté/added
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: Mantis & LDAP

Post by Lapinkiller »

Bonjour

Essaye avec ce paramètre : $g_ldap_organization = '(objectClass=*)';
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Mantis & LDAP

Post by Orbiumalex »

Merci...
Non cela ne fonctionne pas. Mais comment il fait la relation entre mantis et l'AD, c'est via l'adresse email ?

Corcialement.
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Mantis & LDAP

Post by Orbiumalex »

Dans le login, comment dois-je rentrer l'utilisateur ?
- Par son adresse Email
- Par son firstname.lastname
Par quoi fait-il la relation entre Mantis et l'AD ?

Merci.
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: Mantis & LDAP

Post by Lapinkiller »

Perso j'utilise
$g_ldap_uid_field = 'sAMAccountName';

on rentre, (dans le cas de mon install) les users via le champ AD sAMAccountName

as tu activé les logs LDAP pour avoir plus d'infos sur les erreurs ?
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Mantis & LDAP

Post by Orbiumalex »

Bonjour,
Ha j'ai cru que le 'sAMAccountName' devait être remplacer par le user qui est autorisé à lire dans l'AD.

Je suis l'administrateur du réseau de mon entreprise mais ce n'est pas moi qui m'occupe de Mantis et par consequent je ne connais pas spécifiquement ce logiciel. Ils ont besoin de moi pour faire la relation entre l'AD et Mantis vu qu'ils n'ont pas les droits sur le Domaine Controleur.

Non les log ne sont pas active, c'était ma dernière solution.

Je vais essayer et je reviendrai à vous.
Merci.
Orbiumalex
Posts: 10
Joined: 17 Apr 2013, 09:39

Re: Mantis & LDAP

Post by Orbiumalex »

Cela fonctionne. Je cherchais comment il faisait la relation dans l'AD. C'était donc cette ligne...
Je vous remercie de votre aide.

Je ne jette pas des fleurs au français mais notre support est plus rapide que les américain. :)

Voilà la solution.

Code: Select all

# --- General LDAP configuration ---
$g_login_method                 = LDAP;
$g_ldap_protocol_version    = 3;
$g_ldap_server                    = "192.168.xxx.xxx";
$g_ldap_port                       = 389;
$g_ldap_bind_dn                  = 'CN=DCUser,OU=DCGroup,DC=domain,DC=com;
$g_ldap_uid_field                 = 'sAMAccountName'; #C'est cette ligne qui fait la liaison entre Mantis et l'Active Directory
$g_ldap_bind_passwd           = 'PasswordDCUser';
$g_ldap_root_dn                  = "OU=DCGroup2,DC=domain,DC=com";
$g_ldap_organization            = ' ';
$g_ldap_realname_field       = 'cn';
$g_use_ldap_email               = ON;
Je vous remercie.
Cordialement.
ZiZou1991
Posts: 23
Joined: 21 Jul 2014, 12:12

Re: [RESOLU] Mantis & LDAP

Post by ZiZou1991 »

Please
what's wrong in this code
PS: my domain is mantis.local
ou=mantis, user=zeyd

/**************************
* MantisBT LDAP Settings *
**************************/

/**
* Specifies the LDAP or Active Directory server to connect to, and must be
* provided as an URI
* - Protocol is optional, can be one of ldap or ldaps, defaults to ldap
* - Port number is optional, and defaults to 389. If this doesn't work, try
* using one of the following standard port numbers: 636 (ldaps); for Active
* Directory Global Catalog forest-wide search, use 3268 (ldap) or 3269 (ldaps)
*
* Examples of valid URI:
*
* ldap.example.com
* ldap.example.com:3268
* ldap://ldap.example.com/
* ldaps://ldap.example.com:3269/
*
* @global string $g_ldap_server
*/
$g_ldap_server = 'ldap://Server:389';

$g_ldap_port = 389;
/**
*
* @global string $g_ldap_root_dn
*/
$g_ldap_root_dn = 'ou=mantis,dc=mantis,dc=local';

/**
* e.g. '(organizationname=*Traffic)'
* @global string $g_ldap_organization
*/
$g_ldap_organization = '';

/**
* Use 'sAMAccountName' for Active Directory
* @global string $g_ldap_uid_field
*/
$g_ldap_uid_field = 'sAMAccountName';

/**
* The LDAP field for real name (i.e. common name).
* @global string $g_ldap_realname_field
*/
$g_ldap_realname_field = 'cn';

/**
* The distinguished of the user account to use for binding to the LDAP server.
* For example, 'CN=ldap,OU=Administrators,DC=example,DC=com'.
*
* @global string $g_ldap_bind_dn
*/
$g_ldap_bind_dn = 'cn=Zeyd,ou=mantis,dc=mantis,dc=local';

/**
* The password for the service account to be used for connecting to the LDAP server.
*
* @global string $g_ldap_bind_passwd
*/
$g_ldap_bind_passwd = 'etmjf0347md.:;()';

/**
* Should we send to the LDAP email address or what MySql tells us
* @global int $g_use_ldap_email
*/
$g_use_ldap_email = ON;

/**
* Whether or not to pull the real name from LDAP.
* ON from LDAP, OFF from database.
* @global int $g_use_ldap_realname
*/
$g_use_ldap_realname = OFF;

/**
* The LDAP Protocol Version, if 0, then the protocol version is not set. For Active Directory use version 3.
*
* @global int $g_ldap_protocol_version
*/
$g_ldap_protocol_version = 3;

/**
* Determines whether the LDAP library automatically follows referrals returned by LDAP servers or not.
* This maps to LDAP_OPT_REFERRALS ldap library option. For Active Directory, this should be set to OFF.
*
* @global int $g_ldap_follow_referrals
*/
$g_ldap_follow_referrals = ON;

/**
* For development purposes, this is a configuration option that allows replacing
* the ldap communication with a comma separated text file. The text file has a line per user.
* Each line includes: user name, user real name, email, password. For production
* systems this option should be set to ''.
*/
$g_ldap_simulation_file_path = '';

ZiZou1991

Posts: 22
Joined: Jul 21, 2014 7:12 am
Post Reply