Page 1 of 1

[RESOLU] Mantis & LDAP

Posted: 17 Apr 2013, 09:50
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,

Re: Mantis & LDAP

Posted: 17 Apr 2013, 11:39
by Lapinkiller
Bonjour

Essaye avec ce paramètre : $g_ldap_organization = '(objectClass=*)';

Re: Mantis & LDAP

Posted: 17 Apr 2013, 12:11
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.

Re: Mantis & LDAP

Posted: 18 Apr 2013, 08:23
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.

Re: Mantis & LDAP

Posted: 18 Apr 2013, 10:02
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 ?

Re: Mantis & LDAP

Posted: 18 Apr 2013, 12:06
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.

Re: Mantis & LDAP

Posted: 18 Apr 2013, 12:13
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.

Re: [RESOLU] Mantis & LDAP

Posted: 24 Nov 2014, 21:41
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