Outils pour utilisateurs

Outils du site


services:ldap

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
services:ldap [2023/02/16 13:54] – créée gizmoservices:ldap [2025/08/29 08:28] (Version actuelle) – add replication evann
Ligne 1: Ligne 1:
 # OpenLDAP # OpenLDAP
 +https://datatracker.ietf.org/doc/html/rfc2252
 +https://www.alvestrand.no/objectid/1.3.6.1.4.1.1466.115.121.1.html
  
-Installé sur ldap01.grif, accessible en ldaps 636.+Installé sur auth01.grif et auth02.grif, accessible en ldaps 636
 + 
 +Conf dispo dans `/etc/openldap/`. 
 + 
 +### Ajouter un attribut à un schéma 
 + 
 +``` 
 +[root@ldap01 ~]# cat /usr/local/etc/openldap/schema/grifon.schema  
 +attributetype ( 1.3.6.1.4.1.52011.2 NAME 'CodeAdherent' 
 +    EQUALITY caseIgnoreMatch 
 +    SUBSTR caseIgnoreSubstringsMatch 
 +    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
 + 
 +attributetype ( 1.3.6.1.4.1.52011.3 NAME 'Company' 
 +    EQUALITY caseIgnoreMatch 
 +    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
 + 
 +objectclass ( 1.3.6.1.4.1.52011.1 NAME 'GRIFObject' 
 +    SUP top 
 +    AUXILIARY 
 +    MAY ( CodeAdherent $ Company )) 
 +    !/* 
 + 
 +``` 
 + 
 +``` 
 +[root@ldap01 ~]# service slapd restart 
 +Stopping slapd. 
 +Performing sanity check on slap configuration: OK 
 +Starting slapd. 
 + 
 +``` 
 + 
 +### Replication du ldap :  
 + 
 +Le ldap est repliqué en mode [mirroir](https://www.openldap.org/doc/admin25/replication.html). Une ecriture sur auth01.grif entrainera une ecriture sur le ldap de auth02.grif et inversement. 
 + 
 +La configuration est relativement simple, pour chaque serveur il faut uniquement changer le `serverID` et l'url du provider : 
 + 
 +``` 
 +serverID 01 
 + 
 +[...] 
 + 
 +overlay syncprov 
 +syncprov-checkpoint 100 10 
 +syncprov-sessionlog 100 
 + 
 +syncrepl      rid=001 
 +              provider=ldap://auth02.grif 
 +       starttls=critical 
 +              bindmethod=simple 
 +              binddn="cn=syncrepl,dc=grifon,dc=fr" 
 +              credentials="blah" 
 +              searchbase="dc=grifon,dc=fr" 
 +              schemachecking=on 
 +              type=refreshAndPersist 
 +              retry="60 +" 
 + 
 +mirrormode on 
 +``` 
 + 
 +> Oui le mot de passe est en clair, parce que le sasl c'est la merde a mettre en place ...
  
-Conf dispo dans /usr/local/etc/openldap/. 
services/ldap.1676555667.txt.gz · Dernière modification : de gizmo