This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docpublic:systemes:ldap:ldapc8reppartiel [2020/02/11 21:54] procacci@tem-tsp.eu [rebuild script] |
docpublic:systemes:ldap:ldapc8reppartiel [2020/02/15 07:46] (current) procacci@tem-tsp.eu [acl] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== replica ==== | ||
| + | |||
| + | === ref === | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| ===== package ltb-project ===== | ===== package ltb-project ===== | ||
| Line 21: | Line 32: | ||
| chown -R ldap:ldap / | chown -R ldap:ldap / | ||
| systemctl start slapd | systemctl start slapd | ||
| + | </ | ||
| + | |||
| + | ===== ACL ldap master ==== | ||
| + | |||
| + | sur le master ldap il faut disposer d'un compte de replication qui a le droit en lecture sur toutes les arborecences et attributs necessaires a notre replica | ||
| + | |||
| + | notament sur l' | ||
| + | |||
| + | < | ||
| + | #JP acl | ||
| + | # continue pour que repint puisse lire dans la replication son propre pass et pas seulement faire du auth | ||
| + | # cf https:// | ||
| + | # finalement pas utile car pour etre self il faut d' | ||
| + | access to attrs=userPassword | ||
| + | by self auth continue | ||
| + | by anonymous | ||
| + | by dn=" | ||
| + | by * none | ||
| + | | ||
| + | #Voir le root DSE + base DN , cf http:// | ||
| + | access to dn.subtree=" | ||
| + | by dn=" | ||
| + | by * read | ||
| + | ... | ||
| + | | ||
| </ | </ | ||
| Line 93: | Line 129: | ||
| # attribut userpassword, | # attribut userpassword, | ||
| access to attrs=userPassword | access to attrs=userPassword | ||
| - | by self auth | ||
| by anonymous | by anonymous | ||
| by dn=" | by dn=" | ||
| Line 112: | Line 147: | ||
| </ | </ | ||
| + | |||
| + | ===== syncrepl partiel ===== | ||
| + | |||
| + | enfin la configuration de replication partielle a base de syncrepl , on ne replique que la branche ou=people et seulement certains attributs "pages blanches" | ||
| + | |||
| + | < | ||
| + | [root@ldapex openldap]# cat slapd.sync.conf | ||
| + | syncrepl rid=001 | ||
| + | provider=ldaps:// | ||
| + | type=refreshAndPersist | ||
| + | searchbase=" | ||
| + | filter=" | ||
| + | attrs=" | ||
| + | scope=sub | ||
| + | schemachecking=off | ||
| + | bindmethod=simple | ||
| + | retry=" | ||
| + | keepalive=" | ||
| + | binddn=" | ||
| + | credentials=" | ||
| + | updateref | ||
| + | </ | ||
| + | |||
| + | la liste des parametres syncrepl est dans le man slapd.conf | ||
| + | |||
| + | < | ||
| + | https:// | ||
| + | | ||
| + | syncrepl rid=< | ||
| + | [interval=dd: | ||
| + | [attrs=< | ||
| + | [timeout=< | ||
| + | [credentials=< | ||
| + | [tls_cert=< | ||
| + | [tls_ciphersuite=< | ||
| + | [syncdata=default|accesslog|changelog] | ||
| + | </ | ||
| ===== rebuild script ===== | ===== rebuild script ===== | ||
| - | Script qui permet de recontruire complement | + | Script qui permet de reconstruire completement |
| + | - avec injection de l' | ||
| + | - puis relance avec syncrepl pour recuperer toutes les entrées | ||
| < | < | ||
| - | [root@ldapex openldap]# cat disiRebuildAllRep.sh | + | [root@ldapex openldap]# cat RebuildAllRep.sh |
| + | ## 1st pass from delete all current database and init a fresh one | ||
| #stop slapd service | #stop slapd service | ||
| systemctl stop slapd | systemctl stop slapd | ||
| Line 140: | Line 215: | ||
| #pause 1s with sleep 1 | #pause 1s with sleep 1 | ||
| sleep 1 | sleep 1 | ||
| + | ################################################################################### | ||
| + | ## 2nd pass to introduce syncrepl and build all sync data from master | ||
| #stop slapd service again this time to reload config with syncrepl enabled | #stop slapd service again this time to reload config with syncrepl enabled | ||
| systemctl stop slapd | systemctl stop slapd | ||