This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docpublic:systemes:ldap:ldap_lsc [2015/11/29 10:54] procacci@tem-tsp.eu [log ldap dans rsyslog] |
docpublic:systemes:ldap:ldap_lsc [2015/12/01 15:43] (current) procacci@tem-tsp.eu [suppression] |
||
|---|---|---|---|
| Line 86: | Line 86: | ||
| - | Preparation d'un scenario de synchro de ldap vers ldap | + | Preparation d'un scenario de synchro de ldap evry |
| < | < | ||
| - | [root@lsc lsc]# mkdir /etc/lsc/ldap2ldap | + | [root@lsc lsc]# mkdir /etc/lsc/ldapevry2ldapimt |
| - | [root@lsc lsc]# cd ldap2ldap/ | + | [root@lsc lsc]# cd /etc/ |
| - | [root@lsc | + | [root@lsc |
| - | [root@lsc | + | [root@lsc |
| - | [root@lsc | + | [root@lsc |
| </ | </ | ||
| + | |||
| + | a suivre [[.: | ||
| ==== installation openldap-servers ==== | ==== installation openldap-servers ==== | ||
| Line 213: | Line 215: | ||
| </ | </ | ||
| + | et de la sous branche people | ||
| + | |||
| + | < | ||
| + | [root@lsc ~]# vim people.ldif | ||
| + | [root@lsc ~]# ldapadd -f people.ldif -H ldap:// | ||
| + | adding new entry " | ||
| + | |||
| + | [root@lsc ~]# cat people.ldif | ||
| + | dn: ou=people, | ||
| + | changetype: add | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | ou: people | ||
| + | </ | ||
| + | |||
| + | contenu actuel de notre " | ||
| + | |||
| + | < | ||
| + | [root@lsc ~]# ldapsearch -x objectclass=* -H ldap:// | ||
| + | Enter LDAP Password: | ||
| + | dn: dc=mines-telecom, | ||
| + | |||
| + | dn: ou=people, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Config LSC synchro ldap2ldap ===== | ||
| + | |||
| + | |||
| + | le principe ici est de synchroniser des annuaires ldap vers un annuaire mutualisé assurant la fusion des annuaires d' | ||
| + | |||
| + | Ici , on fait une exclusion des objectclass et attributs non indispensables a un annuaire pages blanches via le < | ||
| + | |||
| + | < | ||
| + | [root@lscimt ldapevry2ldapimt]# | ||
| + | <?xml version=" | ||
| + | <lsc xmlns=" | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== synchro ===== | ||
| + | |||
| + | < | ||
| + | [root@lsc ldapevry2ldapimt]# | ||
| + | 11: | ||
| + | 11: | ||
| + | 11: | ||
| + | 11: | ||
| + | 11: | ||
| + | |||
| + | nov. 30 11:41:14 - INFO - Reflections took 105 ms to scan 1 urls, producing 55 keys and 115 values | ||
| + | nov. 30 11:41:15 - INFO - Logging configuration successfully loaded from / | ||
| + | nov. 30 11:41:15 - INFO - LSC configuration successfully loaded from / | ||
| + | nov. 30 11:41:15 - INFO - Connecting to LDAP server ldap:// | ||
| + | nov. 30 11:41:15 - INFO - Connecting to LDAP server ldap:// | ||
| + | nov. 30 11:41:15 - INFO - Starting sync for user | ||
| + | nov. 30 11:41:15 - INFO - # Adding new object cn=Guy BERNARD, | ||
| + | # Mon Nov 30 11:41:15 CET 2015 | ||
| + | dn: cn=Jacques MARTIN, | ||
| + | changetype: add | ||
| + | employeeType:: | ||
| + | mail: jacques.martin@tem-tsp.eu | ||
| + | sn: MARTIN | ||
| + | departmentNumber: | ||
| + | cn: Jacques MARTIN | ||
| + | telephoneNumber: | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | givenName: Jacques | ||
| + | |||
| + | nov. 30 11:41:15 - INFO - All entries: 5, to modify entries: 5, successfully modified entries: 5, errors: 0 | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== modification d' | ||
| + | |||
| + | il est possible de modifier à la volée des valeurs d' | ||
| + | |||
| + | Exemple d' | ||
| + | ici si à la source departmentNumber contient MCI alors le transformer en DSI : | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | var department = srcBean.getDatasetFirstValueById(" | ||
| + | if ( department == " | ||
| + | department; | ||
| + | ]]></ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | log associés a cette synchro | ||
| + | |||
| + | < | ||
| + | nov. 30 14:45:17 - INFO - # Updating object cn=Jacques MARTIN, | ||
| + | nov. 30 14:45:17 - INFO - # Updating object cn=Albert MARTIN, | ||
| + | # Mon Nov 30 14:45:17 CET 2015 | ||
| + | dn: cn=Jacques MARTIN, | ||
| + | changetype: modify | ||
| + | replace: departmentNumber | ||
| + | departmentNumber: | ||
| + | - | ||
| + | |||
| + | # Mon Nov 30 14:45:17 CET 2015 | ||
| + | dn: cn=Albert MARTIN, | ||
| + | changetype: modify | ||
| + | replace: departmentNumber | ||
| + | departmentNumber: | ||
| + | - | ||
| + | |||
| + | nov. 30 14:45:17 - INFO - All entries: 5, to modify entries: 2, successfully modified entries: 2, errors: 0 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== suppression ===== | ||
| + | |||
| + | pour supprimer un compte il faut ajouter l' | ||
| + | |||
| + | < | ||
| + | -c,--clean < | ||
| + | tasks or ' | ||
| + | </ | ||
| + | et aussi s' | ||
| + | |||
| + | < | ||
| + | déc. 01 14:29:00 - INFO - Starting sync for user | ||
| + | déc. 01 14:29:00 - ERROR - Empty or non existant source (no IDs found) | ||
| + | </ | ||
| + | |||
| + | voici l' | ||
| + | < | ||
| + | [root@lsc ldap2ldapmintel]# | ||
| + | ... | ||
| + | déc. 01 15:21:52 - INFO - Reflections took 104 ms to scan 1 urls, producing 55 keys and 115 values | ||
| + | déc. 01 15:21:52 - INFO - Logging configuration successfully loaded from / | ||
| + | déc. 01 15:21:52 - INFO - LSC configuration successfully loaded from / | ||
| + | déc. 01 15:21:52 - INFO - Connecting to LDAP server ldap:// | ||
| + | déc. 01 15:21:52 - INFO - Connecting to LDAP server ldap:// | ||
| + | déc. 01 15:21:52 - INFO - Starting sync for user | ||
| + | déc. 01 15:21:52 - ERROR - Empty or non existant source (no IDs found) | ||
| + | déc. 01 15:21:52 - INFO - Starting clean for user | ||
| + | déc. 01 15:21:52 - INFO - # Removing object cn=Jacques MARTIN, | ||
| + | # Tue Dec 01 15:21:52 CET 2015 | ||
| + | dn: cn=Jacques MARTIN, | ||
| + | changetype: delete | ||
| + | |||
| + | déc. 01 15:21:52 - INFO - All entries: 6, to modify entries: 1, successfully modified entries: 1, errors: 0 | ||
| + | </ | ||