This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docpublic:systemes:ldap:ldapc8 [2020/01/10 17:55] procacci@tem-tsp.eu [config initiale] |
docpublic:systemes:ldap:ldapc8 [2020/01/24 14:39] (current) procacci@tem-tsp.eu [reconstruction de base] |
||
|---|---|---|---|
| Line 331: | Line 331: | ||
| dn: cn={15}samba, | dn: cn={15}samba, | ||
| dn: cn={16}autofs, | dn: cn={16}autofs, | ||
| + | </ | ||
| + | |||
| + | ==== mdb racine tree ==== | ||
| + | |||
| + | Fichier ldif racine de l' | ||
| + | |||
| + | |||
| + | < | ||
| + | # cat / | ||
| + | dn: dc=int, | ||
| + | dc: int | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | objectClass: | ||
| + | associatedDomain: | ||
| + | </ | ||
| + | |||
| + | === ldapadd racine === | ||
| + | |||
| + | < | ||
| + | [root@ldap8 openldap]# ldapadd -H ldapi:// | ||
| + | SASL/ | ||
| + | SASL username: gidNumber=0+uidNumber=0, | ||
| + | SASL SSF: 0 | ||
| + | adding new entry " | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== import initial / restore ===== | ||
| + | |||
| + | s'il s'agit d'une migration, il est necessaire de recuperer un contenu d' | ||
| + | |||
| + | ==== reconstruction de base ==== | ||
| + | |||
| + | on part de rien et on reconstruit tout notre annauire a base d'un script (utile si operation repetée) | ||
| + | |||
| + | vider les fichiers DB apres avoir arreter slapd :!: ceci detruit tout l' | ||
| + | |||
| + | < | ||
| + | [root@ldap8 var]# systemctl stop slapd.service | ||
| + | |||
| + | [root@ldap8 var]# rm openldap-data/ | ||
| + | rm : supprimer ' | ||
| + | rm : supprimer ' | ||
| + | </ | ||
| + | |||
| + | reconstruction de la configuration dynamique (OLC) depuis un slapd.conf | ||
| + | |||
| + | < | ||
| + | [root@ldap8 openldap]# ./ | ||
| + | 5e2af9bf / | ||
| + | config file testing succeeded | ||
| + | Job for slapd.service failed because the control process exited with error code. | ||
| + | See " | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | [root@ldap8 openldap]# time / | ||
| + | 5e2af79d / | ||
| + | .#################### | ||
| + | Closing DB... | ||
| + | |||
| + | real 0m8, | ||
| + | user 0m2, | ||
| + | sys 0m4, | ||
| + | [root@ldap8 openldap]# | ||
| + | </ | ||
| + | ==== admin de config ==== | ||
| + | |||
| + | creation d'un compte administrateur de configuration independant le la database d' | ||
| + | |||
| + | * ref: https:// | ||
| + | |||
| + | passage par slapd.conf | ||
| + | |||
| + | < | ||
| + | database config | ||
| + | rootdn | ||
| + | # Cleartext passwords, especially for the rootdn, should | ||
| + | # be avoid. | ||
| + | # Use of strong authentication encouraged. | ||
| + | rootpw | ||
| </ | </ | ||