hack-hro wiki:

Auf Gerät

ditto

Port
389
LXC

ldap

Hostname

https://ldap.hack-hro.de/

Überblick

Wir verwenden eine LDAP-Datenbank als gemeinsame Grundlage für alle Dienste, die Nutzer-Authentifikation erfordern. Zu diesen Dienste zählt beispielsweise:

LDAP-Accounts sollen Vereinsmitgliedern vorbehalten sein.

LDAP-Server

LDAP-Einrichtung

Pakete installieren:

aptitude install slapd
aptitude install gosa gosa-schema gosa-plugin-samba gosa-plugin-ssh gosa-plugin-ssh-schema

Schemata, die für unsere Zwecke relevant sind, zur LDAP-Datenbank-Definition hinzufügen:

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/samba3.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/gofon.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/gosystem.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/goto.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/gosa-samba3.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/gosa/openssh-lpk.ldif

Gosa-Nachbereitung

Clients / Dienste

LDAP in unix-Accounts integrieren

Webserver-Zugangssicherung mit LDAP

Apache2.4

Notwendige Apache-Module aktivieren:

a2enmod ldap
a2enmod authnz_ldap

Example config:

<Location /test>
    AuthType Basic
    AuthBasicProvider ldap
    AuthName "hack-hro.de"
    AuthLDAPURL "ldap://ldap/ou=people,dc=hack-hro,dc=de?uid?sub?(objectClass=posixAccount)"
    Require valid-user
</Location>

Auf Gruppenbasis:

<Location /test>
    AuthType Basic
    AuthBasicProvider ldap
    AuthName "hack-hro.de"
    AuthLDAPURL "ldap://ldap/ou=people,dc=hack-hro,dc=de?uid?sub?(objectClass=posixAccount)"
    Require ldap-group cn=smb_privileged,ou=groups,dc=hack-hro,dc=de
    AuthLDAPGroupAttributeIsDN off
    AuthLDAPGroupAttribute memberUid
</Location>

Samba-Server

SSH-Login mit Schlüssel

Details: https://github.com/AndriiGrytsenko/openssh-ldap-publickey -> geht nicht gut böses perl


KategorieDienste

hack-hro wiki: Dienste/LDAP (zuletzt geändert am 2023-12-12 08:02:42 durch lars)