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 14:15. ] – [olcIdleTimeout] 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 804: | Zeile 805: | ||
| </ | </ | ||
| - | ==== 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: | ||
| - | olcPidFile: / | ||
| - | olcTLSCACertificatePath: | ||
| - | olcTLSCertificateFile: | ||
| - | olcTLSCertificateKeyFile: | ||
| - | olcReferral: | ||
| - | |||
| - | # search result | ||
| - | search: 2 | ||
| - | result: 0 Success | ||
| - | |||
| - | # numResponses: | ||
| - | # numEntries: 1</ | ||
| ==== baseDN ==== | ==== baseDN ==== | ||
| Zeile 863: | 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 / |
| <file ldif / | <file ldif / | ||
| Zeile 976: | Zeile 923: | ||
| # numEntries: 1</ | # 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 / | ||
| - | ==== weitere Konfigurationsbeispiele und -schritte ==== | + | <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:// | ||
| - | <WRAP center round todo 60%> | + | dn: cn=config |
| - | Hier eine Liste der zusätzlichen Konfigurationsschritte einfügen! | + | changetype: modify |
| - | </WRAP> | + | add: olcIdleTimeout |
| + | olcIdleTimeout: | ||
| + | </file> | ||
| + | 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 1073: | 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~~ | + | |