8 Configuration LDAP - Centreon 2.4.5
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"
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"
Bind User : cn=admin,dc=duchmol,dc=net
Bind Password : [mot de passe]
./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
./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"
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
8.1 Importer vos utilisateurs sur Centreon
8.2 Activation des logs LDAP
[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 :
8.3 Configuration minimale des utilisateurs
./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
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 :