Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:ldap_c7:install [15.07.2015 12:32. ] – [baseDN] django | centos:ldap_c7:install [20.11.2018 13:54. ] (aktuell) – [olcLogLevel] django | ||
---|---|---|---|
Zeile 6: | Zeile 6: | ||
LDAP ist ein Netzwerkprotokoll, | LDAP ist ein Netzwerkprotokoll, | ||
+ | Viele wertvolle Information und Konfigurationsbeispiele sind auf der Seite **[[http:// | ||
===== Installation ===== | ===== Installation ===== | ||
==== OpenLDAP - Server ==== | ==== OpenLDAP - Server ==== | ||
Zeile 741: | Zeile 742: | ||
Wie bei der **[[centos: | Wie bei der **[[centos: | ||
+ | Mit unter hilfreiche Zusatzinformationen bei der Konfiguration findet man unter anderem auf der Seite vom **[[https:// | ||
Zeile 802: | Zeile 804: | ||
</ | </ | ||
+ | |||
==== baseDN ==== | ==== baseDN ==== | ||
Zeile 807: | Zeile 810: | ||
Wie auch schon beim vorangegangenem Beispiel legen wir uns eine passende ldif-Datei an, in der wir dann die Benennung des **baseDN** vornehmen. | Wie auch schon beim vorangegangenem Beispiel legen wir uns eine passende ldif-Datei an, in der wir dann die Benennung des **baseDN** vornehmen. | ||
- | # vim / | + | # vim / |
<file ldif / | <file ldif / | ||
- | # setzen eines Passworts für den administrativen Zugang | + | # setzen eines baseDN, der Wurzelknoten unseres Verzeichnisbaums |
- | # https:// | + | # https:// |
+ | dn: olcDatabase={1}monitor, | ||
+ | changetype: modify | ||
+ | replace: olcAccess | ||
+ | olcAccess: {0}to * by dn.base=" | ||
+ | |||
+ | dn: olcDatabase={2}hdb, | ||
+ | changetype: modify | ||
+ | replace: olcSuffix | ||
+ | olcSuffix: dc=nausch, | ||
+ | |||
+ | dn: olcDatabase={2}hdb, | ||
+ | changetype: modify | ||
+ | replace: olcRootDN | ||
+ | olcRootDN: cn=Manager, | ||
</ | </ | ||
+ | Mittels **ldapmodify** führen wir nun die Änderungen unserer ldif-Datei aus. | ||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | < | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | modifying entry " | ||
- | ==== weitere Konfigurationsbeispiele und -schritte ==== | + | modifying entry " |
+ | </ | ||
- | <WRAP center round todo 60%> | + | Zum Überprüfen, |
- | Hier eine Liste der zusätzlichen Konfigurationsschritte einfügen! | + | # ldapsearch -W -x -D cn=config -b cn=config | grep -b1 cn=Manager |
- | </ | + | |
+ | Enter LDAP Password: | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | -- | ||
+ | 62897-</ | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | </ | ||
+ | |||
+ | ==== Manager-Passwort ==== | ||
+ | Wie auch schon beim Erstellen des **[[centos: | ||
+ | |||
+ | Zur Generierung dieses Passwortes mit der Verschlüsselungsmethode SSHA - entsprechend einem SHA-1 Algorithmus (FIPS 160-1), verwenden wir wieder das Programm **/ | ||
+ | # / | ||
+ | |||
+ | New password: | ||
+ | | ||
+ | | ||
+ | |||
+ | Dieses gekryptete Passwort hinterlegen wir nun in einer passenden ldif-Datei. | ||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | # setzen eines Passworts für den Manager | ||
+ | # https:// | ||
+ | |||
+ | dn: olcDatabase={2}hdb, | ||
+ | changetype: modify | ||
+ | add: olcRootPW | ||
+ | olcRootPW: {SSHA}MwDWrwwRnw95zMtKA5bS/ | ||
+ | </ | ||
+ | |||
+ | Die Konfigurationsänderungen werden wie gehabt mit Aufruf des Befehls **ldapmodify** aktiviert. | ||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | Ob unsere Änderungen auch wirklich entsprechend unserer ldif-Datei angelegt und geändert wurden, können wir wie folgt überprüfen. | ||
+ | |||
+ | # | ||
+ | |||
+ | Enter LDAP Password: | ||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=*) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # {2}hdb, config | ||
+ | dn: olcDatabase={2}hdb, | ||
+ | objectClass: | ||
+ | objectClass: | ||
+ | olcDatabase: | ||
+ | olcDbDirectory: | ||
+ | olcDbIndex: objectClass eq,pres | ||
+ | olcDbIndex: ou, | ||
+ | olcSuffix: dc=nausch, | ||
+ | olcRootDN: cn=Manager, | ||
+ | olcRootPW: {SSHA}MwDWrwwRnw95zMtKA5bS/ | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1</ | ||
+ | |||
+ | ==== olcIdleTimeout ==== | ||
+ | Mit Hilfe dieses Parameters wird definiert, nach wie vielen Sekunden ein Klient-Verbindung mittels eines **unbind** erzwungen werden soll. | ||
+ | |||
+ | Wir legen uns also eine passende Konfigurationsdatei an und weisem dem Parameter einen Wert von 30 Sekunden zu. | ||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | # Django : 2015-07-15 | ||
+ | # Definition der max. idle-Zeit nach der die Trennung der Verbindung zum | ||
+ | # Klient durch einen *unbind* erzwungen werden soll. | ||
+ | # https:// | ||
+ | |||
+ | dn: cn=config | ||
+ | changetype: modify | ||
+ | add: olcIdleTimeout | ||
+ | olcIdleTimeout: | ||
+ | </ | ||
+ | |||
+ | Die Änderung unserer OpenLDAP-Konfiguration, | ||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | Auch hier können wir überprüfen, | ||
+ | # ldapsearch -W -x -D cn=config -b cn=config " | ||
+ | |||
+ | Enter LDAP Password: | ||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=*) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # config | ||
+ | dn: cn=config | ||
+ | objectClass: | ||
+ | cn: config | ||
+ | olcArgsFile: | ||
+ | olcIdleTimeout: | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1 | ||
+ | </ | ||
+ | |||
+ | ==== olcTimeLimit ==== | ||
+ | Mit Hilfe dieses Parameters wird definiert, nach wie vielen Sekunden eine Suche im LDAP-Baum abgebrochen wird. | ||
+ | |||
+ | Wir legen uns also eine passende Konfigurationsdatei an und weisem dem Parameter einen wert von 15 Sekunden zu. | ||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | # Definition der max. search-Zeit nach der die Suche im LDAP-Baum abgebrochen | ||
+ | # wird. | ||
+ | # https:// | ||
+ | |||
+ | dn: cn=config | ||
+ | changetype: modify | ||
+ | add: olcTimeLimit | ||
+ | olcTimeLimit: | ||
+ | </ | ||
+ | |||
+ | Die Änderung unserer OpenLDAP-Konfiguration, | ||
+ | |||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | Auch hier überprüfen wir, ob der zusätzliche Konfigurationsparameter richtig gesetzt wurde. | ||
+ | |||
+ | # ldapsearch -W -x -D cn=config -b cn=config " | ||
+ | |||
+ | Enter LDAP Password: | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=olcGlobal) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # config | ||
+ | dn: cn=config | ||
+ | objectClass: | ||
+ | cn: config | ||
+ | olcArgsFile: | ||
+ | olcIdleTimeout: | ||
+ | olcPidFile: / | ||
+ | olcTimeLimit: | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1 | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== olcReferral ==== | ||
+ | Mit der Directive **olcReferral** kann ein LDAP-Server dem anfragenden Client mitteilen an welchen Server sich wenden soll, sofern die Anfrage nicht selbst beantwortet werden kann oder weil die Anfrage fehlerhaft war. | ||
+ | |||
+ | Zur Definition des **olcReferral** legen wir uns wieder eine zugehörige Datei an. | ||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | # setzen des zuständigen LDAP-Servers bei Anfagen, die entweder fehlerhaft ware, | ||
+ | # oder die der Server nicht beantworten konnte. | ||
+ | # https:// | ||
+ | |||
+ | dn: cn=config | ||
+ | changetype: modify | ||
+ | add: olcReferral | ||
+ | olcReferral: | ||
+ | </ | ||
+ | |||
+ | Die Konfigurationsänderungen aktivieren wir wie gehabt mit Aufruf des Befehls ldapmodify. | ||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | Ob unsere Änderungen entsprechend unserer ldif-Datei angelegt und geändert wurden, können wir wie folgt überprüfen. | ||
+ | # ldapsearch -W -x -D cn=config -b cn=config " | ||
+ | |||
+ | Enter LDAP Password: | ||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=olcGlobal) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # config | ||
+ | dn: cn=config | ||
+ | objectClass: | ||
+ | cn: config | ||
+ | olcArgsFile: | ||
+ | olcIdleTimeout: | ||
+ | olcPidFile: / | ||
+ | olcReferral: | ||
+ | olcTimeLimit: | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1</ | ||
+ | |||
+ | ==== olcLogLevel ==== | ||
+ | |||
+ | FIXME | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | changetype: modify | ||
+ | add: olcLogLevel | ||
+ | olcLogLevel: | ||
+ | |||
+ | |||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | |||
+ | # ldapsearch -W -x -D cn=config -b cn=config " | ||
+ | |||
+ | # Enter LDAP Password: | ||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=olcGlobal) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # config | ||
+ | dn: cn=config | ||
+ | objectClass: | ||
+ | cn: config | ||
+ | olcArgsFile: | ||
+ | olcDisallows: | ||
+ | olcIdleTimeout: | ||
+ | olcPidFile: / | ||
+ | olcReferral: | ||
+ | olcRequires: | ||
+ | olcTimeLimit: | ||
+ | olcTLSCACertificateFile: | ||
+ | olcTLSCACertificatePath: | ||
+ | olcTLSCertificateFile: | ||
+ | olcTLSCertificateKeyFile: | ||
+ | olcTLSCipherSuite: | ||
+ | olcTLSDHParamFile: | ||
+ | olcTLSProtocolMin: | ||
+ | olcLogLevel: | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1</ | ||
+ | |||
+ | |||
+ | # vim / | ||
+ | |||
+ | <file ldif / | ||
+ | changetype: modify | ||
+ | add: olcLogLevel | ||
+ | olcLogLevel: | ||
+ | |||
+ | # ldapmodify -Y EXTERNAL -H ldapi:/// -f / | ||
+ | < | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | modifying entry " | ||
+ | |||
+ | |||
+ | # ldapsearch -W -x -D cn=config -b cn=config " | ||
+ | |||
+ | Enter LDAP Password: | ||
+ | < | ||
+ | # | ||
+ | # LDAPv3 | ||
+ | # base < | ||
+ | # filter: (objectclass=olcGlobal) | ||
+ | # requesting: ALL | ||
+ | # | ||
+ | |||
+ | # config | ||
+ | dn: cn=config | ||
+ | objectClass: | ||
+ | cn: config | ||
+ | olcArgsFile: | ||
+ | olcDisallows: | ||
+ | olcIdleTimeout: | ||
+ | olcPidFile: / | ||
+ | olcReferral: | ||
+ | olcRequires: | ||
+ | olcTimeLimit: | ||
+ | olcTLSCACertificateFile: | ||
+ | olcTLSCACertificatePath: | ||
+ | olcTLSCertificateFile: | ||
+ | olcTLSCertificateKeyFile: | ||
+ | olcTLSCipherSuite: | ||
+ | olcTLSDHParamFile: | ||
+ | olcTLSProtocolMin: | ||
+ | olcLogLevel: | ||
+ | olcLogLevel: | ||
+ | |||
+ | # search result | ||
+ | search: 2 | ||
+ | result: 0 Success | ||
+ | |||
+ | # numResponses: | ||
+ | # numEntries: 1</ | ||
===== erste LDAP-Abfragen ===== | ===== erste LDAP-Abfragen ===== | ||
Zeile 913: | Zeile 1298: | ||
Jul 15 13:30:42 vml000037 slapd[3620]: | Jul 15 13:30:42 vml000037 slapd[3620]: | ||
- | Bei den //**err=**-Codes// in der LDAP-Logdatei handelt es sich keineswegs nur um Error-Meldungen. Vielmehr werden hier viele Rückmeldungen in Zahlenwerte codiert, wie z.B. **err=0** für **O.K.**. | + | Bei den // |
Eine Auflistung der gängigen Rückmeldecodes ist [[http:// | Eine Auflistung der gängigen Rückmeldecodes ist [[http:// | ||
====== Links ====== | ====== Links ====== | ||
- | * **⇒ [[centos: | + | * **⇒ [[centos: |
* **[[centos: | * **[[centos: | ||
* **[[wiki: | * **[[wiki: | ||
* **[[http:// | * **[[http:// | ||
- | ~~DISCUSSION~~ | + |