Frage(n) zu Cyrus,Kerberos,Openldap
Hallo Liste, ich möchte in meinem kleinen Netz ldap installieren. Ich hoffe ich habe das Prinzip von ldap verstanden. Ldap ist so eine Art spezialisierte Datenbank um (zb) Userauthentifizierung netzwerkweit zu managen ? Wenn das stimmt, kann ich ldap für squid,apache,samba, Netscape (oder allgemein Browser),Datenbanken (zb mysql, Sybase,postgres,oracle), Passwörter (Windoof,Linux,FreeBSD,OS2) verwenden ? Welche weiteren Möglichkeiten zur Einbeziehung von ldap gibt es ? Ich habe mich die letzten Tage im Internet schlau gemacht (bzw es versucht). Ich glaube nun zu wissen, daß eine Kombination von Kerberos5/cyrus-sasl/openldap geeignet ist, um oben genannte Bedingungen zu erfüllen. Leider verstehe ich die Zusammenhänge noch nicht so ganz. Kerberos wird zur Authentifizierung verwendet, gilt das für Passwörter oder ist das eine andere Art von Authentifizierung (zb so eine Art erlaubte Hosts ?) ? Wofür verwendet man dann cyrus-sasl ? Openldap greift dann auf services von kerberos/cyrus-sasl zu ? Mein Problem ist, daß ich inzwischen so viel gelesen habe, daß ich den Überblich verloren habe. Einige Seiten bieten Konfigurationshilfen an, leider habe ich erst zu spät bemerkt, daß die meisten veraltet sind (oder ich glaube das nur). Wo kann ich eine (aktuelle) Seite finden, die mir all diese Dinge und Zusammenhänge erklärt und Hilfe bei der Planung und Konfiguration gibt. Am besten wäre ein Tutorial, egal ob in deutsch oder enlisch. Ach ja, PAM brauche ich für die Passwörter ? Wenn ich die gesamte Authentifizierung über einen zentralen Host mache, was passiert im worst-case-Szenario, wenn dieser Host ausfällt ? Sind dann alle anderen Rechner im Netz total aufgeschmissen, weil man sich (zb) nicht mehr einloggen kann ? Das waren viele Fragen, ich habe jetzt noch ein paar spezielle zu ldap. Mein Netzwerk heißt hrnet.de (fiktiv !). Der Rechner auf dem ldap läuft heißt rechner.hrnet.de Ein Benutzer sei harry , Realname Harry Rüter (also ich :o), ich bin natürlich Manager/root/admin etc ... ---------------------------------------- ldap.conf : BASE dc=hrnet, dc=de (Was bedeutet BASE ? Was bedeutet dc ? ) (Stimmt dann :) suffix "o=hrnet.de" (o bedeutet Organisation ,so eine Art Root-verzeichnis ?) HOST rechner.hrnet.de (ist der Rechner auf dem der ldap läuft ?) (Was bedeutet der Eintrag ?) index default pres,eq ---------------------------------------- slapd.access : (Schreibzugriffe ?) : ----------------------------------------------------- # which they have write access to access to dn=".*,ou=Roaming,dc=.*" (Wäre das so korrekt ?) by dn="hrnet.de" write by dn="uid=Manager.+\+realm=rechner.hrnet.de" write by dnattr=owner write by * none ------------------------------------------------- (Authentifizierung,Passwörter sollten vom Benutzer geändert werden können, ander (Programme) sollen sie nur lesen/verwenden ?) -------------------------------------------------- # Some things should be editable by the owner, and viewable by anyone... access to attr=cn,givenName,sn,krbName,krb5PrincipalName,gecos by dn="manager" write by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write (kann dann nur vom dap-Rechner aus geändert werden, was machen die Client-Rechner ?) by self write by users read --------------------------------------------- (Nochmal Authentifizierung ?) access to attr=loginShell,gecos by dn="hrnet.de" write by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write by self write by * read ------------------------------------------------ (Kerberos) # since we're using {KERBEROS}<PRINCIPAL>, we can't allow the user # to change the password. They have to use the Kerberos 'kpasswd' to # do this... But the admin can change (if need be). # Please see krb5 userPassword attribute (Wie können dann beliebige user ihr Passwort ändern ?) access to attr=userPassword by dn="cn=admin,ou=People,dc=papadoc,dc=bayour,dc=com" write (welche dc nehme ich denn jetzt,was ist eigentlich dc ?) by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write by anonymous auth by * none ------------------------------------------------------------ (Nochmal Authentifizierung :-( ) # authenticate! access to attr=mail,mailAlternateAddress,mailHost by dn="YOURADMINDN" write (Also "YOURADMINDN" = Manager ?) by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write by users read by * none ------------------------------------------------------- (Lese/Schreibrechte:) # Should not be readable to anyone, and only editable by admin... access to attr=mailQuota,trustModel,accessTo by dn="YOURADMINDN" write (Also "YOURADMINDN" = Manager ?) by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write by self read by * none # The admin dn has full write access (Logo ..) access to * by dn="YOURADMINDN" write (Also "YOURADMINDN" = Manager ?) by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write by * read ------------------------------------------------------------- Da ergeben sich viele Fragen: ich versuche mal einen Baum der Abhängigkeiten zu malen : o (Organisation = Root-Verzeichnis) / \ ou ou (Organisations-Unit = Untereinheit zb Personen,Mitarbeiter,Rechner) (Beispiel Person) / \ / \ uid = harry uid = anyone (echte Personen, Nutzerdaten (bank)) | dn: uid = harry (Was ist denn jetzt dn ?) uid: harry (Hatte ich doch schon definiert, oder ?) cn: Harry Rüter (Watt is cn ?) .... (Weitere Attribute zb Adresse,email etc ..) userpassword: {CRYPT} XTRZZT&RHF& (Wo kommt das denn her ?) --------------------------------------------- Ihr seht, ich komme nicht ganz klar, kann mir jemand die Kürzel o,ou,cn,dn,sn (und ale wichtigen die jetzt noch fehlen) erklären ? ------------------------------------- slapd.conf (Warum benötige ich eigentlich zwei Konfiguationsdateien slapd.conf,ldap.conf ?) (Was ist ein Schema,welche brauche ich ?) include /etc/openldap/schema/core.schema (Stimmt das dann so ?) database ldbm suffix "dc=hrnet,dc=de" rootdn "cn=Manager,dc=hrnet,dc=de" (Datenbank-Verzeichnis ?) directory /var/lib/openldap (Was s denn das jetzt ?) # Indices to maintain index objectClass eq ---------------------------------------------- Wow, das ist eine ziemlich lange Mail geworden. Ich hoffe ihr seid jetzt nicht sauer ob meiner Unwissenheit, ich glaube mir müsse einfach ein paar Zusammenhänge erklärt werden, ein Beispiel gezeigt werden,damit ich - darauf aufbauend - weiter machen kann. Was ist eigentlich wenn das ganze konfiguriert ist, werden neue Daten (zb neuer user) dann immer mit Kommandozeilenprogrammen (ldapadd ..) administriert, oder gibt es da GUI's/WEbinterfaces, die das komfortabler (remote) erledigen ? Ich hoffe ich habe euch mit meiner Fragerei nicht genervt, einen schönen Tag (trotz schlechtem Wetter) wünscht Harry PS.: Konfiguration fast vergessen :o) : Ich verwende (oder möchte verwenden) cyrus-sasl-1.5.27 krb5-1.2.2 (Kerberos) openldap-2.0.18 System : Suse 7.1 (mit allen nötigen (Sicherheits)updates) Kernel 2.4.17 (vanilla) glibc 2.2
Harry Rüter sagte:
Hallo Liste,
[...]
Wofür verwendet man dann cyrus-sasl ?
zur Authentifizierung, aber wenn Du mit ldap arbeiten willst, so musst Du PAM nutzen.
Openldap greift dann auf services von kerberos/cyrus-sasl zu ?
Mein Problem ist, daß ich inzwischen so viel gelesen habe, daß ich den Überblich verloren habe.
Einige Seiten bieten Konfigurationshilfen an, leider habe ich erst zu spät bemerkt, daß die meisten veraltet sind (oder ich glaube das nur).
Wo kann ich eine (aktuelle) Seite finden, die mir all diese Dinge und Zusammenhänge erklärt und Hilfe bei der Planung und Konfiguration gibt.
vieles im Zusammenhang mit sasl ist schon unter /usr/share/doc/packages/cyrus-sasl zu finden
Am besten wäre ein Tutorial, egal ob in deutsch oder enlisch.
Ach ja, PAM brauche ich für die Passwörter ?
nur, wenn Du ldap nutzen willst. mittels SASL wäre auch eine Authentifizierung möglich ( user+passwort)
Wenn ich die gesamte Authentifizierung über einen zentralen Host mache, was passiert im worst-case-Szenario, wenn dieser Host ausfällt ?
dann kann kein User auf seine Box zugreifen, da er sich nicht authentifizieren kann. Cyrus selbst passiert nichts, da die administration der user+folder von der authentifizierung getrennt ist.
Sind dann alle anderen Rechner im Netz total aufgeschmissen, weil man sich (zb) nicht mehr einloggen kann ?
Das waren viele Fragen, ich habe jetzt noch ein paar spezielle zu ldap.
...keine Ahnung (ich mache sasl) ;-) [...]
Harry
[...] MfG Benn
Hallo Harry,
From the keyboard of Harry,
so ne fette Mail habe ich ja schon lange nicht mehr gesehen, schämst du dich nicht? *fg*
Hallo Liste,
ich möchte in meinem kleinen Netz ldap installieren. Ich hoffe ich habe das Prinzip von ldap verstanden.
Ldap ist so eine Art spezialisierte Datenbank um (zb) Userauthentifizierung netzwerkweit zu managen ?
Nö. LDAP ist strenggenommen eigentlich ein Protokoll. Es gibt Clients und Server. Spezifiziert ist das Protokoll in vielen RFC's. LDAPv3 --> RFC 2251
Wenn das stimmt, kann ich ldap für squid,apache,samba, Netscape (oder allgemein Browser),Datenbanken (zb mysql, Sybase,postgres,oracle), Passwörter (Windoof,Linux,FreeBSD,OS2) verwenden ?
Etwas schwammig die Frage, aber ich denke du meinst Userauthentifizierung, wobei die Accountdaten (User+Passwort) in der Datenbank eines LDAP-Server's vorgehalten werden. Das geht meines Wissens für Squid mit Plugins (mir sind zwei unterschiedliche bekannt), Apache mit auth_ldap (wird in Apache 2.0 integriert), Samba >= 2.2.2, Postfix|Sendmail|.., Courier-IMAP, FreeRadius und jeglichen Diensten die PAM zur Userauthentifizierung verwenden, wie SSH, Login, Displaymanager, .... mittels pam_ldap.
Welche weiteren Möglichkeiten zur Einbeziehung von ldap gibt es ?
Mailrouting, Addressbücher für MUA's (Sylpheed,Netscape,Mozilla,Evolution, ...), Zentrale Systemadministration (siehe iX-Artikel zu SmartClient-Architektur der SuSE AG) ...
Ich habe mich die letzten Tage im Internet schlau gemacht (bzw es versucht).
Wohl nicht sehr gründlich ...
Ich glaube nun zu wissen, daß eine Kombination von Kerberos5/cyrus-sasl/openldap geeignet ist, um oben genannte Bedingungen zu erfüllen.
Man kommt auch gut ohne cyrus-sasl und Kerberos aus.
Leider verstehe ich die Zusammenhänge noch nicht so ganz.
Kerberos wird zur Authentifizierung verwendet, gilt das für Passwörter oder ist das eine andere Art von Authentifizierung (zb so eine Art erlaubte Hosts ?) ?
Sehr Komplex. Müßte auch erstmal Doku lesen, bevor ich es möglichst fehlerfrei vermitteln könnte. Ist für den Hochsicherheitsbereich gedacht. http://web.mit.edu/kerberos/www/
Wofür verwendet man dann cyrus-sasl ?
Das ist eine Bibliothek, die als Zwischenschicht fungiert. Sodaß nicht jeder Service/Dämon, wie Cyrus IMAP, Sendmail, ... immer wieder _diverse_ Authentifizierungsmechanismen implementieren müssen. --> RFC 2222
Openldap greift dann auf services von kerberos/cyrus-sasl zu ?
kann ich nicht pauschal beantworten, hängt von dem ab was du realisieren willst.
Mein Problem ist, daß ich inzwischen so viel gelesen habe, daß ich den Überblich verloren habe.
Schlaf ein zwei Nächte drüber. Und les dann weiter :)
Einige Seiten bieten Konfigurationshilfen an, leider habe ich erst zu spät bemerkt, daß die meisten veraltet sind (oder ich glaube das nur).
Wo kann ich eine (aktuelle) Seite finden, die mir all diese Dinge und Zusammenhänge erklärt und Hilfe bei der Planung und Konfiguration gibt.
Am besten wäre ein Tutorial, egal ob in deutsch oder enlisch.
http://www.linuxdoc.org/HOWTO/LDAP-Implementation-HOWTO/ http://www.bayour.com/kerberos/Kerberos-MiniHOWTO.html http://www.bayour.com/LDAPv3-HOWTO.html
Ach ja, PAM brauche ich für die Passwörter ? Wenn ich die gesamte Authentifizierung über einen zentralen Host mache, was passiert im worst-case-Szenario, wenn dieser Host ausfällt ?
Kein Login der User möglich. Als root geht's und man kann notfalls lokale User anlegen. Ansonsten Replizierung der LDAP-Datenbank und Konfiguration der Dienste sodaß beide Server abgefragt werden.
Sind dann alle anderen Rechner im Netz total aufgeschmissen, weil man sich (zb) nicht mehr einloggen kann ?
relativ siehe oben.
Das waren viele Fragen, ich habe jetzt noch ein paar spezielle zu ldap.
Krank, hört das nicht mehr auf ... ;)
Mein Netzwerk heißt hrnet.de (fiktiv !). Der Rechner auf dem ldap läuft heißt rechner.hrnet.de Ein Benutzer sei harry , Realname Harry Rüter (also ich :o), ich bin natürlich Manager/root/admin etc ...
---------------------------------------- ldap.conf :
BASE dc=hrnet, dc=de (Was bedeutet BASE ? Was bedeutet dc ? )
dc=DomainComponent siehe LDAP-Schemenfiles
(Stimmt dann :)
suffix "o=hrnet.de"
nö
(o bedeutet Organisation ,so eine Art Root-verzeichnis ?)
Deine BASEDN mußt du festlegen. Zum Beispiel: dc=hrnet, dc=de oder aber auch o=yourfirma, c=country Das sind die üblichsten Formen. DN --> Distinguished Name Ab dieser BASE DN beginnt der LDAP Baum, und jeder Zweig/Blatt (jedes Object) kann über seinen vollständigen DN referenziert/angesprochen werden.
HOST rechner.hrnet.de (ist der Rechner auf dem der ldap läuft ?)
(Was bedeutet der Eintrag ?)
index default pres,eq
Hat mit der Indexierung der Datenbank zu tun. --> Performance
----------------------------------------
slapd.access :
(Schreibzugriffe ?) : ----------------------------------------------------- # which they have write access to
access to dn=".*,ou=Roaming,dc=.*" (Wäre das so korrekt ?)
Keine Ahnung, weiß ich wozu du LDAP nutzen willst ...
by dn="hrnet.de" write
by dn="uid=Manager.+\+realm=rechner.hrnet.de" write
by dnattr=owner write
by * none -------------------------------------------------
(Authentifizierung,Passwörter sollten vom Benutzer geändert werden können, ander (Programme) sollen sie nur lesen/verwenden ?) -------------------------------------------------- # Some things should be editable by the owner, and viewable by anyone...
access to attr=cn,givenName,sn,krbName,krb5PrincipalName,gecos
by dn="manager" write
by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write (kann dann nur vom dap-Rechner aus geändert werden, was machen die Client-Rechner ?)
by self write
by users read
--------------------------------------------- (Nochmal Authentifizierung ?)
access to attr=loginShell,gecos
by dn="hrnet.de" write
by dn="uid=ldapadm.+\+realm=rechner.hrnet.de" write
by self write
by * read
------------------------------------------------ (Kerberos)
# since we're using {KERBEROS}<PRINCIPAL>, we can't allow the user # to change the password. They have to use the Kerberos 'kpasswd' to # do this... But the admin can change (if need be). # Please see krb5 userPassword attribute (Wie können dann beliebige user ihr Passwort ändern ?)
Steht doch da, mit dem Kerberos tool zum Passwort ändern.
Da ergeben sich viele Fragen:
ich versuche mal einen Baum der Abhängigkeiten zu malen :
o (Organisation = Root-Verzeichnis) / \ ou ou (Organisations-Unit = Untereinheit zb Personen,Mitarbeiter,Rechner) (Beispiel Person) / \ / \ uid = harry uid = anyone (echte Personen, Nutzerdaten (bank)) | dn: uid = harry (Was ist denn jetzt dn ?)
siehe oben.
uid: harry (Hatte ich doch schon definiert, oder ?)
nö
cn: Harry Rüter (Watt is cn ?)
common name
.... (Weitere Attribute zb Adresse,email etc ..) userpassword: {CRYPT} XTRZZT&RHF& (Wo kommt das denn her ?)
Aus dem Schrank?
---------------------------------------------
Ihr seht, ich komme nicht ganz klar,
I see.
kann mir jemand die Kürzel o,ou,cn,dn,sn (und ale wichtigen die jetzt noch fehlen) erklären ?
Schau dir die Schemenfiles an.
------------------------------------- slapd.conf (Warum benötige ich eigentlich zwei Konfiguationsdateien slapd.conf,ldap.conf ?)
Sie eine ist für den Server "slapd" die andere für die Clienttools, wie ldapsearch.
(Was ist ein Schema,welche brauche ich ?) include /etc/openldap/schema/core.schema
(Stimmt das dann so ?) database ldbm suffix "dc=hrnet,dc=de" rootdn "cn=Manager,dc=hrnet,dc=de"
(Datenbank-Verzeichnis ?) directory /var/lib/openldap
(Was s denn das jetzt ?) # Indices to maintain index objectClass eq
----------------------------------------------
Wow, das ist eine ziemlich lange Mail geworden. Ich hoffe ihr seid jetzt nicht sauer ob meiner Unwissenheit, ich glaube mir müsse einfach ein paar Zusammenhänge erklärt werden, ein Beispiel gezeigt werden,damit ich - darauf aufbauend - weiter machen kann.
Ist geschehen, hoffe ich.
Was ist eigentlich wenn das ganze konfiguriert ist, werden neue Daten (zb neuer user) dann immer mit Kommandozeilenprogrammen (ldapadd ..) administriert, oder gibt es da GUI's/WEbinterfaces, die das komfortabler (remote) erledigen ?
gq, LDAP-Explorer, selber was in Java/PHP/Perl/Python/C/Shell.... basteln.
Ich hoffe ich habe euch mit meiner Fragerei nicht genervt, einen schönen Tag (trotz schlechtem Wetter) wünscht
Naja, weiß nicht wieviel Leute so ne lange Mail lesen oder beantworten. Da ich aber LDAP mag, habe ich das mal gemacht ;) Nimm dir schon Mal nen Monat Urlaub und vergiß nicht deine Bierversorgung zu sichern, du wirst bei der Konfiguration sicher auf viele unangenehme Stellen stoßen, jedenfalls war es bei mir so und ich habe SASL und Kerberos (noch nicht ;) ) nicht angepackt. Viel Spaß beim hacken. Gruß Waldemar -- Are your questions smart enough? http://www.tuxedo.org/~esr/faqs/smart-questions.html If not: perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
participants (3)
-
Bernd Schmelter
-
Harry Rüter
-
Waldemar Brodkorb