Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Nächste Überarbeitung | Vorherige Überarbeitung | ||
fortgeschrittene:ldap-config [2014/02/20 20:30] ingo_wichmann angelegt |
fortgeschrittene:ldap-config [2018/02/27 14:45] (aktuell) ingo_wichmann [bearbeiten] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | Schema auslesen: | + | ====== Tips & Tricks: OpenLDAP mit cn=config ====== |
- | ldapsearch -b cn=schema,cn=config -Y EXTERNAL -H ldapi:// -LLL dn | + | ===== root Zugriff auf slapd-Konfiguration geben ===== |
- | + | ||
- | Übersicht Server Konfiguration: | + | |
- | ldapsearch -b cn=config -Y EXTERNAL -H ldapi:// -LLL dn | + | |
- | + | ||
- | Übersicht Konfiguration des ersten Baums: | + | |
- | ldapsearch -b 'olcDatabase={1}hdb,cn=config' -Y EXTERNAL -H ldapi:// -LLL | + | |
''~/.ldaprc'' für root: | ''~/.ldaprc'' für root: | ||
- | <file> | + | <file txt ~/.ldaprc> |
- | URI ldapi:// | + | URI ldapi:/// |
BASE cn=config | BASE cn=config | ||
SASL_MECH EXTERNAL | SASL_MECH EXTERNAL | ||
</file> | </file> | ||
+ | |||
+ | ==== Übersicht Server Konfiguration ==== | ||
+ | ldapsearch -LLL dn | ||
+ | |||
+ | ==== Schema auslesen ==== | ||
+ | ldapsearch -b cn=schema,cn=config -LLL dn | ||
+ | |||
+ | ==== Welche Verzeichnisse/Bäume sind enthalten ==== | ||
+ | ldapsearch -LLL '(olcSuffix=*)' olcSuffix | ||
+ | |||
+ | ==== Übersicht Konfiguration des ersten (Daten-)Baums ==== | ||
+ | ldapsearch -b 'olcDatabase={1}mdb,cn=config' -LLL | ||
+ | |||
+ | ===== LDAP ACL ===== | ||
+ | ==== lesen ==== | ||
+ | ldapsearch -LL -b olcDatabase={1}mdb,cn=config olcAccess | ||
+ | |||
+ | ==== bearbeiten ==== | ||
+ | <file ldif olcAccess.ldif> | ||
+ | dn: olcDatabase={1}mdb,cn=config | ||
+ | changetype: modify | ||
+ | replace: olcAccess | ||
+ | olcAccess: {0}to attrs=userPassword | ||
+ | by self write | ||
+ | by dn="cn=admin,dc=example,dc=org" write | ||
+ | by anonymous auth | ||
+ | by * none | ||
+ | olcAccess: {1}to attrs=shadowLastChange | ||
+ | by self write | ||
+ | by dn="cn=admin,dc=example,dc=org" write | ||
+ | by * read | ||
+ | olcAccess: {2}to * | ||
+ | by dn="cn=admin,dc=example,dc=org" write | ||
+ | by * read | ||
+ | |||
+ | </file> | ||
+ | |||
+ | ldapmodify -f olcAccess.ldif | ||
+ | ===== Konfiguration bearbeiten ===== | ||
+ | ldapvi -Y EXTERNAL -b 'olcDatabase={1}mdb,cn=config' | ||
+ | |||