Apache
Einfach in /etc/sysconfig/apache2 die Variable APACHE_MODULES um die Einträge ldap auth_ldap erweitern und anschließend SuSEconfig --module apache2 aufrufen.
/etc/sysconfig/apache2:
APACHE_MODULES="... ldap auth_ldap"
/etc/apache2/default-server.conf:
< AllowOverride None > AllowOverride AuthConfig
.htaccess:
AuthName "Gesichertes Verzeichnis" AuthType Basic AuthLDAPURL "ldap://ldapserver.mydomain.de:389/ou=People,dc=mydomain,dc=de" require valid-user
Um LDAP mit SSL zu betreiben muss (?) man das CA Zertifikat des LDAP Servers dem Apache Server zugänglich machen:
/etc/apache2/conf.d/ldap.conf:
# Enable the LDAP connection pool and shared # memory cache. Enable the LDAP cache status # handler. Requires mod_ldap and mod_auth_ldap LDAPSharedCacheSize 2000000 LDAPCacheEntries 10240 LDAPCacheTTL 600 LDAPOpCacheEntries 10240 LDAPOpCacheTTL 600 # specify shared memory file, to activate cache LDAPSharedCacheFile /var/lib/apache2/ldap.cache LDAPTrustedCAType BASE64_FILE LDAPTrustedCA /etc/certs/cacert.pem # Activate cache statistics <Location /cache-info> SetHandler ldap-status Order deny,allow Deny from all Allow from mydomain.de Allow from all </Location>
AuthName "Gesichertes Verzeichnis" AuthType Basic AuthLDAPURL "ldaps://ldapserver.mydomain.de:636/ou=People,dc=mydomain,dc=de" require valid-user
Den Zugriff kann man auch auf bestimmte Gruppen beschränken:
AuthName "Gesichertes Verzeichnis" AuthType Basic AuthLDAPURL "ldaps://ldapserver.mydomain.de:636/ou=People,dc=mydomain,dc=de" AuthLDAPGroupAttribute memberUid require group cn=secret,ou=Group,dc=mydomain,dc=de



