8 Configuration LDAP - Centreon 2.4.5
![Stacks Image 7999](files/stacks-image-ca371a9-694x800.png)
Configuration name : ldap duchmol
Description : entreprise duchmol.net
Enable LDAP authentification : Yes
la configuration est activée par défaut.
./centreon -u admin -p password -o LDAP -a add -v "ldap duchmol;entreprise duchmol.net"
![Stacks Image 8028](files/stacks-image-db5fe45.png)
Host address : ldap.duchmol.net
Order : 1
./centreon -u admin -p password -o LDAP -a ADDSERVER -v "ldap duchmol;ldap.duchmol.net;389;0;0"
![Stacks Image 8057](files/stacks-image-fb7975b.png)
![Stacks Image 8078](files/stacks-image-2fa2b37.png)
Bind User : cn=admin,dc=duchmol,dc=net
Bind Password : [mot de passe]
![Stacks Image 8099](files/stacks-image-2d7c8f3.png)
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;bind_dn;cn=admin,dc=duchmol,dc=net"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;bind_pass;motdepasse"
Protocol version : 3
![Stacks Image 8128](files/stacks-image-c20555f.png)
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;protocol_version;3"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;ldap_template;Posix"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_base_search;ou=users,o=maboite,dc=duchmol,dc=net"
./centreon -u admin -p password -o LDAP -a SETPARAM -v 'ldap duchmol;user_filter;(&(uid=%s)(objectClass=inetOrgPerson))'
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;alias;uid"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_name;cn"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_firstname;givenname"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_lastname;sn"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_email;mail"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;user_pager;mobile"
./centreon -u admin -p password -o LDAP -a SETPARAM -v 'ldap duchmol;group_filter;(&(cn=%s)(objectClass=groupOfNames))'
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;group_name;cn"
./centreon -u admin -p password -o LDAP -a SETPARAM -v "ldap duchmol;group_member;member"
![Stacks Image 8157](files/stacks-image-1ba8aa6.png)
ldapsearch -h ldap.duchmol.net -p 389 -b "dc=duchmol,dc=net" -D "cn=admin,dc=duchmol,dc=net" -w [mot de passe] -P 3 -LLL "(&(uid=*)(objectClass=inetOrgPerson))"
dn: cn=jean.dupont,ou=users,o=maboite,dc=duchmol,dc=net objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: CourierMailAccount objectClass: top cn: jean.dupont gidNumber: 5000 givenName: jdupont homeDirectory: /home/vmail/ mail: jean.dupont@duchmol.net mailbox: duchmol.net/jean.dupont/ sn: dupont uid: jean.dupont uidNumber: 5000 quota: 500 userPassword:: e1NTSEF9Ny9TSVdwaGtwWHJ4YmdqRURBaTA2MG11V2VtSjdSRlg=
Search user base DN : ou=users,o=maboite,dc=duchmol,dc=net
![Stacks Image 8210](files/stacks-image-534bfb2.png)
![Stacks Image 8231](files/stacks-image-d8de98b-800x750.png)
8.1 Importer vos utilisateurs sur Centreon
![Stacks Image 8260](files/stacks-image-52393a6-800x154.png)
![Stacks Image 8281](files/stacks-image-781c07a-800x260.png)
8.2 Activation des logs LDAP
![Stacks Image 8310](files/stacks-image-00e144c.png)
[25/10/2014 18:11]LDAP Connect : trying url : ldap://ldap.duchmol.net:389/ [25/10/2014 18:11]LDAP Connect : Credentials : cn=admin,dc=duchmol,dc=net [25/10/2014 18:11]LDAP Search : Base DN : ou=users,o=maboite,dc=duchmol,dc=net [25/10/2014 18:11]LDAP Search : Filter : (&(uid=*)(objectClass=inetOrgPerson)) [25/10/2014 18:11]LDAP Search : Size Limit : 60 [25/10/2014 18:11]LDAP Search : Timeout : 60 [25/10/2014 18:11]LDAP Search : Error : Success [25/10/2014 18:11]LDAP Search : 3 entries found [25/10/2014 18:11]LDAP Search : 3 [25/10/2014 18:45] LDAP Search : XML Output :
![Stacks Image 8347](files/stacks-image-a059113-800x200.png)
8.3 Configuration minimale des utilisateurs
![Stacks Image 8376](files/stacks-image-a105675-800x414.png)
![Stacks Image 8397](files/stacks-image-da86d80-800x324.png)
./centreon -u admin -p password -o contact -a setParam -v "alain.durand;hostnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "alain.durand;svcnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "alain.durand;hostnotifcmd;host-notify-by-email"
./centreon -u admin -p password -o contact -a setParam -v "alain.durand;svcnotifcmd;service-notify-by-email"
./centreon -u admin -p password -o contact -a setParam -v "jean.dupont;hostnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "jean.dupont;svcnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "jean.dupont;hostnotifcmd;host-notify-by-email"
./centreon -u admin -p password -o contact -a setParam -v "jean.dupont;svcnotifcmd;service-notify-by-email"
./centreon -u admin -p password -o contact -a setParam -v "eric.coquard;hostnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "eric.coquard;svcnotifperiod;none"
./centreon -u admin -p password -o contact -a setParam -v "eric.coquard;hostnotifcmd;host-notify-by-email"
./centreon -u admin -p password -o contact -a setParam -v "eric.coquard;svcnotifcmd;service-notify-by-email"
8.4 Vérification de l'authentification
![Stacks Image 8434](files/stacks-image-59af0ad.png)
![Stacks Image 8455](files/stacks-image-6886f3a-800x374.png)
8.5 Vérification des logs
- ldap.log : utilisé pour l'authentification des utilisateurs sur Centreon
- ldapsearch.log : utilisé pour la recherche dans la base LDAP (importation des utilisateurs)
8.5a Exemple pour ldap.log
2014-03-26 09:49|-1|0|0|Connexion = cn=alain.durand,ou=users,o=maboite,dc=duchmol,dc=net :: Success 2014-03-26 09:49|-1|0|0|LDAP AUTH : OK, let's go !
2014-03-26 07:02|-1|0|0|Connexion = cn=alain.durand,ou=users,o=maboite,dc=duchmol,dc=net :: Invalid credentials 2014-03-26 07:02|-1|0|0|LDAP AUTH : LDAP don't like you, sorry
8.5b Exemple pour ldapsearch.log
[01/04/2014 07:47]LDAP Connect : trying url : ldap://ldap.duchmol.net:389/ [01/04/2014 07:47]LDAP Connect : Credentials : cn=admin,dc=duchmol,dc=net [01/04/2014 07:47]LDAP Connect : Bind : Can't contact LDAP server [01/04/2014 07:47]LDAP Connect : connection error
[01/04/2014 12:43]LDAP Connect : trying url : ldap://ldap.duchmol.net:389/ [01/04/2014 12:43]LDAP Connect : Credentials : cn=admin,dc=duchmol,dc=net [01/04/2014 12:43]LDAP Search : Base DN : ou=users,o=maboite,dc=duchmol,dc=net [01/04/2014 12:43]LDAP Search : Filter : (&(uid=*)(objectClass=inetOrgPerson)) [01/04/2014 12:43]LDAP Search : Size Limit : 60 [01/04/2014 12:43]LDAP Search : Timeout : 60 [01/04/2014 12:43]LDAP Search : Error : Success [01/04/2014 12:43]LDAP Search : 3 entries found [01/04/2014 12:43]LDAP Search : 3 [01/04/2014 12:31] LDAP Search : XML Output :