184
OpenLDAP Server unter CentOS 6 und Rhel6 I) Grundinstallation des OpenLDAP Servers II) Datenerstbefüllung des OpenLDAP Servers III) Client-Authentification via annonymous bind IV) Client-Authentification mit technischem User V) SASL-Unterstützung am OpenLDAP-Server VI) Absicherung des OpenLDAP-Servers - LDAPS-Konfiguration VII Administration mit Hilfe von phpLDAPadmin Links Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite OpenLDAP Server unter CentOS 6.x installieren und einrichten Zur zentralen Nutzerdatenverwaltung und -pflege bedienen wir uns eines LDAP-Verzeichnisdienstes, genauer gesagt dem OpenLDAP . LDAP ist ein Netzwerkprotokoll, dient zur Bereitstellung von Verzeichnisdiensten und vermittelt dabei die Kommunikation zwischen dem LDAP-Clients mit dem Directory Server. Installation OpenLDAP - Server Die Installation unseres OpenLDAP-Servers gestaltet sich recht einfach, das das notwendige Programmpaket openldap-servers als RPM aus dem Base- Repository unserer CentOS-Installation zur Verfügung gestellt wird. Die Installation selbst erfolgt mit dem Paketverwaltungs-Utility yum von CentOS 6. # yum install openldap-servers -y

Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Embed Size (px)

Citation preview

Page 1: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

OpenLDAP Server unter CentOS 6 und Rhel6 I) Grundinstallation des OpenLDAP Servers II) Datenerstbefüllung des OpenLDAP Servers III) Client-Authentification via annonymous bind IV) Client-Authentification mit technischem User V) SASL-Unterstützung am OpenLDAP-Server VI) Absicherung des OpenLDAP-Servers - LDAPS-Konfiguration VII Administration mit Hilfe von phpLDAPadmin

Links Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite

OpenLDAP Server unter CentOS 6.x installieren und einrichten

Zur zentralen Nutzerdatenverwaltung und -pflege bedienen wir uns eines LDAP-Verzeichnisdienstes, genauer gesagt dem OpenLDAP.

LDAP ist ein Netzwerkprotokoll, dient zur Bereitstellung von Verzeichnisdiensten und vermittelt dabei die Kommunikation zwischen dem LDAP-Clients mit dem Directory Server.

Installation

OpenLDAP - Server

Die Installation unseres OpenLDAP-Servers gestaltet sich recht einfach, das das notwendige Programmpaket openldap-servers als RPM aus dem Base-Repository unserer CentOS-Installation zur Verfügung gestellt wird. Die Installation selbst erfolgt mit dem Paketverwaltungs-Utility yum von CentOS 6.

# yum install openldap-servers -y

Neben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. Was uns die einzelnen Programmpakete mitbringen, erkunden wir bei Bedarf mit der Option qil beim Programm rpm.

openldap-servers # rpm -qil openldap-serversName : openldap-servers Relocations: (not relocatable)Version : 2.4.19 Vendor: CentOSRelease : 15.el6_0.2 Build Date: Sat 25 Jun 2011 12:30:55 PM CESTInstall Date: Wed 26 Oct 2011 12:52:08 PM CEST Build Host: c6b6.bsys.dev.centos.org

Page 2: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Group : System Environment/Daemons Source RPM: openldap-2.4.19-15.el6_0.2.src.rpmSize : 6402916 License: OpenLDAP and (Sleepycat and BSD)Signature : RSA/8, Wed 06 Jul 2011 03:42:04 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.openldap.org/Summary : LDAP serverDescription :OpenLDAP is an open-source suite of LDAP (Lightweight Directory AccessProtocol) applications and development tools. LDAP is a set ofprotocols for accessing directory services (usually phone book styleinformation, but other information is possible) over the Internet,similar to the way DNS (Domain Name System) information is propagatedover the Internet. This package contains the slapd server and related files./etc/openldap/schema/collective.schema/etc/openldap/schema/corba.schema/etc/openldap/schema/core.ldif/etc/openldap/schema/core.schema/etc/openldap/schema/cosine.ldif/etc/openldap/schema/cosine.schema/etc/openldap/schema/duaconf.schema/etc/openldap/schema/dyngroup.schema/etc/openldap/schema/inetorgperson.ldif/etc/openldap/schema/inetorgperson.schema/etc/openldap/schema/java.schema/etc/openldap/schema/misc.schema/etc/openldap/schema/nis.ldif/etc/openldap/schema/nis.schema/etc/openldap/schema/openldap.ldif/etc/openldap/schema/openldap.schema/etc/openldap/schema/pmi.schema/etc/openldap/schema/ppolicy.schema/etc/openldap/schema/redhat/etc/openldap/schema/redhat/autofs.schema/etc/openldap/slapd.conf/etc/openldap/slapd.conf.bak/etc/openldap/slapd.d/etc/pki/tls/certs/slapd.pem/etc/rc.d/init.d/slapd/etc/sysconfig/ldap/usr/lib64/libslapd_db-4.8.so/usr/lib64/openldap/usr/lib64/openldap/accesslog-2.4.so.2/usr/lib64/openldap/accesslog-2.4.so.2.5.2/usr/lib64/openldap/accesslog.la/usr/lib64/openldap/auditlog-2.4.so.2/usr/lib64/openldap/auditlog-2.4.so.2.5.2/usr/lib64/openldap/auditlog.la/usr/lib64/openldap/collect-2.4.so.2/usr/lib64/openldap/collect-2.4.so.2.5.2/usr/lib64/openldap/collect.la/usr/lib64/openldap/constraint-2.4.so.2/usr/lib64/openldap/constraint-2.4.so.2.5.2/usr/lib64/openldap/constraint.la/usr/lib64/openldap/dds-2.4.so.2/usr/lib64/openldap/dds-2.4.so.2.5.2/usr/lib64/openldap/dds.la/usr/lib64/openldap/deref-2.4.so.2/usr/lib64/openldap/deref-2.4.so.2.5.2/usr/lib64/openldap/deref.la/usr/lib64/openldap/dyngroup-2.4.so.2/usr/lib64/openldap/dyngroup-2.4.so.2.5.2/usr/lib64/openldap/dyngroup.la/usr/lib64/openldap/dynlist-2.4.so.2/usr/lib64/openldap/dynlist-2.4.so.2.5.2/usr/lib64/openldap/dynlist.la/usr/lib64/openldap/memberof-2.4.so.2/usr/lib64/openldap/memberof-2.4.so.2.5.2

Page 3: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib64/openldap/memberof.la/usr/lib64/openldap/pcache-2.4.so.2/usr/lib64/openldap/pcache-2.4.so.2.5.2/usr/lib64/openldap/pcache.la/usr/lib64/openldap/ppolicy-2.4.so.2/usr/lib64/openldap/ppolicy-2.4.so.2.5.2/usr/lib64/openldap/ppolicy.la/usr/lib64/openldap/refint-2.4.so.2/usr/lib64/openldap/refint-2.4.so.2.5.2/usr/lib64/openldap/refint.la/usr/lib64/openldap/retcode-2.4.so.2/usr/lib64/openldap/retcode-2.4.so.2.5.2/usr/lib64/openldap/retcode.la/usr/lib64/openldap/rwm-2.4.so.2/usr/lib64/openldap/rwm-2.4.so.2.5.2/usr/lib64/openldap/rwm.la/usr/lib64/openldap/seqmod-2.4.so.2/usr/lib64/openldap/seqmod-2.4.so.2.5.2/usr/lib64/openldap/seqmod.la/usr/lib64/openldap/smbk5pwd-2.4.so.2/usr/lib64/openldap/smbk5pwd-2.4.so.2.5.2/usr/lib64/openldap/smbk5pwd.la/usr/lib64/openldap/sssvlv-2.4.so.2/usr/lib64/openldap/sssvlv-2.4.so.2.5.2/usr/lib64/openldap/sssvlv.la/usr/lib64/openldap/syncprov-2.4.so.2/usr/lib64/openldap/syncprov-2.4.so.2.5.2/usr/lib64/openldap/syncprov.la/usr/lib64/openldap/translucent-2.4.so.2/usr/lib64/openldap/translucent-2.4.so.2.5.2/usr/lib64/openldap/translucent.la/usr/lib64/openldap/unique-2.4.so.2/usr/lib64/openldap/unique-2.4.so.2.5.2/usr/lib64/openldap/unique.la/usr/lib64/openldap/valsort-2.4.so.2/usr/lib64/openldap/valsort-2.4.so.2.5.2/usr/lib64/openldap/valsort.la/usr/sbin/slapacl/usr/sbin/slapadd/usr/sbin/slapauth/usr/sbin/slapcat/usr/sbin/slapd/usr/sbin/slapd_db_archive/usr/sbin/slapd_db_checkpoint/usr/sbin/slapd_db_deadlock/usr/sbin/slapd_db_dump/usr/sbin/slapd_db_hotbackup/usr/sbin/slapd_db_load/usr/sbin/slapd_db_printlog/usr/sbin/slapd_db_recover/usr/sbin/slapd_db_sql/usr/sbin/slapd_db_stat/usr/sbin/slapd_db_upgrade/usr/sbin/slapd_db_verify/usr/sbin/slapdn/usr/sbin/slapindex/usr/sbin/slappasswd/usr/sbin/slapschema/usr/sbin/slaptest/usr/share/doc/openldap-servers-2.4.19/usr/share/doc/openldap-servers-2.4.19/DB_CONFIG.example/usr/share/doc/openldap-servers-2.4.19/LICENSE.bdb-backend/usr/share/doc/openldap-servers-2.4.19/README.migration/usr/share/doc/openldap-servers-2.4.19/README.schema/usr/share/doc/openldap-servers-2.4.19/README.smbk5pwd/usr/share/doc/openldap-servers-2.4.19/README.upgrading/usr/share/doc/openldap-servers-2.4.19/allmail-en.png/usr/share/doc/openldap-servers-2.4.19/allusersgroup-en.png/usr/share/doc/openldap-servers-2.4.19/config_dit.png

Page 4: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/doc/openldap-servers-2.4.19/config_local.png/usr/share/doc/openldap-servers-2.4.19/config_ref.png/usr/share/doc/openldap-servers-2.4.19/config_repl.png/usr/share/doc/openldap-servers-2.4.19/delta-syncrepl.png/usr/share/doc/openldap-servers-2.4.19/dual_dc.png/usr/share/doc/openldap-servers-2.4.19/guide.html/usr/share/doc/openldap-servers-2.4.19/intro_dctree.png/usr/share/doc/openldap-servers-2.4.19/intro_tree.png/usr/share/doc/openldap-servers-2.4.19/ldap-sync-refreshandpersist.png/usr/share/doc/openldap-servers-2.4.19/ldap-sync-refreshonly.png/usr/share/doc/openldap-servers-2.4.19/n-way-multi-master.png/usr/share/doc/openldap-servers-2.4.19/push-based-complete.png/usr/share/doc/openldap-servers-2.4.19/push-based-standalone.png/usr/share/doc/openldap-servers-2.4.19/refint.png/usr/share/doc/openldap-servers-2.4.19/set-following-references.png/usr/share/doc/openldap-servers-2.4.19/set-memberUid.png/usr/share/doc/openldap-servers-2.4.19/set-recursivegroup.png/usr/share/man/man5/slapd-bdb.5.gz/usr/share/man/man5/slapd-config.5.gz/usr/share/man/man5/slapd-dnssrv.5.gz/usr/share/man/man5/slapd-hdb.5.gz/usr/share/man/man5/slapd-ldap.5.gz/usr/share/man/man5/slapd-ldbm.5.gz/usr/share/man/man5/slapd-ldif.5.gz/usr/share/man/man5/slapd-meta.5.gz/usr/share/man/man5/slapd-monitor.5.gz/usr/share/man/man5/slapd-ndb.5.gz/usr/share/man/man5/slapd-null.5.gz/usr/share/man/man5/slapd-passwd.5.gz/usr/share/man/man5/slapd-perl.5.gz/usr/share/man/man5/slapd-relay.5.gz/usr/share/man/man5/slapd-shell.5.gz/usr/share/man/man5/slapd-sock.5.gz/usr/share/man/man5/slapd-sql.5.gz/usr/share/man/man5/slapd.access.5.gz/usr/share/man/man5/slapd.backends.5.gz/usr/share/man/man5/slapd.conf.5.gz/usr/share/man/man5/slapd.overlays.5.gz/usr/share/man/man5/slapd.plugin.5.gz/usr/share/man/man5/slapo-accesslog.5.gz/usr/share/man/man5/slapo-auditlog.5.gz/usr/share/man/man5/slapo-chain.5.gz/usr/share/man/man5/slapo-collect.5.gz/usr/share/man/man5/slapo-constraint.5.gz/usr/share/man/man5/slapo-dds.5.gz/usr/share/man/man5/slapo-dyngroup.5.gz/usr/share/man/man5/slapo-dynlist.5.gz/usr/share/man/man5/slapo-memberof.5.gz/usr/share/man/man5/slapo-pcache.5.gz/usr/share/man/man5/slapo-ppolicy.5.gz/usr/share/man/man5/slapo-refint.5.gz/usr/share/man/man5/slapo-retcode.5.gz/usr/share/man/man5/slapo-rwm.5.gz/usr/share/man/man5/slapo-sssvlv.5.gz/usr/share/man/man5/slapo-syncprov.5.gz/usr/share/man/man5/slapo-translucent.5.gz/usr/share/man/man5/slapo-unique.5.gz/usr/share/man/man5/slapo-valsort.5.gz/usr/share/man/man8/slapacl.8.gz/usr/share/man/man8/slapadd.8.gz/usr/share/man/man8/slapauth.8.gz/usr/share/man/man8/slapcat.8.gz/usr/share/man/man8/slapd.8.gz/usr/share/man/man8/slapdn.8.gz/usr/share/man/man8/slapindex.8.gz/usr/share/man/man8/slappasswd.8.gz/usr/share/man/man8/slapschema.8.gz/usr/share/man/man8/slaptest.8.gz/var/lib/ldap

Page 5: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/var/run/openldap

libtool-ltdl # rpm -qil libtool-ltdlName : libtool-ltdl Relocations: (not relocatable)Version : 2.2.6 Vendor: CentOSRelease : 15.5.el6 Build Date: Tue 24 Aug 2010 09:42:49 PM CESTInstall Date: Wed 26 Oct 2011 12:52:03 PM CEST Build Host: c6b2.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: libtool-2.2.6-15.5.el6.src.rpmSize : 64948 License: LGPLv2+Signature : RSA/8, Sun 03 Jul 2011 06:40:12 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.gnu.org/software/libtool/Summary : Runtime libraries for GNU Libtool Dynamic Module LoaderDescription :The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, alibrary that provides a consistent, portable interface which simplifies theprocess of using dynamic modules.

These runtime libraries are needed by programs that link directly to thesystem-installed ltdl libraries; they are not needed by software built usingthe rest of the GNU Autotools (including GNU Autoconf and GNU Automake)./usr/lib64/libltdl.so.7/usr/lib64/libltdl.so.7.2.1/usr/share/doc/libtool-ltdl-2.2.6/usr/share/doc/libtool-ltdl-2.2.6/COPYING.LIB/usr/share/doc/libtool-ltdl-2.2.6/README/usr/share/libtool

make # rpm -qil makeName : make Relocations: (not relocatable)Version : 3.81 Vendor: CentOSRelease : 19.el6 Build Date: Thu 11 Nov 2010 09:47:05 PM CETInstall Date: Wed 26 Oct 2011 12:52:05 PM CEST Build Host: c6b5.bsys.dev.centos.orgGroup : Development/Tools Source RPM: make-3.81-19.el6.src.rpmSize : 1079569 License: GPLv2+Signature : RSA/8, Sun 03 Jul 2011 06:44:38 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.gnu.org/software/make/Summary : A GNU tool which simplifies the build process for usersDescription :A GNU tool for controlling the generation of executables and othernon-source files of a program from the program's source files. Makeallows users to build and install packages without any significantknowledge about the details of the build process. The details abouthow the program should be built are provided for make in the program'smakefile./usr/bin/gmake/usr/bin/make/usr/share/doc/make-3.81/usr/share/doc/make-3.81/AUTHORS/usr/share/doc/make-3.81/COPYING/usr/share/doc/make-3.81/NEWS/usr/share/doc/make-3.81/README/usr/share/info/make.info-1.gz/usr/share/info/make.info-2.gz/usr/share/info/make.info.gz/usr/share/locale/be/LC_MESSAGES/make.mo/usr/share/locale/da/LC_MESSAGES/make.mo/usr/share/locale/de/LC_MESSAGES/make.mo/usr/share/locale/es/LC_MESSAGES/make.mo/usr/share/locale/fi/LC_MESSAGES/make.mo

Page 6: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/locale/fr/LC_MESSAGES/make.mo/usr/share/locale/ga/LC_MESSAGES/make.mo/usr/share/locale/gl/LC_MESSAGES/make.mo/usr/share/locale/he/LC_MESSAGES/make.mo/usr/share/locale/hr/LC_MESSAGES/make.mo/usr/share/locale/id/LC_MESSAGES/make.mo/usr/share/locale/ja/LC_MESSAGES/make.mo/usr/share/locale/ko/LC_MESSAGES/make.mo/usr/share/locale/nl/LC_MESSAGES/make.mo/usr/share/locale/pl/LC_MESSAGES/make.mo/usr/share/locale/pt_BR/LC_MESSAGES/make.mo/usr/share/locale/ru/LC_MESSAGES/make.mo/usr/share/locale/rw/LC_MESSAGES/make.mo/usr/share/locale/sv/LC_MESSAGES/make.mo/usr/share/locale/tr/LC_MESSAGES/make.mo/usr/share/locale/uk/LC_MESSAGES/make.mo/usr/share/locale/vi/LC_MESSAGES/make.mo/usr/share/locale/zh_CN/LC_MESSAGES/make.mo/usr/share/man/man1/gmake.1.gz/usr/share/man/man1/make.1.gz

OpenLDAP - Client

Da wir auf unserem Server später auch auf Hilfsprogramme des openldap-clients zurückgreifen installieren wir auch dieses Paket.

Auch dieses Paket wird mit Hilfe der Paketverwaltungshilfsprogarmmes yum installieren.

# yum install openldap-clients -y

Was uns dieses Programmpaket mitbringf, ermitteln wir bei Bedarf mit der Option qil beim Programm rpm.

# rpm -qil openldap-clientsName : openldap-clients Relocations: (not relocatable)Version : 2.4.19 Vendor: CentOSRelease : 15.el6_0.2 Build Date: Sat 25 Jun 2011 12:30:55 PM CESTInstall Date: Wed 26 Oct 2011 01:23:30 PM CEST Build Host: c6b6.bsys.dev.centos.orgGroup : Applications/Internet Source RPM: openldap-2.4.19-15.el6_0.2.src.rpmSize : 612692 License: OpenLDAPSignature : RSA/8, Wed 06 Jul 2011 03:42:03 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.openldap.org/Summary : LDAP client utilitiesDescription :OpenLDAP is an open-source suite of LDAP (Lightweight Directory AccessProtocol) applications and development tools. LDAP is a set ofprotocols for accessing directory services (usually phone book styleinformation, but other information is possible) over the Internet,similar to the way DNS (Domain Name System) information is propagatedover the Internet. The openldap-clients package contains the clientprograms needed for accessing and modifying OpenLDAP directories./usr/bin/ldapadd/usr/bin/ldapcompare/usr/bin/ldapdelete/usr/bin/ldapexop/usr/bin/ldapmodify/usr/bin/ldapmodrdn/usr/bin/ldappasswd/usr/bin/ldapsearch/usr/bin/ldapurl/usr/bin/ldapwhoami/usr/share/man/man1/ldapadd.1.gz

Page 7: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/man/man1/ldapcompare.1.gz/usr/share/man/man1/ldapdelete.1.gz/usr/share/man/man1/ldapexop.1.gz/usr/share/man/man1/ldapmodify.1.gz/usr/share/man/man1/ldapmodrdn.1.gz/usr/share/man/man1/ldappasswd.1.gz/usr/share/man/man1/ldapsearch.1.gz/usr/share/man/man1/ldapurl.1.gz/usr/share/man/man1/ldapwhoami.1.gz

Konfiguration

Bei der von CentOS 6.x mitgelieferten OpenLDAP Version 2.4.xx kann die Konfiguration des Server mit Hilfe von ldif-Dateien erfolgen. Der Vorteil dieser Konfigurationsvariante gegenüber der frühren Konfiguration mit Hilfe einer zentralen Konfigurationsdatei /etc/openldap/slapd.conf besteht darin, dass Änderungen an der Konfiguration des OpenLDAP-Servers aktiv werden, ohne den Server selbst neu zu starten. Änderungen werden also quais on the fly aktiv.

Vorbereitung

Da wir bei der nachfolgenden Konfiguration mit einer frischen eigenen Installation beginnen wollen, werden wir die mitgelieferten Konfigurationsbeispiele erst einmal sichern und unsere Konfigurationspfade entsprechend vorbereiten.

Als erstes sichern wir das originale Konfigurationsverzeichnis, damit wir bei Bedarf wieder darauf zurückgreifen können. Hierzu kopieren wir uns einfach den Inhalt des Verzeichnisses /etc/openldap/slapd.d/ unter einem anderen Namen ab.

# cp -ar /etc/openldap/slapd.d /etc/openldap/slapd.d.orig

Als nächstes leeren wir das standardmäßig mitgelieferte Konfigurationsverzeichnis /etc/openldap/slapd.d.

# rm -rf /etc/openldap/slapd.d/*

Im nächsten Schritt erstellen wir uns eine neue Konfigurationsdatei /etc/openldap/slapd.conf indem wir die mitgelieferte Backupdatei kopieren und unter dem richtigen Namen ablegen.

# cp /etc/openldap/slapd.conf.bak /etc/openldap/slapd.conf

Anschließend passen wir noch die Dateiberechtigungen an:

# chown root:ldap /etc/openldap/slapd.conf

Aus sichertstechnischen Gründen soll die Datei /etc/openldap/slapd.conf nur der Gruppe ldap zur Verfügung stehen.

# ls -l /etc/openldap/slapd.conf-rw-r----- 1 root ldap 4327 Oct 26 13:35 /etc/openldap/slapd.conf

Nachfolgend wollen wir nun auf die unterschiedlichen Konfigurationsverzeichnisse und -dateien im Detail eingehen.

ldap.conf

In der Konfigurationsdatei /etc/openldap/ldap.conf wird die Basis-Domain für den LDAP-Client festgelegt. Mit dem editor unserer Wahl bearbeiten wir nun diese Datei und tragen dort ein:

BASE : Definition des standardmäßig abgefragten Teilbaums / Searchbase unter der Anfragen von dc=nausch, dc=org ausgeführt werden sollen.

Page 8: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

URI : Definition des LDAP-Servers, der befragt werden soll.

# vim /etc/openldap/ldap.conf/etc/openldap/ldap.conf

## LDAP Defaults# # See ldap.conf(5) for details# This file should be world readable but not world writable. #BASE dc=example, dc=com#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 # Django: 2011-10-26BASE dc=nausch, dc=org # Definition des standardmäßig abgefragten Teilbaums / Searchbase # Anfragen werden unterhalb von dc=nausch, dc=org ausgeführt.URI ldap://ldap.dmz.nausch.org # Definition des LDAP-Servers   #SIZELIMIT 12#TIMELIMIT 15#DEREF never

DB_CONFIG

Als Backend-Datenbank für unseren zentralen Verzeichnisdienst nutzen wir eine Berkeley DB, die sich im UNIXiden Umfeld bestens bewährt hat. Hierzu muss im Verzeichnis /var/lib/ldap/ eine entsprechend Konfigurationsdatei DB_CONFIG vorgehalten werden.

Bei der Installation unseres openldap-servers RPM-Paketes wird uns eine entsprechende Musterkonfigurationsdatei bereits mitgeliefert. Diese muss nur noch an Ort und Stelle kopiert und die Benutzer- und Gruppenrechte angepasst werden.

Als erstes kopieren wir uns die Vorlage Datei in unser Konfigurationsverzeichnis.

# cp /usr/share/doc/openldap-servers-2.4.19/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

Anschließend passen wir noch die Benutzer- und Gruppenrechte an.

# chown ldap:ldap /var/lib/ldap/DB_CONFIG

Eine weitere Bearbeitung der nun vorliegenden Konfigurationsdatei DB_CONFIG ist nicht notwendig, die Datei kann 1:1 so verwendet werden, wie diese aus dem RPM gefallen ist.

/var/lib/ldap/DB_CONFIG

# $OpenLDAP: pkg/ldap/servers/slapd/DB_CONFIG,v 1.3.2.4 2007/12/18 11:53:27 ghenry Exp $# Example DB_CONFIG file for use with slapd(8) BDB/HDB databases.## See the Oracle Berkeley DB documentation# <http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html># for detail description of DB_CONFIG syntax and semantics.## Hints can also be found in the OpenLDAP Software FAQ# <http://www.openldap.org/faq/index.cgi?file=2># in particular:# <http://www.openldap.org/faq/index.cgi?file=1075> 

Page 9: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Note: most DB_CONFIG settings will take effect only upon rebuilding# the DB environment. # one 0.25 GB cacheset_cachesize 0 268435456 1 # Data Directory#set_data_dir db # Transaction Log settingsset_lg_regionmax 262144set_lg_bsize 2097152#set_lg_dir logs # Note: special DB_CONFIG flags are no longer needed for "quick"# slapadd(8) or slapindex(8) access (see their -q option).

Master-Passwort erstellen

Für den administrativen Zugriff wird ein eigenes Rootpasswort rootpw benötigt. Zur Generierung dieses Passwortes mit der Verschlüsselungsmethode SSHA - entsprechend einem SHA-1 Algorithmus (FIPS 160-1), nutzen wird das Programm /usr/sbin/slappasswd mit folgendem Befehl aufgerufen:

# /usr/sbin/slappasswd -h {SSHA} New password: Re-enter new password: {SSHA}MT/P3fPtBfI3E2bylGEFxv2/u1KxmVmO

slapd.conf

Die eigentliche Konfiguration unseres OpenLDAP-Daemons erfolgt mit Hilfe der Konfigurationsdatei slapd.conf im Verzeichnis /etc/openldap/, die wir uns im Kapitel Vorbereitung aus den Vorlagen des RPMs kopiert hatten. Die Konfigurationsdatei bearbeiten wir nun mit dem Editor unserer Wahl, z.B. vim.

# vim /etc/openldap/slapd.conf/etc/openldap/slapd.conf

## See slapd.conf(5) for details on configuration options.# This file should NOT be world readable.# # Django : 2011-10-26 unbenutzte Schematas deaktiviert#include /etc/openldap/schema/corba.schema # Django : deaktiviert 2011-10-26include /etc/openldap/schema/core.schemainclude /etc/openldap/schema/cosine.schema#include /etc/openldap/schema/duaconf.schema # Django : deaktiviert 2011-10-26#include /etc/openldap/schema/dyngroup.schema # Django : deaktiviert 2011-10-26include /etc/openldap/schema/inetorgperson.schema#include /etc/openldap/schema/java.schema # Django : deaktiviert 2011-10-26#include /etc/openldap/schema/misc.schema # Django : deaktiviert 2011-10-26include /etc/openldap/schema/nis.schema#include /etc/openldap/schema/openldap.schema # Django : deaktiviert 2011-10-26#include /etc/openldap/schema/ppolicy.schema # Django : deaktiviert 2011-10-26#include /etc/openldap/schema/collective.schema# Django : deaktiviert 2011-10-26 # Allow LDAPv2 client connections. This is NOT the default.allow bind_v2

Page 10: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 # Do not enable referrals until AFTER you have a working directory# service AND an understanding of referrals.#referral ldap://root.openldap.org# Django : 2011-10-26 referral ldap://ldap.dmz.nausch.org pidfile /var/run/openldap/slapd.pidargsfile /var/run/openldap/slapd.args # Django : 2011-10-26 Definition des Loglevels - Detaillierte Hinweise sind in der manpage zu slapd.conf# unter loglevel zu finden.# no default entry for: loglevelloglevel 256 # Django : 2011-10-26 Definition der Idle-Timeout Detaillierte Hinweise sind in der manpage zu slapd.conf# unter idletimeout zu finden.# no default entry for: idletimeoutidletimeout 15 # Django : 2011-10-26 Definition des Passwort-Hashes Detaillierte Hinweise sind in der manpage zu slapd.conf# unter password-hash zu finden.# the default entry for password-hash is {SSHA}password-hash {SSHA} # Load dynamic backend modules:# Module syncprov.la is now statically linked with slapd and there# is no need to load it here# modulepath /usr/lib/openldap # or /usr/lib64/openldap# moduleload accesslog.la# moduleload auditlog.la## To load this module, you have to install openldap-server-sql first# moduleload back_sql.la## Following two modules can't be loaded simultaneously# moduleload dyngroup.la# moduleload dynlist.la# moduleload lastmod.la# moduleload pcache.la# moduleload ppolicy.la# moduleload refint.la# moduleload retcode.la# moduleload rwm.la# moduleload translucent.la# moduleload unique.la# moduleload valsort.la # Django : 2011-10-25 Detaillierte Hinweise sind in der manpage zu slapd.conf# unter modulepath zu finden.# The default is /usr/lib64/openldapmodulepath /usr/lib64/openldap # The next three lines allow use of TLS for encrypting connections using a# dummy test certificate which you can generate by changing to# /etc/pki/tls/certs, running "make slapd.pem", and fixing permissions on# slapd.pem so that the ldap user or group can read it. Your client software# may balk at self-signed certificates, however.# TLSCACertificateFile /etc/pki/tls/certs/ca-bundle.crt# TLSCertificateFile /etc/pki/tls/certs/slapd.pem# TLSCertificateKeyFile /etc/pki/tls/certs/slapd.pem # Sample security restrictions# Require integrity protection (prevent hijacking)# Require 112-bit (3DES or better) encryption for updates# Require 63-bit encryption for simple bind# security ssf=1 update_ssf=112 simple_bind=64

Page 11: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 # Sample access control policy:# Root DSE: allow anyone to read it# Subschema (sub)entry DSE: allow anyone to read it# Other DSEs:# Allow self write access# Allow authenticated users read access# Allow anonymous users to authenticate# Directives needed to implement policy:# access to dn.base="" by * read# access to dn.base="cn=Subschema" by * read# access to *# by self write# by users read# by anonymous auth## if no access controls are present, the default policy# allows anyone and everyone to read anything but restricts# updates to rootdn. (e.g., "access to * by * read")## rootdn can always read and write EVERYTHING! # Django : 2011-10-26# no default entry for: Access Control Lists (ACLs)access to attrs=userPassword

by self writeby dn="cn=Manager,dc=nausch,dc=org" writeby anonymous authby * none

access to *by self writeby dn="cn=Manager,dc=nausch,dc=org" writeby * read

 ######################################################################## ldbm and/or bdb database definitions####################################################################### # Django : 2011-10-26# Make cn=config accessabledatabase configrootdn "cn=config"rootpw {SSHA}MT/P3fPtBfI3E2bylGEFxv2/u1KxmVmO database bdb# Django : 2011-10-26# default : suffix "dc=my-domain,dc=com"suffix "dc=nausch,dc=org"checkpoint 1024 15# Django : 2011-10-26# # default : rootdn "cn=Manager,dc=my-domain,dc=com"rootdn "cn=Manager,dc=nausch,dc=org"# Cleartext passwords, especially for the rootdn, should# be avoided. See slappasswd(8) and slapd.conf(5) for details.# Use of strong authentication encouraged.# rootpw secret# rootpw {crypt}ijFYNcSNctBYg# Django : 2011-10-26rootpw {SSHA}MT/P3fPtBfI3E2bylGEFxv2/u1KxmVmO # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools.# Mode 700 recommended.directory /var/lib/ldap # Django : 2011-10-26# no default entry for: modemode 0600  

Page 12: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Django : 2011-10-26# no default entry for: lastmodlastmod on # Indices to maintain for this databaseindex objectClass eq,presindex ou,cn,mail,surname,givenname eq,pres,subindex uidNumber,gidNumber,loginShell eq,presindex uid,memberUid eq,pres,subindex nisMapName,nisMapEntry eq,pres,sub # Replicas of this database#replogfile /var/lib/ldap/openldap-master-replog#replica host=ldap-1.example.com:389 starttls=critical# bindmethod=sasl saslmech=GSSAPI# authcId=host/[email protected]  # enable monitoringdatabase monitor # allow onlu rootdn to read the monitor# Django : 2011-10-26# default : by dn.exact="cn=Manager,dc=my-domain,dc=com" readaccess to * by dn.exact="cn=Manager,dc=nausch,dc=org" read by * none

Die Parameter sind in der Manpage der Konfigurationsdatei slapd.conf ausreichend beschrieben.

# man slapd.conf

Auf die wichtigsten wollen wir noch kurz eingehen.

idletimeout Der Wert für den Eintrag idletimeout setzte eine Ablaufzeit für offene Abfragen, welche noch nicht beendet wurden. Das Setzen dieses Wertes wird dringendst angeraten, da es sonst bei sehr vielen Abfragen zu einem „Stillstand“ des LDAP-Servers kommen könnte. password-hash Dieser Wert setzt den Standard-Agorithmus SSHA für den Eintrag des Passwort-Hashes. ACLs1) Die erste der beide ACLs definiert den Zugriff auf das Attribut userPassword nur für den Eigentümer einer Instanz des Objekts Manager mit Schreibrechten erlaubt sind. Weiterhin sind anonyme Anfragen zur Authentifizierung das Attribut userPassword vergleichen. Alle anderen Anfragen auf das Attribut userPassword werden nicht gestattet. access to attrs=userPassword by self write by dn="cn=Manager,dc=nausch,dc=org" write by anonymous auth

by * none

Mit Hilfe der zweiten ACL wird festgelegt, daß der Zugriff auf alle Objekte - außer dem userPassword - vom Besitzer mit Schreibrechten durchgeführt werden dürfen. Alle anderen Anfragen sind mit Leserechten gestattet.

access to *by self writeby dn="cn=Manager,dc=nausch,dc=org" writeby * read

rootpw Hier ist das LDAP-RootPasswort für den administrativen Zugang, welches wir uns eingangs im Abschnitt Master-Passwort erstellen erstellt hatten, anzugeben. mode Der Eintrag mode mit der entsprechenden Angabe 0600 legt fest, dass Dateien mit nur für den Eigentümer der Datei mit den Rechten rw angelegt werden. lastmode Durch das Setzen des Wertes on wird festgelegt, daß Einträge mit einem Datum zu versehen sind.

Page 13: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

ldif Konfiguration

Im nächsten Schritt werden wir nun unsere zuvor angelegt Konfigurationsdatei /etc/openldap/slapd.conf in das, im Abschnitt Konfiguration beschriebene Verzeichnis /etc/openldap/slapd.d, als ldif-Dateien ablegen lassen. Hierzu benutzen wir das Programm slaptest. Mit folgendem Aufruf generieren wir die ldif-Verzeichnisstrukturen sowie die zugehörigen ldif-Dateien.

# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d bdb_db_open: database "dc=nausch,dc=org": db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2). backend_startup_one (type=bdb, suffix="dc=nausch,dc=org"): bi_db_open failed! (2) slap_startup failed (test would succeed using the -u switch)

Die gezeigten Fehlermeldungen sind leicht erklärbar. Es befinden sich aktuell noch keine Daten in der Berkely-Datenbank. Die Fehlermeldung kann also ignoroert werden und darf uns nicht weiter verunsichern

Annschließend passen wir noch die Verzeichnis- und Dateirechte der gerade erzeigten Daten an:

# chown -R ldap:ldap /etc/openldap/slapd.d

Durch das Konvertierend der slapd.conf Konfigurationsdatei mit Hilfe des Befehles

# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d

wurde nicht nur das „neue“ Konfigurationsverzeichnis /etc/openldap/slapd.d mit Inhalten gefüllt, sondern auch in diesem Fall eine Berkely-Datenbankstruktur im Verzeichnis /var/lib/ldap angelegt. Diese Berkley-Datenbankstruktur wurde jedoch nicht vom slapd-Daemon erstellt, und ist somit wieder zu entfernen, da es sonst zu unerwünschten Fehlern beim Starten und beim Betrieb des OpenLDAP-Server kömmen würde. Wir löschen alos dies Dateien mit folgendem Befehl.

# rm -f /var/lib/ldap/alock /var/lib/ldap/__db*

Da wir zukünftig die weitere Konfiguration unseres OpenLDAP-Servers ausschließlich mit Hilfe der ldif-Dateien vornehmen wollen, werden wir nun unsere Konfigurationsdatei, die wir zum initialen Befüllen der ldif-Verzeichnisse angelegt hatten, wieder stilllegen. Hierzu reicht es die vorhandenen alte Konfigurationsdatei einfach umzubenennen.

# mv /etc/openldap/slapd.conf /etc/openldap/slapd.conf.save_111026

rsyslog

Damit unser LDAP-Server seine Meldungen auch sichtbar uns zur Verfügung stellt, lassen wir ihm diese ganz einfach in ein separates Logfile schreiben. Hierzu passen die Konfigurationsdatei /etc/rsyslog.conf entsprechend an und tragen eine entsprechende Regel unter der Sektion #### RULES #### ein.

# vim /etc/rsyslog.conf#### RULES ####

...

# Django : 2011-10-26 Logging für OpenLDAP-Server aktiviertlocal4.* -/var/log/ldap.log

...

Anschließend müssen wir den rsyslog-Daemon einmal durchstarten, damit er unsere Änderungen akzeptiert und umsetzt.

# service rsyslog restart Shutting down system logger: [ OK ]

Page 14: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Starting system logger: [ OK ]

logrotate

Bei einem unter Last stehendem OpenLDAP-Datenbankserver kann unter Umständen das zugehörige Logfile /var/log/ldap.log recht schnell anwachsen. Leider wir in dem RPM-Paket openldap-servers keine Konfigurationsdatei zur Rotation der Logdatei mitgeliefert, so dass wir uns diese kurz selbst erstellen. Hierzu benutzen wir den Editor unserer Wahl, z.B. vim.

# vim /etc/logrotate.d/ldap/etc/logrotate.d/ldap

/var/log/ldap.log { rotate 4 weekly compress notifempty size 5M missingok create 0640 ldap ldap sharedscripts postrotate /bin/kill -HUP `cat /var/run/sldapd.pid 2> /dev/null` 2> /dev/null || true endscript}

Systemstart

erster manueller Start

Bevor wir nun unseren OpenLDAP-Server das erste mal starten, überprüfen wir noch mit einem configcheck ob der ldap-Daemon mit unserem gerade erzeugten Konfigurationsparametern umgehen kann, oder ob es noch nicht entdeckte Fehler in der Konfiguration gibt.

# service slapd configtest

Erfolgt keine Rückmeldung, so bedeutet dies, alles ist in bester Ordnung!

Nun können wir unseren LDAP-Server das erste mal anstarten:

# service slapd start Starting slapd: [ OK ]

Der erfolgreiche Start unseres slapd-Daemon wird uns, Dank der Änderungen am Rsyslog, auch im Logfile /var/log/ldap.log auch entsprechend vermerkt.

Oct 26 23:49:54 vml000030 slapd[2023]: @(#) $OpenLDAP: slapd 2.4.19 (Jun 25 2011 11:27:10) $#012#[email protected]:/builddir/build/BUILD/openldap-2.4.19/openldap-2.4.19/build-servers/servers/slapd Oct 26 23:49:54 vml000030 slapd[2024]: slapd starting

Ob der Daemon läuft überprüfen wir am einfachsten mit folgender Abfrage:

# netstat -tulpen | grep slapd tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 0 9990 1870/slapd

automatisches Starten des Dienste beim Systemstart

Damit nun unser OpenLDAP-Datenbankserver beim Booten automatisch gestartet wird, nehmen wir noch folgende Konfigurationsschritte vor.

Page 15: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# chkconfig slapd on

Anschließend überprüfen wir noch unsere Änderung:

# chkconfig --list | grep slapd slapd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

erste LDAP-Abfragen

Mit nachfolgendem Befehl, kann eine erste Suchanfrage, gegen den OpenLDAP-Server durchgeführt werden, welche zwar ein leeres Ergbnis zurück liefern sollte, jedoch kann somit überprüft werden, ob grundsätzlich Abfragen möglich sind.

# ldapsearch -x -b "dc=nausch,dc=org" "(objectclass=*)"

Als Ergebnis bekommen folgende Antwort.

# extended LDIF## LDAPv3# base <dc=nausch,dc=org> with scope subtree# filter: (objectclass=*)# requesting: ALL#

# search resultsearch: 2result: 32 No such object

# numResponses: 1

im Logfile des slapd-Daemon wird unsere Anfrage entsprechend protokolliert.

Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 fd=12 ACCEPT from IP=[::1]:54910 (IP=[::]:389)Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 op=0 BIND dn="" method=128Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 op=0 RESULT tag=97 err=0 text=Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 op=1 SRCH base="dc=nausch,dc=org" scope=2 deref=0 filter="(objectClass=*)"Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 op=1 SEARCH RESULT tag=101 err=32 nentries=0 text=Oct 27 00:02:28 vml000030 slapd[2024]: conn=4 op=2 UNBINDOct 27 00:02:28 vml000030 slapd[2024]: conn=4 fd=12 closed

Für den Zugriff auf den cn=config hatten wir bei der erstmaligen Konfiguration folgendes angegeben.

# Django : 2011-10-26# Make cn=config accessabledatabase configrootdn "cn=config"rootpw {SSHA}MT/P3fPtBfI3E2bylGEFxv2/u1KxmVmO

Mit Hilfe dieser Definition können wir nun ebenfalls die im *.LDIF-Format hinterlegten OpenLDAP-Server-Konfigurationen mit nachfolgendem Befehl abgefragt werden. Im folgenden Beispiel erfolgt die Abfrage des Konfigurationsabschnitt cn=config „objectclass=olcGlobal“.

# ldapsearch -W -x -D cn=config -b cn=config "(objectclass=olcGlobal)"Enter LDAP Password: # extended LDIF## LDAPv3# base <cn=config> with scope subtree# filter: (objectclass=olcGlobal)

Page 16: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# requesting: ALL#

# configdn: cn=configobjectClass: olcGlobalcn: configolcConfigFile: /etc/openldap/slapd.confolcConfigDir: /etc/openldap/slapd.dolcAllows: bind_v2olcArgsFile: /var/run/openldap/slapd.argsolcAttributeOptions: lang-olcAuthzPolicy: noneolcConcurrency: 0olcConnMaxPending: 100olcConnMaxPendingAuth: 1000olcGentleHUP: FALSEolcIdleTimeout: 15olcIndexSubstrIfMaxLen: 4olcIndexSubstrIfMinLen: 2olcIndexSubstrAnyLen: 4olcIndexSubstrAnyStep: 2olcIndexIntLen: 4olcLocalSSF: 71olcLogLevel: StatsolcPidFile: /var/run/openldap/slapd.pidolcReadOnly: FALSEolcReferral: ldap://ldap.dmz.nausch.orgolcReverseLookup: FALSEolcSaslSecProps: noplain,noanonymousolcSockbufMaxIncoming: 262143olcSockbufMaxIncomingAuth: 16777215olcThreads: 16olcTLSCRLCheck: noneolcTLSVerifyClient: neverolcToolThreads: 1olcWriteTimeout: 0

# search resultsearch: 2result: 0 Success

# numResponses: 2# numEntries: 1

Auch hier wird die Abfrage im Logfile des OpenLDAP-Servers protokolliert.

Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 fd=12 ACCEPT from IP=[::1]:54911 (IP=[::]:389)Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=0 BIND dn="cn=config" method=128Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=0 BIND dn="cn=config" mech=SIMPLE ssf=0Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=0 RESULT tag=97 err=0 text=Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=1 SRCH base="cn=config" scope=2 deref=0 filter="(objectClass=olcGlobal)"Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=Oct 27 00:04:46 vml000030 slapd[2024]: conn=5 op=2 UNBINDOct 27 00:04:46 vml000030 slapd[2024]: conn=5 fd=12 closed

Nachfolgend wird der Konfigurationsabschnitt olcDatabase={0}config.ldif abgefragt:

# ldapsearch -W -x -D cn=config -b olcDatabase={0}config,cn=configEnter LDAP Password: # extended LDIF## LDAPv3

Page 17: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# base <olcDatabase={0}config,cn=config> with scope subtree# filter: (objectclass=*)# requesting: ALL#

# {0}config, configdn: olcDatabase={0}config,cn=configobjectClass: olcDatabaseConfigolcDatabase: {0}configolcAccess: {0}to * by * noneolcAddContentAcl: TRUEolcLastMod: TRUEolcMaxDerefDepth: 15olcReadOnly: FALSEolcRootDN: cn=configolcRootPW: {SSHA}MT/P3fPtBfI3E2bylGEFxv2/u1KxmVmOolcMonitoring: FALSE

# search resultsearch: 2result: 0 Success

# numResponses: 2# numEntries: 1

Der Ausschnitt aus dem Logfile zeigt den erfolgreichen Abfrageversuch.

Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 fd=12 ACCEPT from IP=[::1]:42483 (IP=[::]:389)Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=0 BIND dn="cn=config" method=128Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=0 BIND dn="cn=config" mech=SIMPLE ssf=0Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=0 RESULT tag=97 err=0 text=Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=1 SRCH base="olcDatabase={0}config,cn=config" scope=2 deref=0 filter="(objectClass=*)"Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=Oct 26 23:54:58 vml000030 slapd[2024]: conn=1 op=2 UNBINDOct 26 23:54:58 vml000030 slapd[2024]: conn=1 fd=12 closed

Natürlich kann man auch den gesamten LDAP-Baum abfragen:

# ldapsearch -W -x -D cn=config -b cn=config

Auch diese Abfrage, bei der wir auf Grund der Fülle an Informationen auf eine Ausgabe hier im Wiki verzichten, wird im Logfile protokolliert.

Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 fd=13 ACCEPT from IP=[::1]:37073 (IP=[::]:389)Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=0 BIND dn="cn=config" method=128Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=0 BIND dn="cn=config" mech=SIMPLE ssf=0Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=0 RESULT tag=97 err=0 text=Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=1 SRCH base="cn=config" scope=2 deref=0 filter="(objectClass=*)"Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=1 SEARCH RESULT tag=101 err=0 nentries=10 text=Oct 27 00:07:22 vml000030 slapd[2024]: conn=6 op=2 UNBINDOct 27 00:07:22 vml000030 slapd[2024]: conn=6 fd=13 closed

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..

Eine Auflistung der gängigen Rückmeldecodes ist hier zu finden.

Page 18: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Links Zurück zum Kapitel >>OpenLDAP Server unter CentOS 6.x<< Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite

Page 19: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Datenerstbefüllung des OpenLDAP Servers

Nachdem wir die Grundinstallation des OpenLDAP Servers erfolgreich abgeschlossen haben, werden wir im nächsten Schritt unsere Berkely-Datenbank mit Inhalt befüllen.

Diese Daten, die aus Distinguished Names (DN) und einem eindeutigen Objektnamen bestehen, müssen hierzu in den Directory Information Tree (DIT), einer hierarchischen Baumstruktur eingefügt werden.

Directory Information Tree

Zur Übernahme bereits bestehender Nutzer aus dem LINUX-Grundsystem (/etc/passwd, /etc/group) werden wir uns zunächst einen passenden DIT anlegen. Diese Informationen werden wir auch wieder in .ldif-Dateien in einem zugehörigen Verzeichnis abgespeichert.

vorbereitende Konfiguration

Bevor wir nun im Detail beginnen werden unsere DIT zu erstellen, beenden wir erst einmal unseren eventuell noch laufenden slapd-Dämon.

# service slapd status slapd (pid 2024) is running... # service slapd stop Stopping slapd: [ OK ]

Im ersten Schritt werden wir nun unser Unterverzeichnis für die .ldif Dateistrukturen unseres DIT anlegen.

# mkdir /etc/openldap/ldif

Anschließend legen wir noch die Benutzer- und Gruppenrechte, sowie die Dateirechte entsprechend an.

# chown ldap.ldap /etc/openldap/ldif/ -R # chmod 700 /etc/openldap/ldif/ -R

Im letzten Schritt vor dem eigentlichem Erstellen der DIT erstellen wir uns noch eine Konfigurationsdatei für unsere verwendete Domäne nausch.org.ldif und legen diese im Verzeichnis /etc/openldap/ldif/ ab.

# vim /etc/openldap/ldif/nausch.org.ldif/etc/openldap/ldif/nausch.org.ldif

## Build the root node.dn: dc=nausch,dc=orgdc: NauschobjectClass: dcObjectobjectClass: organizationalUnitou: nausch Dot org ## Build the Manager cn.dn: cn=Manager,dc=nausch,dc=orgcn: ManagerobjectClass: organizationalRole ## Build the People ou.dn: ou=People,dc=nausch,dc=org

Page 20: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

ou: PeopleobjectClass: organizationalUnit ## Build the Group ou.dn: ou=Group,dc=nausch,dc=orgou: GroupobjectClass: organizationalUnit

Datenübernahme aus .ldif in die DIT

Nachdem wir nun die vorbereitenden Aufgaben erledigt haben werden wir im nächsten Schritt die Daten aus der *.LDIF-Datei in den Directory Information Tree überführen. Hierzu benutzen wir nachfolgenden Befahlsaufruf:

# slapadd -v -l /etc/openldap/ldif/nausch.org.ldif added: "dc=nausch,dc=org" (00000001)added: "cn=Manager,dc=nausch,dc=org" (00000002)_############### 77.52% eta none elapsed none spd 535.4 /s added: "ou=People,dc=nausch,dc=org" (00000003)added: "ou=Group,dc=nausch,dc=org" (00000004).#################### 100.00% eta none elapsed none fast! Closing DB...

Bevor wir nun unseren OpenLDAP-Server wieder starten korrigieren wir noch die Nutzerrechte der neu angelegten Dateien im Verzeichnis /var/lib/ldap.

# chown ldap:ldap /var/lib/ldap/cn.bdb /var/lib/ldap/objectClass.bdb /var/lib/ldap/ou.bdb

erster Test

Damit wir den gerade durchgeführten Import in den DIT auch überprüfen können, müssen wir unseren OpenLDAP-Server wieder starten.

# service slapd start Starting slapd: [ OK ]

Der erfolgreiche Start wurde im ldap-Logfile /var/log/ldap.log auch entsprechend quittiert.

Oct 27 11:58:43 vml000030 slapd[8070]: @(#) $OpenLDAP: slapd 2.4.19 (Jun 25 2011 11:27:10) $#012#[email protected]:/builddir/build/BUILD/openldap-2.4.19/openldap-2.4.19/build-servers/servers/slapdOct 27 11:58:43 vml000030 slapd[8071]: slapd starting

Ob nun das Anlegen der DIT erfolgreich war oder nicht, fragen wir nun mit folgender Suchanfrage ab.

# ldapsearch -x -b "dc=nausch,dc=org" "(objectclass=*)"# extended LDIF## LDAPv3# base <dc=nausch,dc=org> with scope subtree# filter: (objectclass=*)# requesting: ALL#

# nausch.orgdn: dc=nausch,dc=orgdc: NauschobjectClass: dcObjectobjectClass: organizationalUnitou: nausch Dot org

# Manager, nausch.orgdn: cn=Manager,dc=nausch,dc=org

Page 21: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

cn: ManagerobjectClass: organizationalRole

# People, nausch.orgdn: ou=People,dc=nausch,dc=orgou: PeopleobjectClass: organizationalUnit

# Group, nausch.orgdn: ou=Group,dc=nausch,dc=orgou: GroupobjectClass: organizationalUnit

# search resultsearch: 2result: 0 Success

# numResponses: 5# numEntries: 4

Im Logfile des slapd-Daemon wird unsere erfolgreiche Abfrage entsprechend protokolliert.

Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 fd=12 ACCEPT from IP=[::1]:56589 (IP=[::]:389)Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 op=0 BIND dn="" method=128Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 op=0 RESULT tag=97 err=0 text=Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 op=1 SRCH base="dc=nausch,dc=org" scope=2 deref=0 filter="(objectClass=*)"Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 op=1 SEARCH RESULT tag=101 err=0 nentries=4 text=Oct 27 12:04:26 vml000030 slapd[8071]: conn=4 op=2 UNBINDOct 27 12:04:26 vml000030 slapd[8071]: conn=4 fd=12 closed

Benutzermigration mit Hilfe der migrationstools

In den seltensten Fällen haben wir eine Installation ohne jegliche Benutzer; in der Regel befinden sich auf unserem LINUX-System bereits angelegte Nutzer mit Ihren Konten. Diesen Nutzer wird immer eine UserID (uid) ab 500 zugewiesen. Somit ist eine Unterscheidung zwischen realen Nutzern und technischen Nutzeraccounts relativ leicht möglich. Die hierzu erforderlichen Daten bekommen wir aus den beiden Dateien /etc/group und /etc/passwd.

Installation

Zur leichteren Übernahme der Nutzerdaten bedienen wir uns der Hilfsprogramme aus dem RPM-Paket migrationtools aus dem Base-Repository, welches wir nun zuerst installieren wollen.

# yum install migrationtools -y

Was uns dieses RPM-Paket alles an Hilfsmittel mitbringt zeigt uns ein Blick in das Paket selbst.

# rpm -qil migrationtoolsName : migrationtools Relocations: (not relocatable)Version : 47 Vendor: CentOSRelease : 7.el6 Build Date: Tue 24 Aug 2010 06:09:18 PM CESTInstall Date: Thu 27 Oct 2011 12:23:20 PM CEST Build Host: c6b2.bsys.dev.centos.orgGroup : System Environment/Daemons Source RPM: migrationtools-47-7.el6.src.rpmSize : 106663 License: BSDSignature : RSA/8, Sun 03 Jul 2011 06:30:14 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.padl.com/OSS/MigrationTools.htmlSummary : Migration scripts for LDAP

Page 22: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Description :The MigrationTools are a set of Perl scripts for migrating users, groups,aliases, hosts, netgroups, networks, protocols, RPCs, and services fromexisting nameservices (flat files, NIS, and NetInfo) to LDAP./usr/share/doc/migrationtools-47/usr/share/doc/migrationtools-47/README/usr/share/doc/migrationtools-47/migration-tools.txt/usr/share/migrationtools/usr/share/migrationtools/migrate_aliases.pl/usr/share/migrationtools/migrate_all_netinfo_offline.sh/usr/share/migrationtools/migrate_all_netinfo_online.sh/usr/share/migrationtools/migrate_all_nis_offline.sh/usr/share/migrationtools/migrate_all_nis_online.sh/usr/share/migrationtools/migrate_all_nisplus_offline.sh/usr/share/migrationtools/migrate_all_nisplus_online.sh/usr/share/migrationtools/migrate_all_offline.sh/usr/share/migrationtools/migrate_all_online.sh/usr/share/migrationtools/migrate_automount.pl/usr/share/migrationtools/migrate_base.pl/usr/share/migrationtools/migrate_common.ph/usr/share/migrationtools/migrate_fstab.pl/usr/share/migrationtools/migrate_group.pl/usr/share/migrationtools/migrate_hosts.pl/usr/share/migrationtools/migrate_netgroup.pl/usr/share/migrationtools/migrate_netgroup_byhost.pl/usr/share/migrationtools/migrate_netgroup_byuser.pl/usr/share/migrationtools/migrate_networks.pl/usr/share/migrationtools/migrate_passwd.pl/usr/share/migrationtools/migrate_profile.pl/usr/share/migrationtools/migrate_protocols.pl/usr/share/migrationtools/migrate_rpc.pl/usr/share/migrationtools/migrate_services.pl/usr/share/migrationtools/migrate_slapd_conf.pl

Konfiguration

Vor der Migration unserer Daten ist es noch notwendig, das mitgelieferte Hilfsprogramm migrate_common.ph unserer Produktivumgebung anzupassen.

# vim /usr/share/migrationtools/migrate_common.ph| /usr/share/migrationtools/migrate_common.ph

## $Id: migrate_common.ph,v 1.22 2003/04/15 03:09:33 lukeh Exp $## Copyright (c) 1997-2003 Luke Howard.# All rights reserved.## Redistribution and use in source and binary forms, with or without# modification, are permitted provided that the following conditions# are met:# 1. Redistributions of source code must retain the above copyright# notice, this list of conditions and the following disclaimer.# 2. Redistributions in binary form must reproduce the above copyright# notice, this list of conditions and the following disclaimer in the# documentation and/or other materials provided with the distribution.# 3. All advertising materials mentioning features or use of this software# must display the following acknowledgement:# This product includes software developed by Luke Howard.# 4. The name of the other may not be used to endorse or promote products# derived from this software without specific prior written permission.## THIS SOFTWARE IS PROVIDED BY THE LUKE HOWARD ``AS IS'' AND# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE# ARE DISCLAIMED. IN NO EVENT SHALL LUKE HOWARD BE LIABLE# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

Page 23: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF# SUCH DAMAGE.# ## Common defines for MigrationTools# # Naming contexts. Key is $PROGRAM with migrate_ and .pl # stripped off. $NETINFOBRIDGE = (-x "/usr/sbin/mkslapdconf"); if ($NETINFOBRIDGE) {

$NAMINGCONTEXT{'aliases'} = "cn=aliases";$NAMINGCONTEXT{'fstab'} = "cn=mounts";$NAMINGCONTEXT{'passwd'} = "cn=users";$NAMINGCONTEXT{'netgroup_byuser'} = "cn=netgroup.byuser";$NAMINGCONTEXT{'netgroup_byhost'} = "cn=netgroup.byhost";$NAMINGCONTEXT{'group'} = "cn=groups";$NAMINGCONTEXT{'netgroup'} = "cn=netgroup";$NAMINGCONTEXT{'hosts'} = "cn=machines";$NAMINGCONTEXT{'networks'} = "cn=networks";$NAMINGCONTEXT{'protocols'} = "cn=protocols";$NAMINGCONTEXT{'rpc'} = "cn=rpcs";$NAMINGCONTEXT{'services'} = "cn=services";

} else {$NAMINGCONTEXT{'aliases'} = "ou=Aliases";$NAMINGCONTEXT{'fstab'} = "ou=Mounts";$NAMINGCONTEXT{'passwd'} = "ou=People";$NAMINGCONTEXT{'netgroup_byuser'} = "nisMapName=netgroup.byuser";$NAMINGCONTEXT{'netgroup_byhost'} = "nisMapName=netgroup.byhost";$NAMINGCONTEXT{'group'} = "ou=Group";$NAMINGCONTEXT{'netgroup'} = "ou=Netgroup";$NAMINGCONTEXT{'hosts'} = "ou=Hosts";$NAMINGCONTEXT{'networks'} = "ou=Networks";$NAMINGCONTEXT{'protocols'} = "ou=Protocols";$NAMINGCONTEXT{'rpc'} = "ou=Rpc";$NAMINGCONTEXT{'services'} = "ou=Services";

} # Default DNS domain# Django : 2011-10-27 Domäne nausch.org angepasst# default : $DEFAULT_MAIL_DOMAIN = "padl.com";$DEFAULT_MAIL_DOMAIN = "nausch.org"; # Default base # Django : 2011-10-27 Domäne nausch.org angepasst# default : $DEFAULT_BASE = "dc=padl,dc=com";$DEFAULT_BASE = "dc=nausch,dc=org"; # Turn this on for inetLocalMailReceipient# sendmail support; add the following to # sendmail.mc (thanks to [email protected]):##### CUT HERE ######define(`confLDAP_DEFAULT_SPEC',`-h "ldap.padl.com"')dnl#LDAPROUTE_DOMAIN_FILE(`/etc/mail/ldapdomains')dnl#FEATURE(ldap_routing)dnl##### CUT HERE ###### where /etc/mail/ldapdomains contains names of ldap_routed# domains (similiar to MASQUERADE_DOMAIN_FILE).# $DEFAULT_MAIL_HOST = "mail.padl.com"; # turn this on to support more general object clases# such as person.$EXTENDED_SCHEMA = 0;

Page 24: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 ## allow environment variables to override predefines#if (defined($ENV{'LDAP_BASEDN'})) {

$DEFAULT_BASE = $ENV{'LDAP_BASEDN'};} if (defined($ENV{'LDAP_DEFAULT_MAIL_DOMAIN'})) {

$DEFAULT_MAIL_DOMAIN = $ENV{'LDAP_DEFAULT_MAIL_DOMAIN'};} if (defined($ENV{'LDAP_DEFAULT_MAIL_HOST'})) {

$DEFAULT_MAIL_HOST = $ENV{'LDAP_DEFAULT_MAIL_HOST'};} # binddn used for alias owner (otherwise uid=root,...)if (defined($ENV{'LDAP_BINDDN'})) {

$DEFAULT_OWNER = $ENV{'LDAP_BINDDN'};} if (defined($ENV{'LDAP_EXTENDED_SCHEMA'})) {

$EXTENDED_SCHEMA = $ENV{'LDAP_EXTENDED_SCHEMA'};} # If we haven't set the default base, guess it automagically.if (!defined($DEFAULT_BASE)) {

$DEFAULT_BASE = &domain_expand($DEFAULT_MAIL_DOMAIN);$DEFAULT_BASE =~ s/,$//o;

} # Default Kerberos realm#if ($EXTENDED_SCHEMA) {# $DEFAULT_REALM = $DEFAULT_MAIL_DOMAIN;# $DEFAULT_REALM =~ tr/a-z/A-Z/;#} if (-x "/usr/sbin/revnetgroup") {

$REVNETGROUP = "/usr/sbin/revnetgroup";} elsif (-x "/usr/lib/yp/revnetgroup") {

$REVNETGROUP = "/usr/lib/yp/revnetgroup";} $classmap{'o'} = 'organization';$classmap{'dc'} = 'domain';$classmap{'l'} = 'locality';$classmap{'ou'} = 'organizationalUnit';$classmap{'c'} = 'country';$classmap{'nismapname'} = 'nisMap';$classmap{'cn'} = 'container'; sub parse_args{

if ($#ARGV < 0) {print STDERR "Usage: $PROGRAM infile [outfile]\n";exit 1;

$INFILE = $ARGV[0]; 

if ($#ARGV > 0) {$OUTFILE = $ARGV[1];

}} sub open_files{

open(INFILE);if ($OUTFILE) {

Page 25: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

open(OUTFILE,">$OUTFILE");$use_stdout = 0;

} else {$use_stdout = 1;

}} # moved from migrate_hosts.pl# lukeh 10/30/97sub domain_expand{

local($first) = 1;local($dn);local(@namecomponents) = split(/\./, $_[0]);foreach $_ (@namecomponents) {

$first = 0;$dn .= "dc=$_,";

}$dn .= $DEFAULT_BASE;return $dn;

} # case insensitive uniquesub uniq{

local($name) = shift(@_);local(@vec) = sort {uc($a) cmp uc($b)} @_;local(@ret);local($next, $last);foreach $next (@vec) {

if ((uc($next) ne uc($last)) &&(uc($next) ne uc($name))) {push (@ret, $next);

}$last = $next;

}return @ret;

} # concatenate naming context and # organizational basesub getsuffix{

local($program) = shift(@_);local($nc);$program =~ s/^migrate_(.*)\.pl$/$1/;$nc = $NAMINGCONTEXT{$program};if ($nc eq "") {

return $DEFAULT_BASE;} else {

return $nc . ',' . $DEFAULT_BASE;}

} sub ldif_entry{# remove leading, trailing whitespace

local ($HANDLE, $lhs, $rhs) = @_;local ($type, $val) = split(/\=/, $lhs);local ($dn);

 if ($rhs ne "") {

$dn = $lhs . ',' . $rhs;} else {

$dn = $lhs;}

 $type =~ s/\s*$//o;$type =~ s/^\s*//o;

Page 26: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

$type =~ tr/A-Z/a-z/;$val =~ s/\s*$//o;$val =~ s/^\s*//o;

 print $HANDLE "dn: $dn\n";print $HANDLE "$type: $val\n";print $HANDLE "objectClass: top\n";print $HANDLE "objectClass: $classmap{$type}\n";if ($EXTENDED_SCHEMA) {

if ($DEFAULT_MAIL_DOMAIN) {print $HANDLE "objectClass: domainRelatedObject\n";print $HANDLE "associatedDomain: $DEFAULT_MAIL_DOMAIN\n";

}}

 print $HANDLE "\n";

} # Added Thu Jun 20 16:40:28 CDT 2002 by Bob Apthorpe# <[email protected]> to solve problems with embedded plusses in# protocols and mail aliases.sub escape_metacharacters{

local($name) = @_; 

# From Table 3.1 "Characters Requiring Quoting When Contained# in Distinguished Names", p87 "Understanding and Deploying LDAP# Directory Services", Howes, Smith, & Good.

 # 1) Quote backslash# Note: none of these are very elegant or robust and may cause# more trouble than they're worth. That's why they're disabled.# 1.a) naive (escape all backslashes)# $name =~ s#\\#\\\\#og;## 1.b) mostly naive (escape all backslashes not followed by# a backslash)# $name =~ s#\\(?!\\)#\\\\#og;## 1.c) less naive and utterly gruesome (replace solitary# backslashes)# $name =~ s{ # Replace# (?<!\\) # negative lookbehind (no preceding backslash)# \\ # a single backslash# (?!\\) # negative lookahead (no following backslash)# }# { # With# \\\\ # a pair of backslashes# }gx;# Ugh. Note that s#(?:[^\\])\\(?:[^\\])#////#g fails if $name# starts or ends with a backslash. This expression won't work# under perl4 because the /x flag and negative lookahead and# lookbehind operations aren't supported. Sorry. Also note that# s#(?:[^\\]*)\\(?:[^\\]*)#////#g won't work either. Of course,# this is all broken if $name is already escaped before we get# to it. Best to throw a warning and make the user import these# records by hand.

 # 2) Quote leading and trailing spaceslocal($leader, $body, $trailer) = ();if (($leader, $body, $trailer) = ($name =~ m#^( *)(.*\S)( *)$#o)) {

$leader =~ s# #\\ #og;$trailer =~ s# #\\ #og;$name = $leader . $body . $trailer;

# 3) Quote leading octothorpe (#)$name =~ s/^#/\\#/o;

 

Page 27: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# 4) Quote comma, plus, double-quote, less-than, greater-than,# and semicolon$name =~ s#([,+"<>;])#\\$1#g;

 return $name;

} 1;

Datenselektion

Bevor wir nun im Detail beginnen werden unsere Userdaten in den DIT zu übernehmen, beenden wir erst einmal unseren eventuell noch laufenden slapd-Dämon.

# service slapd status slapd (pid 2024) is running... # service slapd stop Stopping slapd: [ OK ]

Da wir nicht alle Nutzer, sondern nur die realen Benutzer in den DIT übernehmen wollen, extrahieren wir alle Nutzer aus der /etc/group und /etc/passwd deren UID größer oder gleich 500 ist und legen diesen in zwei eigenen Dateien ab.

# grep ":5[0-9][0-9]" /etc/group > /etc/openldap/ldif/group # grep ":5[0-9][0-9]" /etc/passwd > /etc/openldap/ldif/passwd

Datenmigration

Nun ist es an der Zeit unsere Nutzerdaten aus den zuvor angelegten temporären Dateien in entsprechende .ldif Dateien zu konvertieren. Hierzu nutzen wir die Hilfsprogramme aus dem zuvor installiertem RPM Paket migrationtools:

migrate_passwd.pl migrate_group.pl

Wir erstellen also nun die beiden .ldif-Dateien.

# /usr/share/migrationtools/migrate_passwd.pl /etc/openldap/ldif/passwd > /etc/openldap/ldif/passwd.ldif # /usr/share/migrationtools/migrate_group.pl /etc/openldap/ldif/group > /etc/openldap/ldif/group.ldif

Aus der Datei /etc/openldap/ldif/passwd mit dem Inhalt

django:x:500:500:Django:/home/django:/bin/bashbigchief:x:501:501:BigChief:/home/bigchief:/bin/bash

wurde also die Datei /etc/openldap/ldif/passwd.ldif mit dem Inhalt

dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword: {crypt}$6$CgkuPTZe$4bOl/GgR1H89iqB4miN2aSyVwGQa6IYnmn4xiFw2dV4lmcJjDhc9qwkEabPu6T/PHMcWqaKmoJRwz6XpU7wVm1shadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7

Page 28: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

dn: uid=bigchief,ou=People,dc=nausch,dc=orguid: bigchiefcn: BigChiefobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword: {crypt}$6$j5rlaJGu$iOVKzOjp9GNIjO41LaYiO1qNOksHklT5xjSsJ108cgmfVpndyXKuPVKX8Ph8exnfelRchPR9IX9tfjUqnmIeh.shadowLastChange: 15274shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 501gidNumber: 501homeDirectory: /home/bigchiefgecos: BigChief

generiert.

Aus der Datei /etc/openldap/ldif/group mit dem Inhalt

django:x:500:bigchief:x:501:

wurde die Datei /etc/openldap/ldif/group.ldif mit dem Inhalt

dn: cn=django,ou=Group,dc=nausch,dc=orgobjectClass: posixGroupobjectClass: topcn: djangouserPassword: {crypt}xgidNumber: 500

dn: cn=bigchief,ou=Group,dc=nausch,dc=orgobjectClass: posixGroupobjectClass: topcn: bigchiefuserPassword: {crypt}xgidNumber: 501

generiert.

Datenübernahme in den DIT

Im nun folgenden Schritt werden wir die Daten aus den zuvor generierten .ldif-Dateien in den DIT übernehmen. Vor dem Import passen wir noch die Nutzerrechte unserer .ldif-Dateien an.

# chown ldap:ldap /etc/openldap/ldif/*.ldif

Zu erst importieren wir die Inhalte aus der passwd.ldif

# slapadd -v -l /etc/openldap/ldif/passwd.ldifadded: "uid=django,ou=People,dc=nausch,dc=org" (00000005)_#################### 100.00% eta none elapsed none fast! added: "uid=bigchief,ou=People,dc=nausch,dc=org" (00000006)

Page 29: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

.#################### 100.00% eta none elapsed none fast! Closing DB...

Anschließend importieren wir die Inhalte aus der group.ldif

# slapadd -v -l /etc/openldap/ldif/group.ldifadded: "cn=django,ou=Group,dc=nausch,dc=org" (00000007)added: "cn=bigchief,ou=Group,dc=nausch,dc=org" (00000008)_#################### 100.00% eta none elapsed none fast! Closing DB...

Bevor wir nun unseren OpenLDAP-Server wieder starten korrigieren wir noch die Nutzerrechte der neu angelegten Dateien im Verzeichnis /var/lib/ldap.

abschließender Test

Damit wir den gerade durchgeführten User- und Gruppendaten-Import in den DIT auch überprüfen können, müssen wir unseren OpenLDAP-Server wieder starten.

# service slapd start Starting slapd: [ OK ]

Der erfolgreiche Start wurde im ldap-Logfile /var/log/ldap.log auch entsprechend quittiert.

Oct 27 13:41:22 vml000030 slapd[8239]: @(#) $OpenLDAP: slapd 2.4.19 (Jun 25 2011 11:27:10) $#012#[email protected]:/builddir/build/BUILD/openldap-2.4.19/openldap-2.4.19/build-servers/servers/slapdOct 27 13:41:22 vml000030 slapd[8240]: slapd starting

Für den abschließenden Test, ob die Datenmigration aus den filebasierenden Dateien in den DIT unseres OpenLADP-Servers geklappt hat, befragen wir unseren LDAP-Server nach den Daten zum User django.

# ldapsearch -x -b "uid=django,ou=People,dc=nausch,dc=org" "(objectclass=*)"# extended LDIF## LDAPv3# base <uid=django,ou=People,dc=nausch,dc=org> with scope subtree# filter: (objectclass=*)# requesting: ALL#

# django, People, nausch.orgdn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

# search resultsearch: 2result: 0 Success

# numResponses: 2

Page 30: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# numEntries: 1

Unsere erfolgreiche Abfrage erzeugt einen entsprechendnen Eintrag im Logfile des slapd-Daemon.

Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 fd=12 ACCEPT from IP=[::1]:44777 (IP=[::]:389)Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 op=0 BIND dn="" method=128Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 op=0 RESULT tag=97 err=0 text=Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 op=1 SRCH base="uid=django,ou=People,dc=nausch,dc=org" scope=2 deref=0 filter="(objectClass=*)"Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=Oct 27 13:43:30 vml000030 slapd[8240]: conn=0 op=2 UNBINDOct 27 13:43:30 vml000030 slapd[8240]: conn=0 fd=12 closed

Links Zurück zum Kapitel >>OpenLDAP Server unter CentOS 6.x<< Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite

Diskussion clumsy, 2013/04/04 17:04

Hi Django,

finde die Doku sehr gelungen, allerdings bekomme ich Probleme bei der Erstladung. Wenn ich ein slapadd mache bekomme ich immer die folgende Fehlermeldung!

[root@localhost openldap]# slapadd -v -l /etc/openldap/ldif/nausch.org.ldif str2entry: entry -1 has multiple DNs „dc=nausch,dc=org“ and „cn=Manager,dc=nausch,dc=org“ slapadd: could not parse entry (line=1) _#################### 100.00% eta none elapsed none fast! Closing DB…

Woran kann das liegen?

Danke für die Unterstützung!

Gruß clumsy

Zohaza, 2012/08/22 09:43

Ryan:MacOS X can be conadfigadured to auth users using the “Directory Access” utiladity (it’s pretty slick, and supadports the RFC way, the Apple way, and the ActiveDirectory way), and setadting up Samba to use OpenLDAP as a SAM backadend for NT domian authenadtiadcaadtion was pretty simadple – just a matadter of using their schemas inteladliadgently and keepading your users under a paradticaduadlar DN. We didn’t bother with the OS 9 boxen because they were being phased out anways. Linux requires libnss-ldap, of course (which is pretty well-documented, IMO). One thing that ended up bitading us in the ass was putting the “ldap” entry in nsswitch.conf first on the list — it ends up makading INIT go out-to-lunch in a bizadzare way, which forced us to boot the PDC (not someadthing that can be offline for a few days while you debug it) off of a LiveCD and run the seradvices when we restarted it for a new keradnel until someadone else found the same probadlem and lazyadweb caught up with thea0issue.Most useadful was the offiadcial Samba3 HOWTO, and the . Of course, had I to do it over again, I’d just have setup OpenLDAP as a fake OS X server, so as my boss slowly conadverted the office to woradshipading at , he could’ve used the variadety OS X admin tools he touted. If you don’t have to migrate an existading domian, that’s a bonusa0too.iain:One hopes, but it still reminds me of HR peoadple comading to Netscape and assumading that the thing that made the proadgramadmers at Netscape willadingly put in 80a0hour weeks while on salary was the free pizza and Mt. Dew and winking-and-nodding at goofading off (as

Page 31: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

opposed to, e.g., everyadone being comadpeadtent at their job and recadogadnizading that the work actuadally meant someadthing in the fuzzy-kitty, big-picture sense), so if only every comadpany proadvided free pizza and Mt. Dew and let employadees occaadsionadally goof off, everyadone would want to put in 80a0hour weeks while on salary.Really I’m just pissed at spamadmers, paradticaduadlarly those extremadists who call it “maradketading” and are busily proadmotading the idea of altoadgether replacading conadtent with advertising.

Page 32: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Konfiguration auf Clientseite zur Client-Authentification via anonymous bind

Bei den betreffenden Clients wollen wir nun die Authentifizierung der einzelnen User nicht mehr gegen die lokale /etc/shadow laufen lassen, denn dazu müssten wir nun auf jedem Host die User manuell (nach)pflegen. Schließlich sollen die User, egal an welchem Host sie sich anmelden, immer auch das gleiche Passwort benutzen können. Nicht zuletzt aus diesem Gründen, haben wir uns für einen zentralen OpenLDAP-Server entschieden.

Die nachfolgende Beschreibung nutzt bei der Realisierung keinen System Security Services Daemon sssd. Auf diesen werden wir noch in einem separatem Kapitel detailliert eingehen.

Installation

Wie bereits erwähnt, verzichten wir im ersten Schritt auf den System Security Services Daemon. Als erstes deinstallieren wir den sssd, sofern dieser zuvor installiert worden war.

# yum remove sssd

Auf der Clientseite benötigen wir nachfolgende Pakete, die wir bei Bedarf mit Unterstützung von YUM nachinstallieren.

openldap openldap-clients pam_ldap nss-pam-ldapd pam glibc authconfig

# yum install openldap openldap-clients pam_ldap nss-pam-ldapd pam glibc authconfig -y

Was uns die einzelnen Pakete mit ins System bringen, erkunden wir bei Bedarf mit dem Aufruf mit dem Aufruf von rpm -qil.

openldap # rpm -qil openldapName : openldap Relocations: (not relocatable)Version : 2.4.19 Vendor: CentOSRelease : 15.el6_0.2 Build Date: Sat 25 Jun 2011 12:30:55 PM CESTInstall Date: Sun 16 Oct 2011 04:00:01 PM CEST Build Host: c6b6.bsys.dev.centos.orgGroup : System Environment/Daemons Source RPM: openldap-2.4.19-15.el6_0.2.src.rpmSize : 696888 License: OpenLDAPSignature : RSA/8, Wed 06 Jul 2011 03:42:02 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.openldap.org/Summary : LDAP support librariesDescription :

Page 33: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

OpenLDAP is an open source suite of LDAP (Lightweight Directory AccessProtocol) applications and development tools. LDAP is a set ofprotocols for accessing directory services (usually phone book styleinformation, but other information is possible) over the Internet,similar to the way DNS (Domain Name System) information is propagatedover the Internet. The openldap package contains configuration files,libraries, and documentation for OpenLDAP./etc/openldap/etc/openldap/cacerts/etc/openldap/ldap.conf/usr/lib64/liblber-2.4.so.2/usr/lib64/liblber-2.4.so.2.5.2/usr/lib64/libldap-2.4.so.2/usr/lib64/libldap-2.4.so.2.5.2/usr/lib64/libldap_r-2.4.so.2/usr/lib64/libldap_r-2.4.so.2.5.2/usr/share/doc/openldap-2.4.19/usr/share/doc/openldap-2.4.19/ANNOUNCEMENT/usr/share/doc/openldap-2.4.19/CHANGES/usr/share/doc/openldap-2.4.19/COPYRIGHT/usr/share/doc/openldap-2.4.19/LICENSE/usr/share/doc/openldap-2.4.19/README/usr/share/man/man5/ldap.conf.5.gz/usr/share/man/man5/ldif.5.gz

openldap-clients # rpm -qil openldap-clientsName : openldap-clients Relocations: (not relocatable)Version : 2.4.19 Vendor: CentOSRelease : 15.el6_0.2 Build Date: Sat 25 Jun 2011 12:30:55 PM CESTInstall Date: Fri 28 Oct 2011 09:17:51 AM CEST Build Host: c6b6.bsys.dev.centos.orgGroup : Applications/Internet Source RPM: openldap-2.4.19-15.el6_0.2.src.rpmSize : 612692 License: OpenLDAPSignature : RSA/8, Wed 06 Jul 2011 03:42:03 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.openldap.org/Summary : LDAP client utilitiesDescription :OpenLDAP is an open-source suite of LDAP (Lightweight Directory AccessProtocol) applications and development tools. LDAP is a set ofprotocols for accessing directory services (usually phone book styleinformation, but other information is possible) over the Internet,similar to the way DNS (Domain Name System) information is propagatedover the Internet. The openldap-clients package contains the clientprograms needed for accessing and modifying OpenLDAP directories./usr/bin/ldapadd/usr/bin/ldapcompare/usr/bin/ldapdelete/usr/bin/ldapexop/usr/bin/ldapmodify/usr/bin/ldapmodrdn/usr/bin/ldappasswd/usr/bin/ldapsearch/usr/bin/ldapurl/usr/bin/ldapwhoami/usr/share/man/man1/ldapadd.1.gz/usr/share/man/man1/ldapcompare.1.gz/usr/share/man/man1/ldapdelete.1.gz/usr/share/man/man1/ldapexop.1.gz/usr/share/man/man1/ldapmodify.1.gz/usr/share/man/man1/ldapmodrdn.1.gz/usr/share/man/man1/ldappasswd.1.gz/usr/share/man/man1/ldapsearch.1.gz/usr/share/man/man1/ldapurl.1.gz/usr/share/man/man1/ldapwhoami.1.gz

Page 34: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

pam_ldap # rpm -qil pam_ldapName : pam_ldap Relocations: (not relocatable)Version : 185 Vendor: CentOSRelease : 5.el6 Build Date: Mon 23 Aug 2010 08:00:38 AM CESTInstall Date: Sun 16 Oct 2011 02:57:36 PM CEST Build Host: c6b2.bsys.dev.centos.orgGroup : System Environment/Base Source RPM: pam_ldap-185-5.el6.src.rpmSize : 158003 License: LGPLv2+Signature : RSA/8, Sun 03 Jul 2011 06:53:46 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.padl.com/OSS/pam_ldap.htmlSummary : PAM module for LDAPDescription :pam_ldap is a module for Linux-PAM that supports password changes, server-enforced password policies, access authorization, and crypted hashes./etc/pam_ldap.conf/etc/pam_ldap.secret/lib64/security/pam_ldap.so/usr/share/doc/pam_ldap-185/usr/share/doc/pam_ldap-185/AUTHORS/usr/share/doc/pam_ldap-185/COPYING/usr/share/doc/pam_ldap-185/COPYING.LIB/usr/share/doc/pam_ldap-185/ChangeLog/usr/share/doc/pam_ldap-185/NEWS/usr/share/doc/pam_ldap-185/README/usr/share/doc/pam_ldap-185/README.TLS/usr/share/doc/pam_ldap-185/ldapns.schema/usr/share/doc/pam_ldap-185/ns-pwd-policy.schema/usr/share/doc/pam_ldap-185/pam.d/usr/share/doc/pam_ldap-185/pam.d/chfn/usr/share/doc/pam_ldap-185/pam.d/chsh/usr/share/doc/pam_ldap-185/pam.d/ftp/usr/share/doc/pam_ldap-185/pam.d/gdm/usr/share/doc/pam_ldap-185/pam.d/halt/usr/share/doc/pam_ldap-185/pam.d/imap/usr/share/doc/pam_ldap-185/pam.d/kde/usr/share/doc/pam_ldap-185/pam.d/linuxconf/usr/share/doc/pam_ldap-185/pam.d/linuxconf-pair/usr/share/doc/pam_ldap-185/pam.d/login/usr/share/doc/pam_ldap-185/pam.d/mcserv/usr/share/doc/pam_ldap-185/pam.d/other/usr/share/doc/pam_ldap-185/pam.d/passwd/usr/share/doc/pam_ldap-185/pam.d/pop/usr/share/doc/pam_ldap-185/pam.d/poweroff/usr/share/doc/pam_ldap-185/pam.d/ppp/usr/share/doc/pam_ldap-185/pam.d/reboot/usr/share/doc/pam_ldap-185/pam.d/rexec/usr/share/doc/pam_ldap-185/pam.d/rlogin/usr/share/doc/pam_ldap-185/pam.d/rsh/usr/share/doc/pam_ldap-185/pam.d/samba/usr/share/doc/pam_ldap-185/pam.d/shutdown/usr/share/doc/pam_ldap-185/pam.d/ssh/usr/share/doc/pam_ldap-185/pam.d/su/usr/share/doc/pam_ldap-185/pam.d/vlock/usr/share/doc/pam_ldap-185/pam.d/xdm/usr/share/doc/pam_ldap-185/pam.d/xlock/usr/share/doc/pam_ldap-185/pam.d/xscreensaver/usr/share/doc/pam_ldap-185/pam.d/xserver/usr/share/man/man5/pam_ldap.5.gz

nss-pam-ldapd # rpm -qil nss-pam-ldapdName : nss-pam-ldapd Relocations: (not relocatable)Version : 0.7.5 Vendor: CentOSRelease : 3.el6 Build Date: Wed 25 Aug 2010 06:51:48 PM CEST

Page 35: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Install Date: Sun 16 Oct 2011 03:03:28 PM CEST Build Host: c6b3.bsys.dev.centos.orgGroup : System Environment/Base Source RPM: nss-pam-ldapd-0.7.5-3.el6.src.rpmSize : 464737 License: LGPLv2+Signature : RSA/8, Sun 03 Jul 2011 06:47:54 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://arthurdejong.org/nss-pam-ldapd/Summary : An nsswitch module which uses directory serversDescription :The nss-pam-ldapd daemon, nslcd, uses a directory server to look up nameservice information (users, groups, etc.) on behalf of a lightweightnsswitch module./etc/nslcd.conf/etc/rc.d/init.d/nslcd/lib64/libnss_ldap.so.2/usr/lib64/libnss_ldap.so/usr/sbin/nslcd/usr/share/doc/nss-pam-ldapd-0.7.5/usr/share/doc/nss-pam-ldapd-0.7.5/AUTHORS/usr/share/doc/nss-pam-ldapd-0.7.5/COPYING/usr/share/doc/nss-pam-ldapd-0.7.5/ChangeLog/usr/share/doc/nss-pam-ldapd-0.7.5/HACKING/usr/share/doc/nss-pam-ldapd-0.7.5/NEWS/usr/share/doc/nss-pam-ldapd-0.7.5/README/usr/share/doc/nss-pam-ldapd-0.7.5/TODO/usr/share/man/man5/nslcd.conf.5.gz/usr/share/man/man8/nslcd.8.gz/var/run/nslcd

pam # rpm -qil pamName : pam Relocations: (not relocatable)Version : 1.1.1 Vendor: CentOSRelease : 4.el6_0.1 Build Date: Sat 25 Jun 2011 05:32:51 AM CESTInstall Date: Sun 16 Oct 2011 04:02:20 PM CEST Build Host: c6b5.bsys.dev.centos.orgGroup : System Environment/Base Source RPM: pam-1.1.1-4.el6_0.1.src.rpmSize : 2241000 License: BSD and GPLv2+Signature : RSA/8, Wed 06 Jul 2011 03:44:29 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://www.us.kernel.org/pub/linux/libs/pam/index.htmlSummary : An extensible library which provides authentication for applicationsDescription :PAM (Pluggable Authentication Modules) is a system security tool thatallows system administrators to set authentication policy withouthaving to recompile programs that handle authentication./etc/pam.d/etc/pam.d/config-util/etc/pam.d/fingerprint-auth/etc/pam.d/other/etc/pam.d/password-auth/etc/pam.d/smartcard-auth/etc/pam.d/system-auth/etc/security/etc/security/access.conf/etc/security/chroot.conf/etc/security/console.apps/etc/security/console.handlers/etc/security/console.perms/etc/security/console.perms.d/etc/security/group.conf/etc/security/limits.conf/etc/security/limits.d/etc/security/limits.d/90-nproc.conf/etc/security/namespace.conf/etc/security/namespace.d

Page 36: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/etc/security/namespace.init/etc/security/opasswd/etc/security/pam_env.conf/etc/security/sepermit.conf/etc/security/time.conf/lib/security/lib64/libpam.so.0/lib64/libpam.so.0.82.2/lib64/libpam_misc.so.0/lib64/libpam_misc.so.0.82.0/lib64/libpamc.so.0/lib64/libpamc.so.0.82.1/lib64/security/lib64/security/pam_access.so/lib64/security/pam_chroot.so/lib64/security/pam_console.so/lib64/security/pam_cracklib.so/lib64/security/pam_debug.so/lib64/security/pam_deny.so/lib64/security/pam_echo.so/lib64/security/pam_env.so/lib64/security/pam_exec.so/lib64/security/pam_faildelay.so/lib64/security/pam_filter/lib64/security/pam_filter.so/lib64/security/pam_filter/upperLOWER/lib64/security/pam_ftp.so/lib64/security/pam_group.so/lib64/security/pam_issue.so/lib64/security/pam_keyinit.so/lib64/security/pam_lastlog.so/lib64/security/pam_limits.so/lib64/security/pam_listfile.so/lib64/security/pam_localuser.so/lib64/security/pam_loginuid.so/lib64/security/pam_mail.so/lib64/security/pam_mkhomedir.so/lib64/security/pam_motd.so/lib64/security/pam_namespace.so/lib64/security/pam_nologin.so/lib64/security/pam_permit.so/lib64/security/pam_postgresok.so/lib64/security/pam_pwhistory.so/lib64/security/pam_rhosts.so/lib64/security/pam_rootok.so/lib64/security/pam_securetty.so/lib64/security/pam_selinux.so/lib64/security/pam_selinux_permit.so/lib64/security/pam_sepermit.so/lib64/security/pam_shells.so/lib64/security/pam_stress.so/lib64/security/pam_succeed_if.so/lib64/security/pam_tally2.so/lib64/security/pam_time.so/lib64/security/pam_timestamp.so/lib64/security/pam_tty_audit.so/lib64/security/pam_umask.so/lib64/security/pam_unix.so/lib64/security/pam_unix_acct.so/lib64/security/pam_unix_auth.so/lib64/security/pam_unix_passwd.so/lib64/security/pam_unix_session.so/lib64/security/pam_userdb.so/lib64/security/pam_warn.so/lib64/security/pam_wheel.so/lib64/security/pam_xauth.so/sbin/mkhomedir_helper/sbin/pam_console_apply/sbin/pam_tally2

Page 37: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/sbin/pam_timestamp_check/sbin/unix_chkpwd/sbin/unix_update/usr/share/doc/pam-1.1.1/usr/share/doc/pam-1.1.1/Copyright/usr/share/doc/pam-1.1.1/Linux-PAM_SAG.txt/usr/share/doc/pam-1.1.1/html/usr/share/doc/pam-1.1.1/html/Linux-PAM_SAG.html/usr/share/doc/pam-1.1.1/html/sag-author.html/usr/share/doc/pam-1.1.1/html/sag-configuration-directory.html/usr/share/doc/pam-1.1.1/html/sag-configuration-example.html/usr/share/doc/pam-1.1.1/html/sag-configuration-file.html/usr/share/doc/pam-1.1.1/html/sag-configuration.html/usr/share/doc/pam-1.1.1/html/sag-copyright.html/usr/share/doc/pam-1.1.1/html/sag-introduction.html/usr/share/doc/pam-1.1.1/html/sag-module-reference.html/usr/share/doc/pam-1.1.1/html/sag-overview.html/usr/share/doc/pam-1.1.1/html/sag-pam_access.html/usr/share/doc/pam-1.1.1/html/sag-pam_cracklib.html/usr/share/doc/pam-1.1.1/html/sag-pam_debug.html/usr/share/doc/pam-1.1.1/html/sag-pam_deny.html/usr/share/doc/pam-1.1.1/html/sag-pam_echo.html/usr/share/doc/pam-1.1.1/html/sag-pam_env.html/usr/share/doc/pam-1.1.1/html/sag-pam_exec.html/usr/share/doc/pam-1.1.1/html/sag-pam_faildelay.html/usr/share/doc/pam-1.1.1/html/sag-pam_filter.html/usr/share/doc/pam-1.1.1/html/sag-pam_ftp.html/usr/share/doc/pam-1.1.1/html/sag-pam_group.html/usr/share/doc/pam-1.1.1/html/sag-pam_issue.html/usr/share/doc/pam-1.1.1/html/sag-pam_keyinit.html/usr/share/doc/pam-1.1.1/html/sag-pam_lastlog.html/usr/share/doc/pam-1.1.1/html/sag-pam_limits.html/usr/share/doc/pam-1.1.1/html/sag-pam_listfile.html/usr/share/doc/pam-1.1.1/html/sag-pam_localuser.html/usr/share/doc/pam-1.1.1/html/sag-pam_loginuid.html/usr/share/doc/pam-1.1.1/html/sag-pam_mail.html/usr/share/doc/pam-1.1.1/html/sag-pam_mkhomedir.html/usr/share/doc/pam-1.1.1/html/sag-pam_motd.html/usr/share/doc/pam-1.1.1/html/sag-pam_namespace.html/usr/share/doc/pam-1.1.1/html/sag-pam_nologin.html/usr/share/doc/pam-1.1.1/html/sag-pam_permit.html/usr/share/doc/pam-1.1.1/html/sag-pam_pwhistory.html/usr/share/doc/pam-1.1.1/html/sag-pam_rhosts.html/usr/share/doc/pam-1.1.1/html/sag-pam_rootok.html/usr/share/doc/pam-1.1.1/html/sag-pam_securetty.html/usr/share/doc/pam-1.1.1/html/sag-pam_selinux.html/usr/share/doc/pam-1.1.1/html/sag-pam_shells.html/usr/share/doc/pam-1.1.1/html/sag-pam_succeed_if.html/usr/share/doc/pam-1.1.1/html/sag-pam_tally.html/usr/share/doc/pam-1.1.1/html/sag-pam_tally2.html/usr/share/doc/pam-1.1.1/html/sag-pam_time.html/usr/share/doc/pam-1.1.1/html/sag-pam_timestamp.html/usr/share/doc/pam-1.1.1/html/sag-pam_umask.html/usr/share/doc/pam-1.1.1/html/sag-pam_unix.html/usr/share/doc/pam-1.1.1/html/sag-pam_userdb.html/usr/share/doc/pam-1.1.1/html/sag-pam_warn.html/usr/share/doc/pam-1.1.1/html/sag-pam_wheel.html/usr/share/doc/pam-1.1.1/html/sag-pam_xauth.html/usr/share/doc/pam-1.1.1/html/sag-security-issues-other.html/usr/share/doc/pam-1.1.1/html/sag-security-issues-wrong.html/usr/share/doc/pam-1.1.1/html/sag-security-issues.html/usr/share/doc/pam-1.1.1/html/sag-see-also.html/usr/share/doc/pam-1.1.1/html/sag-text-conventions.html/usr/share/doc/pam-1.1.1/rfc86.0.txt/usr/share/doc/pam-1.1.1/txts/usr/share/doc/pam-1.1.1/txts/README.pam_access/usr/share/doc/pam-1.1.1/txts/README.pam_chroot/usr/share/doc/pam-1.1.1/txts/README.pam_console/usr/share/doc/pam-1.1.1/txts/README.pam_cracklib

Page 38: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/doc/pam-1.1.1/txts/README.pam_debug/usr/share/doc/pam-1.1.1/txts/README.pam_deny/usr/share/doc/pam-1.1.1/txts/README.pam_echo/usr/share/doc/pam-1.1.1/txts/README.pam_env/usr/share/doc/pam-1.1.1/txts/README.pam_exec/usr/share/doc/pam-1.1.1/txts/README.pam_faildelay/usr/share/doc/pam-1.1.1/txts/README.pam_filter/usr/share/doc/pam-1.1.1/txts/README.pam_ftp/usr/share/doc/pam-1.1.1/txts/README.pam_group/usr/share/doc/pam-1.1.1/txts/README.pam_issue/usr/share/doc/pam-1.1.1/txts/README.pam_keyinit/usr/share/doc/pam-1.1.1/txts/README.pam_lastlog/usr/share/doc/pam-1.1.1/txts/README.pam_limits/usr/share/doc/pam-1.1.1/txts/README.pam_listfile/usr/share/doc/pam-1.1.1/txts/README.pam_localuser/usr/share/doc/pam-1.1.1/txts/README.pam_loginuid/usr/share/doc/pam-1.1.1/txts/README.pam_mail/usr/share/doc/pam-1.1.1/txts/README.pam_mkhomedir/usr/share/doc/pam-1.1.1/txts/README.pam_motd/usr/share/doc/pam-1.1.1/txts/README.pam_namespace/usr/share/doc/pam-1.1.1/txts/README.pam_nologin/usr/share/doc/pam-1.1.1/txts/README.pam_permit/usr/share/doc/pam-1.1.1/txts/README.pam_postgresok/usr/share/doc/pam-1.1.1/txts/README.pam_pwhistory/usr/share/doc/pam-1.1.1/txts/README.pam_rhosts/usr/share/doc/pam-1.1.1/txts/README.pam_rootok/usr/share/doc/pam-1.1.1/txts/README.pam_securetty/usr/share/doc/pam-1.1.1/txts/README.pam_selinux/usr/share/doc/pam-1.1.1/txts/README.pam_sepermit/usr/share/doc/pam-1.1.1/txts/README.pam_shells/usr/share/doc/pam-1.1.1/txts/README.pam_stress/usr/share/doc/pam-1.1.1/txts/README.pam_succeed_if/usr/share/doc/pam-1.1.1/txts/README.pam_tally/usr/share/doc/pam-1.1.1/txts/README.pam_tally2/usr/share/doc/pam-1.1.1/txts/README.pam_time/usr/share/doc/pam-1.1.1/txts/README.pam_timestamp/usr/share/doc/pam-1.1.1/txts/README.pam_tty_audit/usr/share/doc/pam-1.1.1/txts/README.pam_umask/usr/share/doc/pam-1.1.1/txts/README.pam_unix/usr/share/doc/pam-1.1.1/txts/README.pam_userdb/usr/share/doc/pam-1.1.1/txts/README.pam_warn/usr/share/doc/pam-1.1.1/txts/README.pam_wheel/usr/share/doc/pam-1.1.1/txts/README.pam_xauth/usr/share/locale/ar/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/as/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/bn_IN/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ca/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/cs/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/da/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/de/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/es/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/fi/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/fr/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/gu/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/hi/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/hu/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/it/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ja/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/kk/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/km/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/kn/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ko/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ml/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/mr/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ms/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/nb/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/nl/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/or/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/pa/LC_MESSAGES/Linux-PAM.mo

Page 39: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/locale/pl/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/pt/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/pt_BR/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ru/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/si/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/sk/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/sr/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/sr@latin/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/sv/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/ta/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/te/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/tr/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/uk/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/zh_CN/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/zh_TW/LC_MESSAGES/Linux-PAM.mo/usr/share/locale/zu/LC_MESSAGES/Linux-PAM.mo/usr/share/man/man5/access.conf.5.gz/usr/share/man/man5/config-util.5.gz/usr/share/man/man5/console.apps.5.gz/usr/share/man/man5/console.handlers.5.gz/usr/share/man/man5/console.perms.5.gz/usr/share/man/man5/group.conf.5.gz/usr/share/man/man5/limits.conf.5.gz/usr/share/man/man5/namespace.conf.5.gz/usr/share/man/man5/pam.conf.5.gz/usr/share/man/man5/pam.d.5.gz/usr/share/man/man5/pam_env.conf.5.gz/usr/share/man/man5/sepermit.conf.5.gz/usr/share/man/man5/system-auth.5.gz/usr/share/man/man5/time.conf.5.gz/usr/share/man/man8/PAM.8.gz/usr/share/man/man8/mkhomedir_helper.8.gz/usr/share/man/man8/pam.8.gz/usr/share/man/man8/pam_access.8.gz/usr/share/man/man8/pam_console.8.gz/usr/share/man/man8/pam_console_apply.8.gz/usr/share/man/man8/pam_cracklib.8.gz/usr/share/man/man8/pam_debug.8.gz/usr/share/man/man8/pam_deny.8.gz/usr/share/man/man8/pam_echo.8.gz/usr/share/man/man8/pam_env.8.gz/usr/share/man/man8/pam_exec.8.gz/usr/share/man/man8/pam_faildelay.8.gz/usr/share/man/man8/pam_filter.8.gz/usr/share/man/man8/pam_ftp.8.gz/usr/share/man/man8/pam_group.8.gz/usr/share/man/man8/pam_issue.8.gz/usr/share/man/man8/pam_keyinit.8.gz/usr/share/man/man8/pam_lastlog.8.gz/usr/share/man/man8/pam_limits.8.gz/usr/share/man/man8/pam_listfile.8.gz/usr/share/man/man8/pam_localuser.8.gz/usr/share/man/man8/pam_loginuid.8.gz/usr/share/man/man8/pam_mail.8.gz/usr/share/man/man8/pam_mkhomedir.8.gz/usr/share/man/man8/pam_motd.8.gz/usr/share/man/man8/pam_namespace.8.gz/usr/share/man/man8/pam_nologin.8.gz/usr/share/man/man8/pam_permit.8.gz/usr/share/man/man8/pam_postgresok.8.gz/usr/share/man/man8/pam_pwhistory.8.gz/usr/share/man/man8/pam_rhosts.8.gz/usr/share/man/man8/pam_rootok.8.gz/usr/share/man/man8/pam_securetty.8.gz/usr/share/man/man8/pam_selinux.8.gz/usr/share/man/man8/pam_sepermit.8.gz/usr/share/man/man8/pam_shells.8.gz/usr/share/man/man8/pam_succeed_if.8.gz/usr/share/man/man8/pam_tally2.8.gz

Page 40: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/man/man8/pam_time.8.gz/usr/share/man/man8/pam_timestamp.8.gz/usr/share/man/man8/pam_timestamp_check.8.gz/usr/share/man/man8/pam_tty_audit.8.gz/usr/share/man/man8/pam_umask.8.gz/usr/share/man/man8/pam_unix.8.gz/usr/share/man/man8/pam_userdb.8.gz/usr/share/man/man8/pam_warn.8.gz/usr/share/man/man8/pam_wheel.8.gz/usr/share/man/man8/pam_xauth.8.gz/usr/share/man/man8/unix_chkpwd.8.gz/usr/share/man/man8/unix_update.8.gz/var/log/tallylog/var/run/console/var/run/sepermit

glibc # rpm -qil glibcName : glibc Relocations: (not relocatable)Version : 2.12 Vendor: CentOSRelease : 1.7.el6_0.5 Build Date: Sat 25 Jun 2011 02:40:43 PM CESTInstall Date: Sun 16 Oct 2011 03:59:30 PM CEST Build Host: c6b6.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: glibc-2.12-1.7.el6_0.5.src.rpmSize : 12619595 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+Signature : RSA/8, Wed 06 Jul 2011 03:38:32 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://sources.redhat.com/glibc/Summary : The GNU libc librariesDescription :The glibc package contains standard libraries which are used bymultiple programs on the system. In order to save disk space andmemory, as well as to make upgrading easier, common system code iskept in one place and shared between programs. This particular packagecontains the most important sets of shared libraries: the standard Clibrary and the standard math library. Without these two libraries, aLinux system will not function./etc/gai.conf/etc/ld.so.cache/etc/ld.so.conf/etc/ld.so.conf.d/etc/localtime/etc/nsswitch.conf/etc/rpc/lib64/ld-2.12.so/lib64/ld-linux-x86-64.so.2/lib64/libBrokenLocale-2.12.so/lib64/libBrokenLocale.so.1/lib64/libSegFault.so/lib64/libanl-2.12.so/lib64/libanl.so.1/lib64/libc-2.12.so/lib64/libc.so.6/lib64/libcidn-2.12.so/lib64/libcidn.so.1/lib64/libcrypt-2.12.so/lib64/libcrypt.so.1/lib64/libdl-2.12.so/lib64/libdl.so.2/lib64/libm-2.12.so/lib64/libm.so.6/lib64/libnsl-2.12.so/lib64/libnsl.so.1/lib64/libnss_compat-2.12.so/lib64/libnss_compat.so.2

Page 41: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/lib64/libnss_dns-2.12.so/lib64/libnss_dns.so.2/lib64/libnss_files-2.12.so/lib64/libnss_files.so.2/lib64/libnss_hesiod-2.12.so/lib64/libnss_hesiod.so.2/lib64/libnss_nis-2.12.so/lib64/libnss_nis.so.2/lib64/libnss_nisplus-2.12.so/lib64/libnss_nisplus.so.2/lib64/libpthread-2.12.so/lib64/libpthread.so.0/lib64/libresolv-2.12.so/lib64/libresolv.so.2/lib64/librt-2.12.so/lib64/librt.so.1/lib64/libthread_db-1.0.so/lib64/libthread_db.so.1/lib64/libutil-2.12.so/lib64/libutil.so.1/lib64/rtkaio/lib64/rtkaio/librt.so.1/lib64/rtkaio/librtkaio-2.12.so/sbin/ldconfig/sbin/sln/usr/lib64/gconv/usr/lib64/gconv/ANSI_X3.110.so/usr/lib64/gconv/ARMSCII-8.so/usr/lib64/gconv/ASMO_449.so/usr/lib64/gconv/BIG5.so/usr/lib64/gconv/BIG5HKSCS.so/usr/lib64/gconv/BRF.so/usr/lib64/gconv/CP10007.so/usr/lib64/gconv/CP1125.so/usr/lib64/gconv/CP1250.so/usr/lib64/gconv/CP1251.so/usr/lib64/gconv/CP1252.so/usr/lib64/gconv/CP1253.so/usr/lib64/gconv/CP1254.so/usr/lib64/gconv/CP1255.so/usr/lib64/gconv/CP1256.so/usr/lib64/gconv/CP1257.so/usr/lib64/gconv/CP1258.so/usr/lib64/gconv/CP737.so/usr/lib64/gconv/CP775.so/usr/lib64/gconv/CP932.so/usr/lib64/gconv/CSN_369103.so/usr/lib64/gconv/CWI.so/usr/lib64/gconv/DEC-MCS.so/usr/lib64/gconv/EBCDIC-AT-DE-A.so/usr/lib64/gconv/EBCDIC-AT-DE.so/usr/lib64/gconv/EBCDIC-CA-FR.so/usr/lib64/gconv/EBCDIC-DK-NO-A.so/usr/lib64/gconv/EBCDIC-DK-NO.so/usr/lib64/gconv/EBCDIC-ES-A.so/usr/lib64/gconv/EBCDIC-ES-S.so/usr/lib64/gconv/EBCDIC-ES.so/usr/lib64/gconv/EBCDIC-FI-SE-A.so/usr/lib64/gconv/EBCDIC-FI-SE.so/usr/lib64/gconv/EBCDIC-FR.so/usr/lib64/gconv/EBCDIC-IS-FRISS.so/usr/lib64/gconv/EBCDIC-IT.so/usr/lib64/gconv/EBCDIC-PT.so/usr/lib64/gconv/EBCDIC-UK.so/usr/lib64/gconv/EBCDIC-US.so/usr/lib64/gconv/ECMA-CYRILLIC.so/usr/lib64/gconv/EUC-CN.so/usr/lib64/gconv/EUC-JISX0213.so/usr/lib64/gconv/EUC-JP-MS.so

Page 42: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib64/gconv/EUC-JP.so/usr/lib64/gconv/EUC-KR.so/usr/lib64/gconv/EUC-TW.so/usr/lib64/gconv/GB18030.so/usr/lib64/gconv/GBBIG5.so/usr/lib64/gconv/GBGBK.so/usr/lib64/gconv/GBK.so/usr/lib64/gconv/GEORGIAN-ACADEMY.so/usr/lib64/gconv/GEORGIAN-PS.so/usr/lib64/gconv/GOST_19768-74.so/usr/lib64/gconv/GREEK-CCITT.so/usr/lib64/gconv/GREEK7-OLD.so/usr/lib64/gconv/GREEK7.so/usr/lib64/gconv/HP-GREEK8.so/usr/lib64/gconv/HP-ROMAN8.so/usr/lib64/gconv/HP-ROMAN9.so/usr/lib64/gconv/HP-THAI8.so/usr/lib64/gconv/HP-TURKISH8.so/usr/lib64/gconv/IBM037.so/usr/lib64/gconv/IBM038.so/usr/lib64/gconv/IBM1004.so/usr/lib64/gconv/IBM1008.so/usr/lib64/gconv/IBM1008_420.so/usr/lib64/gconv/IBM1025.so/usr/lib64/gconv/IBM1026.so/usr/lib64/gconv/IBM1046.so/usr/lib64/gconv/IBM1047.so/usr/lib64/gconv/IBM1097.so/usr/lib64/gconv/IBM1112.so/usr/lib64/gconv/IBM1122.so/usr/lib64/gconv/IBM1123.so/usr/lib64/gconv/IBM1124.so/usr/lib64/gconv/IBM1129.so/usr/lib64/gconv/IBM1130.so/usr/lib64/gconv/IBM1132.so/usr/lib64/gconv/IBM1133.so/usr/lib64/gconv/IBM1137.so/usr/lib64/gconv/IBM1140.so/usr/lib64/gconv/IBM1141.so/usr/lib64/gconv/IBM1142.so/usr/lib64/gconv/IBM1143.so/usr/lib64/gconv/IBM1144.so/usr/lib64/gconv/IBM1145.so/usr/lib64/gconv/IBM1146.so/usr/lib64/gconv/IBM1147.so/usr/lib64/gconv/IBM1148.so/usr/lib64/gconv/IBM1149.so/usr/lib64/gconv/IBM1153.so/usr/lib64/gconv/IBM1154.so/usr/lib64/gconv/IBM1155.so/usr/lib64/gconv/IBM1156.so/usr/lib64/gconv/IBM1157.so/usr/lib64/gconv/IBM1158.so/usr/lib64/gconv/IBM1160.so/usr/lib64/gconv/IBM1161.so/usr/lib64/gconv/IBM1162.so/usr/lib64/gconv/IBM1163.so/usr/lib64/gconv/IBM1164.so/usr/lib64/gconv/IBM1166.so/usr/lib64/gconv/IBM1167.so/usr/lib64/gconv/IBM12712.so/usr/lib64/gconv/IBM1364.so/usr/lib64/gconv/IBM1371.so/usr/lib64/gconv/IBM1388.so/usr/lib64/gconv/IBM1390.so/usr/lib64/gconv/IBM1399.so/usr/lib64/gconv/IBM16804.so/usr/lib64/gconv/IBM256.so/usr/lib64/gconv/IBM273.so

Page 43: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib64/gconv/IBM274.so/usr/lib64/gconv/IBM275.so/usr/lib64/gconv/IBM277.so/usr/lib64/gconv/IBM278.so/usr/lib64/gconv/IBM280.so/usr/lib64/gconv/IBM281.so/usr/lib64/gconv/IBM284.so/usr/lib64/gconv/IBM285.so/usr/lib64/gconv/IBM290.so/usr/lib64/gconv/IBM297.so/usr/lib64/gconv/IBM420.so/usr/lib64/gconv/IBM423.so/usr/lib64/gconv/IBM424.so/usr/lib64/gconv/IBM437.so/usr/lib64/gconv/IBM4517.so/usr/lib64/gconv/IBM4899.so/usr/lib64/gconv/IBM4909.so/usr/lib64/gconv/IBM4971.so/usr/lib64/gconv/IBM500.so/usr/lib64/gconv/IBM5347.so/usr/lib64/gconv/IBM803.so/usr/lib64/gconv/IBM850.so/usr/lib64/gconv/IBM851.so/usr/lib64/gconv/IBM852.so/usr/lib64/gconv/IBM855.so/usr/lib64/gconv/IBM856.so/usr/lib64/gconv/IBM857.so/usr/lib64/gconv/IBM860.so/usr/lib64/gconv/IBM861.so/usr/lib64/gconv/IBM862.so/usr/lib64/gconv/IBM863.so/usr/lib64/gconv/IBM864.so/usr/lib64/gconv/IBM865.so/usr/lib64/gconv/IBM866.so/usr/lib64/gconv/IBM866NAV.so/usr/lib64/gconv/IBM868.so/usr/lib64/gconv/IBM869.so/usr/lib64/gconv/IBM870.so/usr/lib64/gconv/IBM871.so/usr/lib64/gconv/IBM874.so/usr/lib64/gconv/IBM875.so/usr/lib64/gconv/IBM880.so/usr/lib64/gconv/IBM891.so/usr/lib64/gconv/IBM901.so/usr/lib64/gconv/IBM902.so/usr/lib64/gconv/IBM903.so/usr/lib64/gconv/IBM9030.so/usr/lib64/gconv/IBM904.so/usr/lib64/gconv/IBM905.so/usr/lib64/gconv/IBM9066.so/usr/lib64/gconv/IBM918.so/usr/lib64/gconv/IBM921.so/usr/lib64/gconv/IBM922.so/usr/lib64/gconv/IBM930.so/usr/lib64/gconv/IBM932.so/usr/lib64/gconv/IBM933.so/usr/lib64/gconv/IBM935.so/usr/lib64/gconv/IBM937.so/usr/lib64/gconv/IBM939.so/usr/lib64/gconv/IBM943.so/usr/lib64/gconv/IBM9448.so/usr/lib64/gconv/IEC_P27-1.so/usr/lib64/gconv/INIS-8.so/usr/lib64/gconv/INIS-CYRILLIC.so/usr/lib64/gconv/INIS.so/usr/lib64/gconv/ISIRI-3342.so/usr/lib64/gconv/ISO-2022-CN-EXT.so/usr/lib64/gconv/ISO-2022-CN.so/usr/lib64/gconv/ISO-2022-JP-3.so

Page 44: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib64/gconv/ISO-2022-JP.so/usr/lib64/gconv/ISO-2022-KR.so/usr/lib64/gconv/ISO-IR-197.so/usr/lib64/gconv/ISO-IR-209.so/usr/lib64/gconv/ISO646.so/usr/lib64/gconv/ISO8859-1.so/usr/lib64/gconv/ISO8859-10.so/usr/lib64/gconv/ISO8859-11.so/usr/lib64/gconv/ISO8859-13.so/usr/lib64/gconv/ISO8859-14.so/usr/lib64/gconv/ISO8859-15.so/usr/lib64/gconv/ISO8859-16.so/usr/lib64/gconv/ISO8859-2.so/usr/lib64/gconv/ISO8859-3.so/usr/lib64/gconv/ISO8859-4.so/usr/lib64/gconv/ISO8859-5.so/usr/lib64/gconv/ISO8859-6.so/usr/lib64/gconv/ISO8859-7.so/usr/lib64/gconv/ISO8859-8.so/usr/lib64/gconv/ISO8859-9.so/usr/lib64/gconv/ISO8859-9E.so/usr/lib64/gconv/ISO_10367-BOX.so/usr/lib64/gconv/ISO_11548-1.so/usr/lib64/gconv/ISO_2033.so/usr/lib64/gconv/ISO_5427-EXT.so/usr/lib64/gconv/ISO_5427.so/usr/lib64/gconv/ISO_5428.so/usr/lib64/gconv/ISO_6937-2.so/usr/lib64/gconv/ISO_6937.so/usr/lib64/gconv/JOHAB.so/usr/lib64/gconv/KOI-8.so/usr/lib64/gconv/KOI8-R.so/usr/lib64/gconv/KOI8-RU.so/usr/lib64/gconv/KOI8-T.so/usr/lib64/gconv/KOI8-U.so/usr/lib64/gconv/LATIN-GREEK-1.so/usr/lib64/gconv/LATIN-GREEK.so/usr/lib64/gconv/MAC-CENTRALEUROPE.so/usr/lib64/gconv/MAC-IS.so/usr/lib64/gconv/MAC-SAMI.so/usr/lib64/gconv/MAC-UK.so/usr/lib64/gconv/MACINTOSH.so/usr/lib64/gconv/MIK.so/usr/lib64/gconv/NATS-DANO.so/usr/lib64/gconv/NATS-SEFI.so/usr/lib64/gconv/PT154.so/usr/lib64/gconv/RK1048.so/usr/lib64/gconv/SAMI-WS2.so/usr/lib64/gconv/SHIFT_JISX0213.so/usr/lib64/gconv/SJIS.so/usr/lib64/gconv/T.61.so/usr/lib64/gconv/TCVN5712-1.so/usr/lib64/gconv/TIS-620.so/usr/lib64/gconv/TSCII.so/usr/lib64/gconv/UHC.so/usr/lib64/gconv/UNICODE.so/usr/lib64/gconv/UTF-16.so/usr/lib64/gconv/UTF-32.so/usr/lib64/gconv/UTF-7.so/usr/lib64/gconv/VISCII.so/usr/lib64/gconv/gconv-modules/usr/lib64/gconv/gconv-modules.cache/usr/lib64/gconv/libCNS.so/usr/lib64/gconv/libGB.so/usr/lib64/gconv/libISOIR165.so/usr/lib64/gconv/libJIS.so/usr/lib64/gconv/libJISX0213.so/usr/lib64/gconv/libKSC.so/usr/libexec/getconf

Page 45: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/libexec/getconf/POSIX_V6_LP64_OFF64/usr/libexec/getconf/POSIX_V7_LP64_OFF64/usr/sbin/glibc_post_upgrade.x86_64/usr/sbin/iconvconfig/usr/sbin/iconvconfig.x86_64/usr/share/doc/glibc-2.12/usr/share/doc/glibc-2.12/BUGS/usr/share/doc/glibc-2.12/CONFORMANCE/usr/share/doc/glibc-2.12/COPYING/usr/share/doc/glibc-2.12/COPYING.LIB/usr/share/doc/glibc-2.12/FAQ/usr/share/doc/glibc-2.12/INSTALL/usr/share/doc/glibc-2.12/LICENSES/usr/share/doc/glibc-2.12/NEWS/usr/share/doc/glibc-2.12/NOTES/usr/share/doc/glibc-2.12/PROJECTS/usr/share/doc/glibc-2.12/README/usr/share/doc/glibc-2.12/README.hesiod/usr/share/doc/glibc-2.12/README.libm/var/cache/ldconfig/var/cache/ldconfig/aux-cache

authconfig # rpm -qil authconfigName : authconfig Relocations: (not relocatable)Version : 6.1.4 Vendor: CentOSRelease : 6.el6 Build Date: Thu 11 Nov 2010 01:40:47 AM CETInstall Date: Sun 16 Oct 2011 02:58:06 PM CEST Build Host: c5b2.bsys.dev.centos.orgGroup : System Environment/Base Source RPM: authconfig-6.1.4-6.el6.src.rpmSize : 1816496 License: GPLv2+Signature : RSA/8, Sun 03 Jul 2011 06:03:13 AM CEST, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : https://fedorahosted.org/authconfigSummary : Command line tool for setting up authentication from network servicesDescription :Authconfig is a command line utility which can configure a workstationto use shadow (more secure) passwords. Authconfig can also configure asystem to be a client for certain networked user information andauthentication schemes./etc/pam.d/fingerprint-auth-ac/etc/pam.d/password-auth-ac/etc/pam.d/smartcard-auth-ac/etc/pam.d/system-auth-ac/etc/sysconfig/authconfig/usr/lib64/python2.6/site-packages/acutilmodule.so/usr/sbin/authconfig/usr/sbin/authconfig-tui/usr/sbin/cacertdir_rehash/usr/share/authconfig/usr/share/authconfig/authconfig-tui.py/usr/share/authconfig/authconfig-tui.pyc/usr/share/authconfig/authconfig-tui.pyo/usr/share/authconfig/authconfig.py/usr/share/authconfig/authconfig.pyc/usr/share/authconfig/authconfig.pyo/usr/share/authconfig/authinfo.py/usr/share/authconfig/authinfo.pyc/usr/share/authconfig/authinfo.pyo/usr/share/authconfig/dnsclient.py/usr/share/authconfig/dnsclient.pyc/usr/share/authconfig/dnsclient.pyo/usr/share/authconfig/msgarea.py/usr/share/authconfig/msgarea.pyc/usr/share/authconfig/msgarea.pyo/usr/share/authconfig/shvfile.py/usr/share/authconfig/shvfile.pyc

Page 46: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/authconfig/shvfile.pyo/usr/share/doc/authconfig-6.1.4/usr/share/doc/authconfig-6.1.4/COPYING/usr/share/doc/authconfig-6.1.4/NOTES/usr/share/doc/authconfig-6.1.4/README.samba3/usr/share/doc/authconfig-6.1.4/TODO/usr/share/locale/ar/LC_MESSAGES/authconfig.mo/usr/share/locale/as/LC_MESSAGES/authconfig.mo/usr/share/locale/bal/LC_MESSAGES/authconfig.mo/usr/share/locale/bg/LC_MESSAGES/authconfig.mo/usr/share/locale/bn/LC_MESSAGES/authconfig.mo/usr/share/locale/bn_IN/LC_MESSAGES/authconfig.mo/usr/share/locale/bs/LC_MESSAGES/authconfig.mo/usr/share/locale/ca/LC_MESSAGES/authconfig.mo/usr/share/locale/cs/LC_MESSAGES/authconfig.mo/usr/share/locale/cy/LC_MESSAGES/authconfig.mo/usr/share/locale/da/LC_MESSAGES/authconfig.mo/usr/share/locale/de/LC_MESSAGES/authconfig.mo/usr/share/locale/el/LC_MESSAGES/authconfig.mo/usr/share/locale/en_GB/LC_MESSAGES/authconfig.mo/usr/share/locale/es/LC_MESSAGES/authconfig.mo/usr/share/locale/et/LC_MESSAGES/authconfig.mo/usr/share/locale/fa/LC_MESSAGES/authconfig.mo/usr/share/locale/fi/LC_MESSAGES/authconfig.mo/usr/share/locale/fr/LC_MESSAGES/authconfig.mo/usr/share/locale/gl/LC_MESSAGES/authconfig.mo/usr/share/locale/gu/LC_MESSAGES/authconfig.mo/usr/share/locale/he/LC_MESSAGES/authconfig.mo/usr/share/locale/hi/LC_MESSAGES/authconfig.mo/usr/share/locale/hr/LC_MESSAGES/authconfig.mo/usr/share/locale/hu/LC_MESSAGES/authconfig.mo/usr/share/locale/hy/LC_MESSAGES/authconfig.mo/usr/share/locale/id/LC_MESSAGES/authconfig.mo/usr/share/locale/is/LC_MESSAGES/authconfig.mo/usr/share/locale/it/LC_MESSAGES/authconfig.mo/usr/share/locale/ja/LC_MESSAGES/authconfig.mo/usr/share/locale/ka/LC_MESSAGES/authconfig.mo/usr/share/locale/kn/LC_MESSAGES/authconfig.mo/usr/share/locale/ko/LC_MESSAGES/authconfig.mo/usr/share/locale/ku/LC_MESSAGES/authconfig.mo/usr/share/locale/lo/LC_MESSAGES/authconfig.mo/usr/share/locale/lv/LC_MESSAGES/authconfig.mo/usr/share/locale/mai/LC_MESSAGES/authconfig.mo/usr/share/locale/mk/LC_MESSAGES/authconfig.mo/usr/share/locale/ml/LC_MESSAGES/authconfig.mo/usr/share/locale/mr/LC_MESSAGES/authconfig.mo/usr/share/locale/ms/LC_MESSAGES/authconfig.mo/usr/share/locale/my/LC_MESSAGES/authconfig.mo/usr/share/locale/nb/LC_MESSAGES/authconfig.mo/usr/share/locale/nl/LC_MESSAGES/authconfig.mo/usr/share/locale/nn/LC_MESSAGES/authconfig.mo/usr/share/locale/or/LC_MESSAGES/authconfig.mo/usr/share/locale/pa/LC_MESSAGES/authconfig.mo/usr/share/locale/pl/LC_MESSAGES/authconfig.mo/usr/share/locale/pt/LC_MESSAGES/authconfig.mo/usr/share/locale/pt_BR/LC_MESSAGES/authconfig.mo/usr/share/locale/ro/LC_MESSAGES/authconfig.mo/usr/share/locale/ru/LC_MESSAGES/authconfig.mo/usr/share/locale/si/LC_MESSAGES/authconfig.mo/usr/share/locale/sk/LC_MESSAGES/authconfig.mo/usr/share/locale/sl/LC_MESSAGES/authconfig.mo/usr/share/locale/sq/LC_MESSAGES/authconfig.mo/usr/share/locale/sr/LC_MESSAGES/authconfig.mo/usr/share/locale/sr@latin/LC_MESSAGES/authconfig.mo/usr/share/locale/sv/LC_MESSAGES/authconfig.mo/usr/share/locale/ta/LC_MESSAGES/authconfig.mo/usr/share/locale/te/LC_MESSAGES/authconfig.mo/usr/share/locale/tg/LC_MESSAGES/authconfig.mo/usr/share/locale/tr/LC_MESSAGES/authconfig.mo

Page 47: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/locale/uk/LC_MESSAGES/authconfig.mo/usr/share/locale/ur/LC_MESSAGES/authconfig.mo/usr/share/locale/vi/LC_MESSAGES/authconfig.mo/usr/share/locale/wa/LC_MESSAGES/authconfig.mo/usr/share/locale/zh_CN/LC_MESSAGES/authconfig.mo/usr/share/locale/zh_TW/LC_MESSAGES/authconfig.mo/usr/share/man/man5/fingerprint-auth-ac.5.gz/usr/share/man/man5/password-auth-ac.5.gz/usr/share/man/man5/smartcard-auth-ac.5.gz/usr/share/man/man5/system-auth-ac.5.gz/usr/share/man/man8/authconfig-tui.8.gz/usr/share/man/man8/authconfig.8.gz/usr/share/man/man8/cacertdir_rehash.8.gz/var/lib/authconfig

Konfiguration

Die Konfiguration unseres Clients nehmen wir am einfachsten mit Hilfe des Programmes authconfig aus dem RPM-Paket authconfig-gtk vor. Hierzu rufen wir authconfig mit den nötigen Optionen für unsere (Test-)Umgebung auf.

disablemd5 MD5 Passworter abschalten passalgo Definition des Passworthash-Algoritmuses enablemkhomedir Homedirectory beim ersten Login eines neuen Users automatisch anlegen enableldap LDAP User Informationen aktivieren enableldapauth LDAP Authentifizierung aktivieren ldapserver LDAP Servername oder URI Definition ldapbasedn LDAP Basde DN Definition update Update der Konfigurationsdateien mit den gesetzten Werten.

Eine ausführliche Beschreibung der optionen erhält man übder die Manpage von authconfig oder beim Aufruf der Option –help.

# authconfig --help

Wir Konfigurieren nun also unsere LDAP-Client-Authentifizierung wie folgt.

# authconfig --disablemd5 --passalgo=sha256 --enablemkhomedir --enableldap --enableldapauth --ldapserver=ldap.dmz.nausch.org --ldapbasedn="dc=nausch,dc=org" --update nslcd starten: [ OK ] oddjobd starten: [ OK ]

Die einzelnen Konfigurationsdateien, die mit dem vorgenannten Programmaufruf angepasst wurden, werden wir uns im Detail betrachten, ggf. anpassen und mit Bearbeitungsvermerken versehen, damit wir später noch nachvollziehen können, welche Änderungen im Detail notwendig waren um die LDAP Client Authentifizierung aktiviert werden konnte.

Zur Dokumentation und ggf. spätere weitere Dokumentationsschritte versehen wir optional alle Änderungen mit einem Kommntar, ala: # Django : Datum [optionaler Grund].

authconfig

In der Konfigurationsdatei /etc/sysconfig/authconfig setzen wir die beiden folgenden Werte von no auf yes:

USELDAP=yes (LDAP-Authentifizierung aktivieren.) FORCELEGACY=yes (CentOS 6 nutzt standardmäßig TLS für die LDAP-Authentifizierung. Mit diesem Schalter wird diese Voreinstellung deaktiviert und die die unverschlüsselte Kommunikation mit dem LDAP-Server erzwungen.)

Page 48: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/sysconfig/authconfig/etc/sysconfig/authconfig

USEMKHOMEDIR=noUSEPAMACCESS=noCACHECREDENTIALS=yesUSESSSDAUTH=noUSESHADOW=yesUSEWINBIND=noUSEDB=noFORCELEGACY=yesUSEFPRINTD=yesFORCESMARTCARD=noPASSWDALGORITHM=sha512USELDAPAUTH=noUSEPASSWDQC=noUSELOCAUTHORIZE=yesUSECRACKLIB=yesUSEWINBINDAUTH=noUSESMARTCARD=noUSELDAP=yesUSENIS=noUSEKERBEROS=noUSESYSNETAUTH=noUSESMBAUTH=noUSESSSD=noUSEHESIOD=no

ldap.conf

In der Konfigurationsdatei /etc/openldap/ldap.conf tragen wir folgende Daten nach:

BASE dc=nausch, dc=org URI ldap://ldap.dmz.nausch.org TLS_CACERTDIR /etc/openldap/cacerts

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/openldap/ldap.conf/etc/openldap/ldap.conf

## LDAP Defaults# # See ldap.conf(5) for details# This file should be world readable but not world writable. #BASE dc=example, dc=com#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 #SIZELIMIT 12#TIMELIMIT 15#DEREF never # Django : 2011-10-28 LDAP Client AuthenticationBASE dc=nausch, dc=orgURI ldap://ldap.dmz.nausch.orgTLS_CACERTDIR /etc/openldap/cacerts

pam_ldap.conf

In der Konfigurationsdatei /etc/pam_ldap.conf tragen wir folgende Daten nach:

Page 49: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

base dc=nausch,dc=org uri ldap://ldap.dmz.nausch.org ssl no tls_cacertdir /etc/openldap/cacerts pam_password sha512

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam_ldap.conf/etc/pam_ldap.conf

# @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $## This is the configuration file for the LDAP nameservice# switch library and the LDAP PAM module.## The man page for this file is pam_ldap(5)## PADL Software# http://www.padl.com# # Your LDAP server. Must be resolvable without using LDAP.# Multiple hosts may be specified, each separated by a # space. How long nss_ldap takes to failover depends on# whether your LDAP client library supports configurable# network or connect timeouts (see bind_timelimit). # Django : 2011-10-28 LDAP Client-Authentication# default : host 127.0.0.1 # The distinguished name of the search base.# Django : 2011-10-28 LDAP Client-Authentication# base dc=example,dc=combase dc=nausch,dc=org # Another way to specify your LDAP server is to provide an# uri with the server name. This allows to use# Unix Domain Sockets to connect to a local LDAP Server.#uri ldap://127.0.0.1/#uri ldaps://127.0.0.1/ #uri ldapi://%2fvar%2frun%2fldapi_sock/# Note: %2f encodes the '/' used as directory separator # The LDAP version to use (defaults to 3# if supported by client library)#ldap_version 3 # The distinguished name to bind to the server with.# Optional: default is to bind anonymously.#binddn cn=proxyuser,dc=example,dc=com # The credentials to bind with. # Optional: default is no credential.#bindpw secret # The distinguished name to bind to the server with# if the effective user ID is root. Password is# stored in /etc/ldap.secret (mode 600)#rootbinddn cn=manager,dc=example,dc=com # The port.# Optional: default is 389.#port 389 # The search scope.#scope sub

Page 50: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#scope one#scope base # Search timelimit#timelimit 30 # Bind/connect timelimit#bind_timelimit 30 # Reconnect policy: hard (default) will retry connecting to# the software with exponential backoff, soft will fail# immediately.#bind_policy hard # Idle timelimit; client will close connections# (nss_ldap only) if the server has not been contacted# for the number of seconds specified below.#idle_timelimit 3600 # Filter to AND with uid=%s#pam_filter objectclass=account # The user ID attribute (defaults to uid)#pam_login_attribute uid # Search the root DSE for the password policy (works# with Netscape Directory Server)#pam_lookup_policy yes # Check the 'host' attribute for access control# Default is no; if set to yes, and user has no# value for the host attribute, and pam_ldap is# configured for account management (authorization)# then the user will not be allowed to login.#pam_check_host_attr yes # Check the 'authorizedService' attribute for access# control# Default is no; if set to yes, and the user has no# value for the authorizedService attribute, and# pam_ldap is configured for account management# (authorization) then the user will not be allowed# to login.#pam_check_service_attr yes # Group to enforce membership of#pam_groupdn cn=PAM,ou=Groups,dc=example,dc=com # Group member attribute#pam_member_attribute uniquemember # Specify a minium or maximum UID number allowed#pam_min_uid 0#pam_max_uid 0 # Template login attribute, default template user# (can be overriden by value of former attribute# in user's entry)#pam_login_attribute userPrincipalName#pam_template_login_attribute uid#pam_template_login nobody # HEADS UP: the pam_crypt, pam_nds_passwd,# and pam_ad_passwd options are no# longer supported.## Do not hash the password at all; presume# the directory server will do it, if# necessary. This is the default.

Page 51: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#pam_password clear # Hash password locally; required for University of# Michigan LDAP server, and works with Netscape# Directory Server if you're using the UNIX-Crypt# hash mechanism and not using the NT Synchronization# service. #pam_password crypt # Remove old password first, then update in# cleartext. Necessary for use with Novell# Directory Services (NDS)#pam_password clear_remove_old#pam_password nds # RACF is an alias for the above. For use with# IBM RACF#pam_password racf # Update Active Directory password, by# creating Unicode password and updating# unicodePwd attribute.#pam_password ad # Use the OpenLDAP password change# extended operation to update the password.#pam_password exop # Redirect users to a URL or somesuch on password# changes.#pam_password_prohibit_message Please visit http://internal to change your password. # RFC2307bis naming contexts# Syntax:# nss_base_XXX base?scope?filter# where scope is {base,one,sub}# and filter is a filter to be &'d with the# default filter.# You can omit the suffix eg:# nss_base_passwd ou=People,# to append the default base DN but this# may incur a small performance impact.#nss_base_passwd ou=People,dc=example,dc=com?one#nss_base_shadow ou=People,dc=example,dc=com?one#nss_base_group ou=Group,dc=example,dc=com?one#nss_base_hosts ou=Hosts,dc=example,dc=com?one#nss_base_services ou=Services,dc=example,dc=com?one#nss_base_networks ou=Networks,dc=example,dc=com?one#nss_base_protocols ou=Protocols,dc=example,dc=com?one#nss_base_rpc ou=Rpc,dc=example,dc=com?one#nss_base_ethers ou=Ethers,dc=example,dc=com?one#nss_base_netmasks ou=Networks,dc=example,dc=com?ne#nss_base_bootparams ou=Ethers,dc=example,dc=com?one#nss_base_aliases ou=Aliases,dc=example,dc=com?one#nss_base_netgroup ou=Netgroup,dc=example,dc=com?one # attribute/objectclass mapping# Syntax:#nss_map_attribute rfc2307attribute mapped_attribute#nss_map_objectclass rfc2307objectclass mapped_objectclass # configure --enable-nds is no longer supported.# NDS mappings#nss_map_attribute uniqueMember member # Services for UNIX 3.5 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount User#nss_map_attribute uid msSFU30Name

Page 52: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#nss_map_attribute uniqueMember msSFU30PosixMember#nss_map_attribute userPassword msSFU30Password#nss_map_attribute homeDirectory msSFU30HomeDirectory#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_objectclass posixGroup Group#pam_login_attribute msSFU30Name#pam_filter objectclass=User#pam_password ad # configure --enable-mssfu-schema is no longer supported.# Services for UNIX 2.0 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount user#nss_map_attribute uid msSFUName#nss_map_attribute uniqueMember posixMember#nss_map_attribute userPassword msSFUPassword#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup Group#nss_map_attribute cn msSFUName#pam_login_attribute msSFUName#pam_filter objectclass=User#pam_password ad # RFC 2307 (AD) mappings#nss_map_objectclass posixAccount user#nss_map_objectclass shadowAccount user#nss_map_attribute uid sAMAccountName#nss_map_attribute homeDirectory unixHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup group#nss_map_attribute uniqueMember member#pam_login_attribute sAMAccountName#pam_filter objectclass=User#pam_password ad # configure --enable-authpassword is no longer supported# AuthPassword mappings#nss_map_attribute userPassword authPassword # AIX SecureWay mappings#nss_map_objectclass posixAccount aixAccount#nss_base_passwd ou=aixaccount,?one#nss_map_attribute uid userName#nss_map_attribute gidNumber gid#nss_map_attribute uidNumber uid#nss_map_attribute userPassword passwordChar#nss_map_objectclass posixGroup aixAccessGroup#nss_base_group ou=aixgroup,?one#nss_map_attribute cn groupName#nss_map_attribute uniqueMember member#pam_login_attribute userName#pam_filter objectclass=aixAccount#pam_password clear # Netscape SDK LDAPS#ssl on # Netscape SDK SSL options#sslpath /etc/ssl/certs # OpenLDAP SSL mechanism# start_tls mechanism uses the normal LDAP port, LDAPS typically 636#ssl start_tls#ssl on # OpenLDAP SSL options# Require and verify server certificate (yes/no)# Default is to use libldap's default behavior, which can be configured in

Page 53: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# /etc/openldap/ldap.conf using the TLS_REQCERT setting. The default for# OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".#tls_checkpeer yes # CA certificates for server certificate verification# At least one of these are required if tls_checkpeer is "yes"#tls_cacertfile /etc/ssl/ca.cert#tls_cacertdir /etc/ssl/certs # Seed the PRNG if /dev/urandom is not provided#tls_randfile /var/run/egd-pool # SSL cipher suite# See man ciphers for syntax#tls_ciphers TLSv1 # Client certificate and key# Use these, if your server requires client authentication.#tls_cert#tls_key # Disable SASL security layers. This is needed for AD.#sasl_secprops maxssf=0 # Override the default Kerberos ticket cache location.#krb5_ccname FILE:/etc/.ldapcache # SASL mechanism for PAM authentication - use is experimental# at present and does not support password policy control#pam_sasl_mech DIGEST-MD5 # Django : 2011-10-28 LDAP Client-Authentication, automatisch eingetragen mit Hilfe von authconfiguri ldap://ldap.dmz.nausch.orgssl notls_cacertdir /etc/openldap/cacertspam_password sha256

nslcd.conf

In der Konfigurationsdatei /etc/nslcd.conf tragen wir folgende Daten nach:

uri ldap://ldap.dmz.nausch.org base dc=nausch,dc=org ssl no

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/nslcd.conf/etc/nslcd.conf

# This is the configuration file for the LDAP nameservice# switch library's nslcd daemon. It configures the mapping# between NSS names (see /etc/nsswitch.conf) and LDAP# information in the directory.# See the manual page nslcd.conf(5) for more information. # The uri pointing to the LDAP server to use for name lookups.# Multiple entries may be specified. The address that is used# here should be resolvable without using LDAP (obviously).#uri ldap://127.0.0.1/#uri ldaps://127.0.0.1/#uri ldapi://%2fvar%2frun%2fldapi_sock/# Note: %2f encodes the '/' used as directory separator# uri ldap://127.0.0.1/ 

Page 54: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# The LDAP version to use (defaults to 3# if supported by client library)#ldap_version 3 # The distinguished name of the search base.# base dc=example,dc=com # The distinguished name to bind to the server with.# Optional: default is to bind anonymously.#binddn cn=proxyuser,dc=example,dc=com # The credentials to bind with.# Optional: default is no credentials.# Note that if you set a bindpw you should check the permissions of this file.#bindpw secret # The distinguished name to perform password modifications by root by.#rootpwmoddn cn=admin,dc=example,dc=com # The default search scope.#scope sub#scope one#scope base # Customize certain database lookups.#base group ou=Groups,dc=example,dc=com#base passwd ou=People,dc=example,dc=com#base shadow ou=People,dc=example,dc=com#scope group onelevel#scope hosts sub # Bind/connect timelimit.#bind_timelimit 30 # Search timelimit.#timelimit 30 # Idle timelimit. nslcd will close connections if the# server has not been contacted for the number of seconds.#idle_timelimit 3600 # Use StartTLS without verifying the server certificate.#ssl start_tls#tls_reqcert never # CA certificates for server certificate verification#tls_cacertdir /etc/ssl/certs#tls_cacertfile /etc/ssl/ca.cert # Seed the PRNG if /dev/urandom is not provided#tls_randfile /var/run/egd-pool # SSL cipher suite# See man ciphers for syntax#tls_ciphers TLSv1 # Client certificate and key# Use these, if your server requires client authentication.#tls_cert#tls_key # NDS mappings#map group uniqueMember member # Mappings for Services for UNIX 3.5#filter passwd (objectClass=User)#map passwd uid msSFU30Name#map passwd userPassword msSFU30Password#map passwd homeDirectory msSFU30HomeDirectory

Page 55: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#map passwd homeDirectory msSFUHomeDirectory#filter shadow (objectClass=User)#map shadow uid msSFU30Name#map shadow userPassword msSFU30Password#filter group (objectClass=Group)#map group uniqueMember msSFU30PosixMember # Mappings for Services for UNIX 2.0#filter passwd (objectClass=User)#map passwd uid msSFUName#map passwd userPassword msSFUPassword#map passwd homeDirectory msSFUHomeDirectory#map passwd gecos msSFUName#filter shadow (objectClass=User)#map shadow uid msSFUName#map shadow userPassword msSFUPassword#map shadow shadowLastChange pwdLastSet#filter group (objectClass=Group)#map group uniqueMember posixMember # Mappings for Active Directory#pagesize 1000#referrals off#filter passwd (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))#map passwd uid sAMAccountName#map passwd homeDirectory unixHomeDirectory#map passwd gecos displayName#filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))#map shadow uid sAMAccountName#map shadow shadowLastChange pwdLastSet#filter group (objectClass=group)#map group uniqueMember member # Mappings for AIX SecureWay#filter passwd (objectClass=aixAccount)#map passwd uid userName#map passwd userPassword passwordChar#map passwd uidNumber uid#map passwd gidNumber gid#filter group (objectClass=aixAccessGroup)#map group cn groupName#map group uniqueMember member#map group gidNumber giduid nslcdgid ldap# This comment prevents repeated auto-migration of settings.# Django : 2011-10-28 LDAP Client Authentication, angefügt durch den Aufruf von authconfiguri ldap://ldap.dmz.nausch.org/base dc=nausch,dc=orgssl notls_cacertdir /etc/openldap/cacerts

nsswitch.conf

In der Konfigurationsdatei /etc/pam.d/system-auth tragen wir folgende Daten nach:

passwd: files ldap shadow: files ldap group: files ldap

netgroup: ldap

automount: files ldap

Page 56: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/nsswitch.conf/etc/nsswitch.conf

## /etc/nsswitch.conf## An example Name Service Switch config file. This file should be# sorted with the most-used services at the beginning.## The entry '[NOTFOUND=return]' means that the search for an# entry should stop if the search in the previous entry turned# up nothing. Note that if the search failed due to some other reason# (like no NIS server responding) then the search continues with the# next entry.## Valid entries include:## nisplus Use NIS+ (NIS version 3)# nis Use NIS (NIS version 2), also called YP# dns Use DNS (Domain Name Service)# files Use the local files# db Use the local database (.db) files# compat Use NIS on compat mode# hesiod Use Hesiod for user lookups# [NOTFOUND=return] Stop searching if not found so far# # To use db, put the "db" in front of "files" for entries you want to be# looked up first in the databases## Example:#passwd: db files nisplus nis#shadow: db files nisplus nis#group: db files nisplus nis # Django : 2011-10-28 LDAP Client Authentication# default# passwd: files# shadow: files# group: filespasswd: files ldapshadow: files ldapgroup: files ldap #hosts: db files nisplus nis dnshosts: files dns # Example - obey only what nisplus tells us...#services: nisplus [NOTFOUND=return] files#networks: nisplus [NOTFOUND=return] files#protocols: nisplus [NOTFOUND=return] files#rpc: nisplus [NOTFOUND=return] files#ethers: nisplus [NOTFOUND=return] files#netmasks: nisplus [NOTFOUND=return] files  bootparams: nisplus [NOTFOUND=return] files ethers: filesnetmasks: filesnetworks: filesprotocols: filesrpc: filesservices: files # Django : 2011-10-28 LDAP Client Authentication# default

Page 57: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# netgroup: nisplusnetgroup: ldap publickey: nisplus # Django : 2011-10-28 LDAP Client Authentication# default# automount: files nisplusautomount: files ldapaliases: files nisplus

system-auth

Durch den Aufruf des Programmes authconfig wurden die folgenden pam.d-Konfigurationsdateien angepasst:

/etc/pam.d/fingerprint-auth /etc/pam.d/password-auth /etc/pam.d/smartcard-auth /etc/pam.d/smtp /etc/pam.d/system-auth

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam.d/fingerprint-auth/etc/pam.d/fingerprint-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/password-auth/etc/pam.d/password-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so

Page 58: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smartcard-auth/etc/pam.d/smartcard-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_onlyauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_pkcs11.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smtp/etc/pam.d/smtp

#%PAM-1.0auth include password-authaccount include password-auth # vim /etc/pam.d/system-auth/etc/pam.d/system-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so

Page 59: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so

automatischer Systemstart des nslc-Dämon

Damit nun beim nächsten Start des Systems der notwendige naming services LDAP client daemon kurz nslcd mit gestartet wird, versetzen wir das Startscript in den Modus “on“.

# chkconfig nslcd on

Den Status überprüfen wir bei Bedarf mittels:

# chkconfig --list | grep nslcd nslcd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Zum Abschluss unserer Konfiguration starten wir nun unseren CentOS 6 Client einmal durch.

# reboot

Test

LDAP Abfrage

Zur Abfrage eines LDAP-Users können wir folgenden Aufruf verwenden:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=bigchief"dn: uid=bigchief,ou=People,dc=nausch,dc=orguid: bigchiefcn: BigChiefobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountshadowLastChange: 15274shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 501gidNumber: 501homeDirectory: /home/bigchiefgecos: BigChief

LDAP-Abfrage mit dem User Django aber mit falschem Passwort:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "uid=django,ou=People,dc=nausch,dc=org"Enter LDAP Password: ldap_bind: Invalid credentials (49)

LDAP-Abfrage mit dem User Django aber mit richtigem Passwort:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "uid=django,ou=People,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: django

Page 60: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

cn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JENna3VQVFplJDRiT2wvR2dSMUg4OWlxQjRtaU4yYVN5VndHUWE 2SVlum31nScH3fFiSt31nV0lLd3pPzlxd2tFYWJQdTZUL1BITWNXcWFLbW9KUnd6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

Clienttest

Die erfolgreiche Konfiguration unseres Rechners überprüfen wir so:

1. Mit getent lassen wir uns die Informationen eines Users anzeigen, der sowohl in der /etc/shadow wie auch im zentralen LDAP-Verzeichnisdienst hinterlegt ist. Wenn alles gut gelaufen ist, werden uns zwei Einträge präsentiert. 2. $ getent passwd | grep django3. django:x:500:500::/home/django:/bin/bashdjango:x:500:500:Django:/home/django:/bin/bash

4. Als nächstes wählen wir einen Nutzer der nur im LDAP-Verzeichnisdienst einen Account hat, nicht aber auf der lokalen Maschine. 5. $ getent passwd | grep bigchiefbigchief:x:501:501:BigChief:/home/bigchief:/bin/bash

6. Dann melden wir uns nun an unserem Client als ein Benutzer an, der lokal auf der Maschine nicht existiert, werden wir beim Login nach dem Passwort gefragt, welches gegen den zentralen OpenLDAP-Server verifiziert wird. Ist das Passwort richtig wird auch gleich das zugehörige Nutzer-Homeverzeichnis angelegt. 7. [django@vml010008 ~]$ su - bigchief8. Password: 9. Creating directory '/home/bigchief'.[bigchief@vml010008 ~]$

Page 62: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Konfiguration auf Clientseite zur Client-Authentification mit technischem User

Als Erweiterung zu unserem ersten Test wollen wir nun keine anonymen LDAP Abfragen zulassen, sondern hierzu einen speziellen technischen User verwenden.

In abgesicherten Umgebungen wird der Zugriff auf den LDAP-Server nicht von jedermann ohne Passwort, auch anonymous bind genannt unterbunden. Stattdessen muss ich der Klient bei den Anfragen eines technischen Users bedienen, der auch ein Passwort benutzt, welches dem LDAP-Server bekannt ist.

Auch hier wollen wir bei den betreffenden Clients die Authentifizierung der einzelnen User nicht mehr gegen die lokale /etc/shadow laufen lassen. Auch bei diesem Anwendungsfall werden wir bei der Realisierung keinen System Security Services Daemon sssd einsetzen. Auf diesen werden wir noch in einem separatem Kapitel detailliert eingehen.

technischer User für LDAP-Server-Zugriff

Bei unserem Anwendungsbeispiel gehen wir von einem bereits installiertem und konfiguriertem OpenLDAP-Server aus, wie im Kapitel Grundinstallation des OpenLDAP Servers und Datenerstbefüllung des OpenLDAP Servers aus.

Konfiguration

Im ersten Schritt werden wir uns nun einen eigenen speziellen technischen User anlegen, mit dem später die Anfragen an unseren OpenLDAp-Server gerichtet werden sollen.

Der Einfachheit halber wollen wir hierzu folgenden User in unserem DIT1) hinterlegen:

cn=Technischeruser,dc=nausch,dc=org

Unser User benötigt natürlich auch ein entsprechendes Passwort, welches wir nun wir folgt anlegen.

# slappasswd -h {SSHA} New password: Re-enter new password: {SSHA}YpKKoS1lV1AdAX1StGe1lTembvZW4XagnkLdWZ2Y4Xkw

Im nächsten Schritt legen wir uns eine Konfigurationsdatei im *.LDIF-Format an, die Die Definition unseres speziellen Users beinhaltet. Wir legen also im Verzeichnis /etc/openldap/ldif/ die Datei technischeruser.ldif an.

# vim /etc/openldap/ldif/technischeruser.ldif/etc/openldap/ldif/technischeruser.ldif

dn: cn=Technischeruser,dc=nausch,dc=orgcn: TechnischeruserobjectClass: organizationalRoleobjectClass: simpleSecurityObjectobjectClass: topuserPassword: {SSHA}YpKKoS1lV1AdAX1StGe1lTembvZW4XagnkLdWZ2Y4Xkw

Page 63: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Bevor wir nun die Daten aus der LDIF-Datei /etc/openldap/ldif/technischeruser.ldif in den DIT2) importieren können, stoppen wir kurz den OpenLDAP-Server.

# service slapd stop Stopping slapd: [ OK ]

Mit folgendem Befehl importieren wir nun die Daten aus der LDIF-Datei in den DIT.

# slapadd -v -l /etc/openldap/ldif/technischeruser.ldif added: "cn=Technischeruser,dc=nausch,dc=org" (00000009) _#################### 100.00% eta none elapsed none fast! Closing DB...

Anschließend vergessen wir nicht unseren OpenLDAP-Server wieder zu staren!

# service slapd start Stopping slapd: [ OK ]

Abfragetest

Wir können nun unsere Konfiguration überprüfen und eine ÖLDAP-Abfrage mit unserem gerade angelegtem Technischenuser und seinem zugehörigen Passwort testen.

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "cn=Technischeruser" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: cn=Technischeruser,dc=nausch,dc=orgcn: TechnischeruserobjectClass: organizationalRoleobjectClass: simpleSecurityObjectobjectClass: topuserPassword:: YpKKoS1lV1AdAX1StGe1lTembvZW4XagnkLdWZ2Y4Xkwa3c=

Deaktivierung des "Anonymous bind" beim LDAP-Server-Zugriff

In unserer abgesicherten Umgebung sollen ausschließlich authentifizierte Abfragen und Zugriffe auf unseren OpenLADP-Server gestattet sein. Hierzu haben wir uns im vorherigem Abschnitt eigens einen technischen Useraccount angelegt.

Konfiguration

Zur Deaktivierung werden wir nun unsere zentrale Konfiguration im OpenLDAP-Server anpassen.

Zum besseren Verständnis fragen wir erst eiunmal die aktuelle Konfiguration ab.

# ldapsearch -W -x -D cn=config -b cn=config "(objectclass=olcGlobal)"Enter LDAP Password: # extended LDIF## LDAPv3# base <cn=config> with scope subtree# filter: (objectclass=olcGlobal)# requesting: ALL# # configdn: cn=configobjectClass: olcGlobalcn: configolcConfigFile: /etc/openldap/slapd.confolcConfigDir: /etc/openldap/slapd.dolcAllows: bind_v2olcArgsFile: /var/run/openldap/slapd.args

Page 64: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

olcAttributeOptions: lang-olcAuthzPolicy: noneolcConcurrency: 0olcConnMaxPending: 100olcConnMaxPendingAuth: 1000olcGentleHUP: FALSEolcIdleTimeout: 15olcIndexSubstrIfMaxLen: 4olcIndexSubstrIfMinLen: 2olcIndexSubstrAnyLen: 4olcIndexSubstrAnyStep: 2olcIndexIntLen: 4olcLocalSSF: 71olcLogLevel: StatsolcPidFile: /var/run/openldap/slapd.pidolcReadOnly: FALSEolcReferral: ldap://ldap.dmz.nausch.orgolcReverseLookup: FALSEolcSaslSecProps: noplain,noanonymousolcSockbufMaxIncoming: 262143olcSockbufMaxIncomingAuth: 16777215olcThreads: 16olcTLSCRLCheck: noneolcTLSVerifyClient: neverolcToolThreads: 1olcWriteTimeout: 0 # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Die Änderung an diesewr Konfiguration nehmen wir nun nicht an Hand einer Änderung einer zentralen Konfigurationsdatei vor, wie wir dies unter Umstaänden von früheren Installationen unter CentOS 5 gewohnt waren.

Die Änderungen erfolgen mit Hilfe eines *.LDIF-Datei. Wir legen uns also diese im gewohnten Verzeichnis /etc/openldap/ldif/ an und wählen hierzu z.B. als Dateinamen disallow_anonymous_bind.ldif.

# vim /etc/openldap/ldif/disallow_anonymous_bind.ldif/etc/openldap/ldif/disallow_anonymous_bind.ldif

dn: cn=configchangetype: modifyadd: olcDisallowsolcDisallows: bind_anon-add: olcRequiresolcRequires: authc

Zur Übernahme der Änderungen in den laufenden OpenLDAP-Server slapd, die wir gerade in der LDIP-Datei definiert haben, benutzen wir den Befehl ldapmodify

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/disallow_anonymous_bind.ldif Enter LDAP Password: modifying entry "cn=config"

Fragen wir nun erneiut die Konfiguration unseres slapd ab, so finden wir am Ende die erfolgte Änderung aus unserer ldif-Datei:

olcDisallows: bind_anon

Page 65: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

olcRequires: authc

# ldapsearch -W -x -D cn=config -b cn=config "(objectclass=olcGlobal)"Enter LDAP Password: # extended LDIF## LDAPv3# base <cn=config> with scope subtree# filter: (objectclass=olcGlobal)# requesting: ALL# # configdn: cn=configobjectClass: olcGlobalcn: configolcConfigFile: /etc/openldap/slapd.confolcConfigDir: /etc/openldap/slapd.dolcAllows: bind_v2olcArgsFile: /var/run/openldap/slapd.argsolcAttributeOptions: lang-olcAuthzPolicy: noneolcConcurrency: 0olcConnMaxPending: 100olcConnMaxPendingAuth: 1000olcGentleHUP: FALSEolcIdleTimeout: 15olcIndexSubstrIfMaxLen: 4olcIndexSubstrIfMinLen: 2olcIndexSubstrAnyLen: 4olcIndexSubstrAnyStep: 2olcIndexIntLen: 4olcLocalSSF: 71olcLogLevel: StatsolcPidFile: /var/run/openldap/slapd.pidolcReadOnly: FALSEolcReferral: ldap://ldap.dmz.nausch.orgolcReverseLookup: FALSEolcSaslSecProps: noplain,noanonymousolcSockbufMaxIncoming: 262143olcSockbufMaxIncomingAuth: 16777215olcThreads: 16olcTLSCRLCheck: noneolcTLSVerifyClient: neverolcToolThreads: 1olcWriteTimeout: 0olcDisallows: bind_anonolcRequires: authc # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Abfragetest

Versuchen wir nun eine anonymous-bind Abfrage gegen unseren OpenLDAP-Server hat dies keinen Erfolg und wir bekommen einen entsprechenden Warnhinweis.

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" ldap_bind: Inappropriate authentication (48) additional info: anonymous bind disallowed

Die Abfrage unseres Nutzers Django erfolgt nun richtiger Wiese mit Hilfe unseres technischen Users Technischeruser den wir uns hierzu eigens konfiguration angelegt haben.

Page 66: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

Zugriffsrechte beschränken

Mit Hilfe des nachfolgenden Befehls kann kontrolliert werden, welche Zugriffsrechte in den aktuell enthaltenen Benutzerstrukturen im DIT3) enthaltenn sind. Somit kann man sich einen Überblick verschaffen, welche Anpassungen ggf. im DIT noch vorzunehmen sind.

# ldapsearch -W -x -D cn=config -b olcDatabase={-1}frontend,cn=configEnter LDAP Password:# extended LDIF## LDAPv3# base <olcDatabase={-1}frontend,cn=config> with scope subtree# filter: (objectclass=*)# requesting: ALL# # {-1}frontend, configdn: olcDatabase={-1}frontend,cn=configolcPasswordHash: {SSHA}objectClass: olcDatabaseConfigobjectClass: olcFrontendConfigolcDatabase: {-1}frontendolcAccess: {0}to attrs=userPassword by self write by dn.base="cn=manager,dc=nausch,dc=org" write by anonymous auth by * noneolcAccess: {1}to * by self write by dn.base="cn=manager,dc=nausch,dc=org" write by * readolcAddContentAcl: FALSEolcLastMod: TRUEolcMaxDerefDepth: 0olcReadOnly: FALSEolcSchemaDN: cn=SubschemaolcMonitoring: FALSE # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Die beiden Zeilen mit dem vorangestelltem olcAccess wollen wir uns kurz genauer ansehen.

Die vorangestellten Zeilen haben folgende Bedeutung:

userPasswordo kann nur vom „Eigentümer selbst“ geschrieben,

Page 67: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

o oder von „dn.base=„cn=manager,dc=nausch,dc=org“ geschrieben,o oder von „anonymous“ authentifizierend zugegriffen,o und von allen anderen kann kein Zugriff durchgeführt werden. * (auf den gesamten Baum)o kann nur vom „Eigentümer selbst“ geschrieben,o oder von „dn.base=„cn=manager,dc=nausch,dc=org“ geschrieben,o oder von allen anderen lesender Zugriff durchgeführt werden.

Zur Änderung dieser bereits vorhandenen Zugriffsberechtigungen muß erst die vorhandene aktuelle ACL-Konfiguration gelöscht und anschließend die künftige ACL-Konfiguration neu angelegt werden.

Konfiguration

Da wir uns bei der Installation und Konfiguration unseres OpenLDAP-Servers entschieden hatten, die komplette Konfiguration via .LDIF-Dateien zu erledigen, dürfen wir keinenfalls versuchen, Änderungen an den Dateien unterhalb /etc/openldap/ vorzunehmen!

Vielmehr legen wir uns zwei .ldif-Dateien an, mit Hilfe derer wir die Anpassung der Benutzerrechte anpassen.

1. Löschen der aktuellen ACL-Konfiguration:

# vim /etc/openldap/ldif/frontend_acl_delete.ldif/etc/openldap/ldif/frontend_acl_delete.ldif

dn: olcDatabase={-1}frontend,cn=configdelete: olcAccessolcAccess: to attrs=userPassword by self write by dn.base="cn=manager,dc=nausch,dc=org" write by anonymous auth by * noneolcAccess: to * by self write by dn.base="cn=manager,dc=nausch,dc=org" write by * read

2. Neuanlage der zukünftigen ACL-Konfiguration:

# vim /etc/openldap/ldif/frontend_acl_update.ldif/etc/openldap/ldif/frontend_acl_update.ldif

dn: olcDatabase={-1}frontend,cn=configadd: olcAccessolcAccess: to attrs=userPassword,shadowLastChange,shadowMax,shadowWarning by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by anonymous auth by * noneolcAccess: to dn="cn=Manager,dc=nausch,dc=org" by self write by * noneolcAccess: to dn="cn=Technischeruser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * noneolcAccess: to dn.regex="cn=([^,]+),ou=Group,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: to dn.regex="uid=([^,]+),ou=People,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: to * by self write by dn.base="cn=manager,dc=nausch,dc=org" write by * read

Anschließend laden wir die beiden .LDIF-Dateien in den OpenLDAP-Server und löschen die bestehenden Zugriffsregelungen und tragen unsere neuen ein.

1. Löschen der aktuellen ACL-Konfiguration:

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/frontend_acl_delete.ldifEnter LDAP Password:

Page 68: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

modifying entry "olcDatabase={-1}frontend,cn=config"

2. Neuanlage der neuen ACL-Konfiguration:

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/frontend_acl_update.ldifEnter LDAP Password: modifying entry "olcDatabase={-1}frontend,cn=config"

Ob nun unsere Änderungen in den laufenden slampd-Prozess übernommen wurden überprüfen wir am einfachsten mit dem nachfolgenden Aufruf, der die gesamten Zugriffsrechte in den aktuell enthaltenen Benutzerstrukturen im DIT4) enthalten sind.

# ldapsearch -W -x -D cn=config -b olcDatabase={-1}frontend,cn=configEnter LDAP Password: # extended LDIF## LDAPv3# base <olcDatabase={-1}frontend,cn=config> with scope subtree# filter: (objectclass=*)# requesting: ALL# # {-1}frontend, configdn: olcDatabase={-1}frontend,cn=configolcPasswordHash: {SSHA}objectClass: olcDatabaseConfigobjectClass: olcFrontendConfigolcDatabase: {-1}frontendolcAddContentAcl: FALSEolcLastMod: TRUEolcMaxDerefDepth: 0olcReadOnly: FALSEolcSchemaDN: cn=SubschemaolcMonitoring: FALSEolcAccess: {0}to attrs=userPassword,shadowLastChange,shadowMax,shadowWarning by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by anonymous auth by * noneolcAccess: {1}to dn="cn=Manager,dc=nausch,dc=org" by self write by * noneolcAccess: {2}to dn="cn=Technischeruser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * noneolcAccess: {3}to dn.regex="cn=([^,]+),ou=Group,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: {4}to dn.regex="uid=([^,]+),ou=People,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess:: ezV9dG8gKiAgYnkgc2VsZiB3cml0ZSAgYnkgZG4uYmFzZT0igVsZiz1uYXVzY2gsZGM9b3JnIiB3cml0ZSAgKiAgYnkgYnkgKiByZWFkIA== # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Überprüfung

Zur Überprüfung ob unsere neu gesetzten Zugriffsregelung auch greifen versuchen wir im ersten Schritt, die Daten des Nutzers bigchief abzufragen, dies jedoch als Nutzer django.

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "ou=People,dc=nausch,dc=org" "uid=bigchief" -W -D "uid=django,ou=People,dc=nausch,dc=org" Enter LDAP Password:

Page 69: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Erhalten wir keine Ausgabe ist alles O.K.!

Rufen wir die Daten des zugrhörigen Nutzers, ab so klappt dies natürlich wie erhofft. Im folgenden Beispiel frägt also der Nutzer django die Daten des Nutzers django ab.

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "ou=People,dc=nausch,dc=org" "uid=django" -W -D "uid=django,ou=People,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JENna3VQVFplJDRiT2wvR2d0815lxQjRfuCKaU4yYVN5VndHUWE 2SVlubW40eGlGdzJkVjRsbWNK0815Yzlxd2tFYWJQdTZUL1BITWNXcWFLbW9KUnd6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

Nach wie vor kann aber unser technischer User mit dem gleichlautenden Namen Technischeruser die Daten der beiden User django und auch bigchief abfragen.

# ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2s1LV1ad1Eg31L3SaU2wvR2dSMUg4OWlxQjRtaU4yYVN5VndHUWE 2SVlubW40eGlGdzJkVjRsbWNKakRoYzlxd2tFYWJQdTZUL1BITWNXcWFLbW9KUnd6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django # ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=bigchief" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: uid=bigchief,ou=People,dc=nausch,dc=orguid: bigchiefcn: BigChiefobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JGo1cmxhSkd1JGlPVkt6T2pwOUdOSWpPNDFMYVlpTzFxTk9rc0h rbFQ1eGpTc0oxMDhjZ21mVnBuZ0AsCHleKK3nOFBoOGV4bmZlbFJjaFBSOUlYOXRmalVxbm1JZWgushadowLastChange: 15274shadowMin: 0shadowMax: 99999shadowWarning: 7

Page 70: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

loginShell: /bin/bashuidNumber: 501gidNumber: 501homeDirectory: /home/bigchiefgecos: BigChief

Konfiguration des Clients

Die Konfiguration unseres Clients nehmen wir am einfachsten mit Hilfe des Programmes authconfig aus dem RPM-Paket authconfig-gtk vor. Hierzu rufen wir authconfig mit den nötigen Optionen für unsere (Test-)Umgebung auf.

disablesmartcard SmartCard-Unterstützung deaktivieren disablefingerprint Fingerprintleser deaktivierung disablemd5 MD5 Passworter abschalten passalgo Definition des Passworthash-Algoritmuses enablemkhomedir Homedirectory beim ersten Login eines neuen Users automatisch anlegen enableldap LDAP User Informationen aktivieren enableldapauth LDAP Authentifizierung aktivieren ldapserver LDAP Servername oder URI Definition ldapbasedn LDAP Basde DN Definition update Update der Konfigurationsdateien mit den gesetzten Werten.

Eine ausführliche Beschreibung der optionen erhält man übder die Manpage von authconfig oder beim Aufruf der Option –help.

# authconfig --help

Wir Konfigurieren nun also unsere LDAP-Client-Authentifizierung wie folgt.

# authconfig --disablesmartcard --disablefingerprint --disablemd5 --passalgo=sha256 --enablemkhomedir --enableldap --enableldapauth --ldapserver=ldap.dmz.nausch.org --ldapbasedn="dc=nausch,dc=org" --update nslcd starten: [ OK ] oddjobd starten: [ OK ]

Die einzelnen Konfigurationsdateien, die mit dem vorgenannten Programmaufruf angepasst wurden, werden wir uns im Detail betrachten, ggf. anpassen und mit Bearbeitungsvermerken versehen, damit wir später noch nachvollziehen können, welche Änderungen im Detail notwendig waren um die LDAP Client Authentifizierung aktiviert werden konnte.

Zur Dokumentation und ggf. spätere weitere Dokumentationsschritte versehen wir optional alle Änderungen mit einem Kommntar, ala: # Django : Datum [optionaler Grund].

authconfig

In der Konfigurationsdatei /etc/sysconfig/authconfig setzen wir die beiden folgenden Werte von no auf yes:

USELDAP=yes (LDAP-Authentifizierung aktivieren.) FORCELEGACY=yes (CentOS 6 nutzt standardmäßig TLS für die LDAP-Authentifizierung. Mit diesem Schalter wird diese Voreinstellung deaktiviert und die die unverschlüsselte Kommunikation mit dem LDAP-Server erzwungen.)

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/sysconfig/authconfig/etc/sysconfig/authconfig

USEMKHOMEDIR=no

Page 71: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

USEPAMACCESS=noCACHECREDENTIALS=yesUSESSSDAUTH=noUSESHADOW=yesUSEWINBIND=noUSEDB=noFORCELEGACY=yesUSEFPRINTD=yesFORCESMARTCARD=noPASSWDALGORITHM=sha512USELDAPAUTH=noUSEPASSWDQC=noUSELOCAUTHORIZE=yesUSECRACKLIB=yesUSEWINBINDAUTH=noUSESMARTCARD=noUSELDAP=yesUSENIS=noUSEKERBEROS=noUSESYSNETAUTH=noUSESMBAUTH=noUSESSSD=noUSEHESIOD=no

ldap.conf

In der Konfigurationsdatei /etc/openldap/ldap.conf tragen wir folgende Daten nach:

BASE dc=nausch, dc=org URI ldap://ldap.dmz.nausch.org TLS_CACERTDIR /etc/openldap/cacerts

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/openldap/ldap.conf/etc/openldap/ldap.conf

## LDAP Defaults# # See ldap.conf(5) for details# This file should be world readable but not world writable. #BASE dc=example, dc=com#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 #SIZELIMIT 12#TIMELIMIT 15#DEREF never # Django : 2011-10-28 LDAP Client AuthenticationBASE dc=nausch, dc=orgURI ldap://ldap.dmz.nausch.orgTLS_CACERTDIR /etc/openldap/cacerts

pam_ldap.conf

In der Konfigurationsdatei /etc/pam_ldap.conf tragen wir folgende Daten nach:

binddn dc=nausch,dc=org bindpw Klaus-ist-der-groesste! uri ldap://ldap.dmz.nausch.org ssl no tls_cacertdir /etc/openldap/cacerts

Page 72: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

pam_password sha512

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam_ldap.conf/etc/pam_ldap.conf

# @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $## This is the configuration file for the LDAP nameservice# switch library and the LDAP PAM module.## The man page for this file is pam_ldap(5)## PADL Software# http://www.padl.com# # Your LDAP server. Must be resolvable without using LDAP.# Multiple hosts may be specified, each separated by a # space. How long nss_ldap takes to failover depends on# whether your LDAP client library supports configurable# network or connect timeouts (see bind_timelimit). # Django : 2011-10-28 LDAP Client-Authentication# default : host 127.0.0.1 # The distinguished name of the search base.# Django : 2011-11-10 LDAP Client-Authentication# base dc=example,dc=combinddn dc=nausch,dc=org # Another way to specify your LDAP server is to provide an# uri with the server name. This allows to use# Unix Domain Sockets to connect to a local LDAP Server.#uri ldap://127.0.0.1/#uri ldaps://127.0.0.1/ #uri ldapi://%2fvar%2frun%2fldapi_sock/# Note: %2f encodes the '/' used as directory separator # The LDAP version to use (defaults to 3# if supported by client library)#ldap_version 3 # The distinguished name to bind to the server with.# Optional: default is to bind anonymously.#binddn cn=proxyuser,dc=example,dc=com # The credentials to bind with. # Optional: default is no credential.#bindpw secret# Django : 2011-11-10 LDAP Client-Authenticationbindpw Klaus-ist-der-groesste! # The distinguished name to bind to the server with# if the effective user ID is root. Password is# stored in /etc/ldap.secret (mode 600)#rootbinddn cn=manager,dc=example,dc=com # The port.# Optional: default is 389.#port 389 # The search scope.#scope sub#scope one#scope base 

Page 73: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Search timelimit#timelimit 30 # Bind/connect timelimit#bind_timelimit 30 # Reconnect policy: hard (default) will retry connecting to# the software with exponential backoff, soft will fail# immediately.#bind_policy hard # Idle timelimit; client will close connections# (nss_ldap only) if the server has not been contacted# for the number of seconds specified below.#idle_timelimit 3600 # Filter to AND with uid=%s#pam_filter objectclass=account # The user ID attribute (defaults to uid)#pam_login_attribute uid # Search the root DSE for the password policy (works# with Netscape Directory Server)#pam_lookup_policy yes # Check the 'host' attribute for access control# Default is no; if set to yes, and user has no# value for the host attribute, and pam_ldap is# configured for account management (authorization)# then the user will not be allowed to login.#pam_check_host_attr yes # Check the 'authorizedService' attribute for access# control# Default is no; if set to yes, and the user has no# value for the authorizedService attribute, and# pam_ldap is configured for account management# (authorization) then the user will not be allowed# to login.#pam_check_service_attr yes # Group to enforce membership of#pam_groupdn cn=PAM,ou=Groups,dc=example,dc=com # Group member attribute#pam_member_attribute uniquemember # Specify a minium or maximum UID number allowed#pam_min_uid 0#pam_max_uid 0 # Template login attribute, default template user# (can be overriden by value of former attribute# in user's entry)#pam_login_attribute userPrincipalName#pam_template_login_attribute uid#pam_template_login nobody # HEADS UP: the pam_crypt, pam_nds_passwd,# and pam_ad_passwd options are no# longer supported.## Do not hash the password at all; presume# the directory server will do it, if# necessary. This is the default.#pam_password clear # Hash password locally; required for University of

Page 74: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Michigan LDAP server, and works with Netscape# Directory Server if you're using the UNIX-Crypt# hash mechanism and not using the NT Synchronization# service. #pam_password crypt # Remove old password first, then update in# cleartext. Necessary for use with Novell# Directory Services (NDS)#pam_password clear_remove_old#pam_password nds # RACF is an alias for the above. For use with# IBM RACF#pam_password racf # Update Active Directory password, by# creating Unicode password and updating# unicodePwd attribute.#pam_password ad # Use the OpenLDAP password change# extended operation to update the password.#pam_password exop # Redirect users to a URL or somesuch on password# changes.#pam_password_prohibit_message Please visit http://internal to change your password. # RFC2307bis naming contexts# Syntax:# nss_base_XXX base?scope?filter# where scope is {base,one,sub}# and filter is a filter to be &'d with the# default filter.# You can omit the suffix eg:# nss_base_passwd ou=People,# to append the default base DN but this# may incur a small performance impact.#nss_base_passwd ou=People,dc=example,dc=com?one#nss_base_shadow ou=People,dc=example,dc=com?one#nss_base_group ou=Group,dc=example,dc=com?one#nss_base_hosts ou=Hosts,dc=example,dc=com?one#nss_base_services ou=Services,dc=example,dc=com?one#nss_base_networks ou=Networks,dc=example,dc=com?one#nss_base_protocols ou=Protocols,dc=example,dc=com?one#nss_base_rpc ou=Rpc,dc=example,dc=com?one#nss_base_ethers ou=Ethers,dc=example,dc=com?one#nss_base_netmasks ou=Networks,dc=example,dc=com?ne#nss_base_bootparams ou=Ethers,dc=example,dc=com?one#nss_base_aliases ou=Aliases,dc=example,dc=com?one#nss_base_netgroup ou=Netgroup,dc=example,dc=com?one # attribute/objectclass mapping# Syntax:#nss_map_attribute rfc2307attribute mapped_attribute#nss_map_objectclass rfc2307objectclass mapped_objectclass # configure --enable-nds is no longer supported.# NDS mappings#nss_map_attribute uniqueMember member # Services for UNIX 3.5 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount User#nss_map_attribute uid msSFU30Name#nss_map_attribute uniqueMember msSFU30PosixMember#nss_map_attribute userPassword msSFU30Password#nss_map_attribute homeDirectory msSFU30HomeDirectory

Page 75: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_objectclass posixGroup Group#pam_login_attribute msSFU30Name#pam_filter objectclass=User#pam_password ad # configure --enable-mssfu-schema is no longer supported.# Services for UNIX 2.0 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount user#nss_map_attribute uid msSFUName#nss_map_attribute uniqueMember posixMember#nss_map_attribute userPassword msSFUPassword#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup Group#nss_map_attribute cn msSFUName#pam_login_attribute msSFUName#pam_filter objectclass=User#pam_password ad # RFC 2307 (AD) mappings#nss_map_objectclass posixAccount user#nss_map_objectclass shadowAccount user#nss_map_attribute uid sAMAccountName#nss_map_attribute homeDirectory unixHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup group#nss_map_attribute uniqueMember member#pam_login_attribute sAMAccountName#pam_filter objectclass=User#pam_password ad # configure --enable-authpassword is no longer supported# AuthPassword mappings#nss_map_attribute userPassword authPassword # AIX SecureWay mappings#nss_map_objectclass posixAccount aixAccount#nss_base_passwd ou=aixaccount,?one#nss_map_attribute uid userName#nss_map_attribute gidNumber gid#nss_map_attribute uidNumber uid#nss_map_attribute userPassword passwordChar#nss_map_objectclass posixGroup aixAccessGroup#nss_base_group ou=aixgroup,?one#nss_map_attribute cn groupName#nss_map_attribute uniqueMember member#pam_login_attribute userName#pam_filter objectclass=aixAccount#pam_password clear # Netscape SDK LDAPS#ssl on # Netscape SDK SSL options#sslpath /etc/ssl/certs # OpenLDAP SSL mechanism# start_tls mechanism uses the normal LDAP port, LDAPS typically 636#ssl start_tls#ssl on # OpenLDAP SSL options# Require and verify server certificate (yes/no)# Default is to use libldap's default behavior, which can be configured in# /etc/openldap/ldap.conf using the TLS_REQCERT setting. The default for# OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".#tls_checkpeer yes

Page 76: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 # CA certificates for server certificate verification# At least one of these are required if tls_checkpeer is "yes"#tls_cacertfile /etc/ssl/ca.cert#tls_cacertdir /etc/ssl/certs # Seed the PRNG if /dev/urandom is not provided#tls_randfile /var/run/egd-pool # SSL cipher suite# See man ciphers for syntax#tls_ciphers TLSv1 # Client certificate and key# Use these, if your server requires client authentication.#tls_cert#tls_key # Disable SASL security layers. This is needed for AD.#sasl_secprops maxssf=0 # Override the default Kerberos ticket cache location.#krb5_ccname FILE:/etc/.ldapcache # SASL mechanism for PAM authentication - use is experimental# at present and does not support password policy control#pam_sasl_mech DIGEST-MD5 # Django : 2011-10-28 LDAP Client-Authentication, automatisch eingetragen mit Hilfe von authconfiguri ldap://ldap.dmz.nausch.orgssl notls_cacertdir /etc/openldap/cacertspam_password sha256

nslcd.conf

In der Konfigurationsdatei /etc/nslcd.conf tragen wir folgende Daten nach:

uri ldap://ldap.dmz.nausch.org binddn dc=nausch,dc=org bindpw Klaus-ist-der-groesste! ssl no

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/nslcd.conf/etc/nslcd.conf

# This is the configuration file for the LDAP nameservice# switch library's nslcd daemon. It configures the mapping# between NSS names (see /etc/nsswitch.conf) and LDAP# information in the directory.# See the manual page nslcd.conf(5) for more information. # The uri pointing to the LDAP server to use for name lookups.# Multiple entries may be specified. The address that is used# here should be resolvable without using LDAP (obviously).#uri ldap://127.0.0.1/#uri ldaps://127.0.0.1/#uri ldapi://%2fvar%2frun%2fldapi_sock/# Note: %2f encodes the '/' used as directory separator# uri ldap://127.0.0.1/ # The LDAP version to use (defaults to 3# if supported by client library)

Page 77: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#ldap_version 3 # The distinguished name of the search base.# base dc=example,dc=com # The distinguished name to bind to the server with.# Optional: default is to bind anonymously.#binddn cn=proxyuser,dc=example,dc=com # The credentials to bind with.# Optional: default is no credentials.# Note that if you set a bindpw you should check the permissions of this file.#bindpw secret# Django : LDAP Client Authentifizierung mit technischem Userbindpw Klaus-ist-der-groesste! # The distinguished name to perform password modifications by root by.#rootpwmoddn cn=admin,dc=example,dc=com # The default search scope.#scope sub#scope one#scope base # Customize certain database lookups.#base group ou=Groups,dc=example,dc=com#base passwd ou=People,dc=example,dc=com#base shadow ou=People,dc=example,dc=com#scope group onelevel#scope hosts sub # Bind/connect timelimit.#bind_timelimit 30 # Search timelimit.#timelimit 30 # Idle timelimit. nslcd will close connections if the# server has not been contacted for the number of seconds.#idle_timelimit 3600 # Use StartTLS without verifying the server certificate.#ssl start_tls#tls_reqcert never # CA certificates for server certificate verification#tls_cacertdir /etc/ssl/certs#tls_cacertfile /etc/ssl/ca.cert # Seed the PRNG if /dev/urandom is not provided#tls_randfile /var/run/egd-pool # SSL cipher suite# See man ciphers for syntax#tls_ciphers TLSv1 # Client certificate and key# Use these, if your server requires client authentication.#tls_cert#tls_key # NDS mappings#map group uniqueMember member # Mappings for Services for UNIX 3.5#filter passwd (objectClass=User)#map passwd uid msSFU30Name#map passwd userPassword msSFU30Password#map passwd homeDirectory msSFU30HomeDirectory

Page 78: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#map passwd homeDirectory msSFUHomeDirectory#filter shadow (objectClass=User)#map shadow uid msSFU30Name#map shadow userPassword msSFU30Password#filter group (objectClass=Group)#map group uniqueMember msSFU30PosixMember # Mappings for Services for UNIX 2.0#filter passwd (objectClass=User)#map passwd uid msSFUName#map passwd userPassword msSFUPassword#map passwd homeDirectory msSFUHomeDirectory#map passwd gecos msSFUName#filter shadow (objectClass=User)#map shadow uid msSFUName#map shadow userPassword msSFUPassword#map shadow shadowLastChange pwdLastSet#filter group (objectClass=Group)#map group uniqueMember posixMember # Mappings for Active Directory#pagesize 1000#referrals off#filter passwd (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))#map passwd uid sAMAccountName#map passwd homeDirectory unixHomeDirectory#map passwd gecos displayName#filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))#map shadow uid sAMAccountName#map shadow shadowLastChange pwdLastSet#filter group (objectClass=group)#map group uniqueMember member # Mappings for AIX SecureWay#filter passwd (objectClass=aixAccount)#map passwd uid userName#map passwd userPassword passwordChar#map passwd uidNumber uid#map passwd gidNumber gid#filter group (objectClass=aixAccessGroup)#map group cn groupName#map group uniqueMember member#map group gidNumber giduid nslcdgid ldap# This comment prevents repeated auto-migration of settings.# Django : 2011-10-28 LDAP Client Authentication, angefügt durch den Aufruf von authconfiguri ldap://ldap.dmz.nausch.org/binddn cn=Technischeruser,dc=nausch,dc=orgssl notls_cacertdir /etc/openldap/cacerts

nsswitch.conf

In der Konfigurationsdatei /etc/pam.d/system-auth tragen wir folgende Daten nach:

passwd: files ldap shadow: files ldap group: files ldap

netgroup: ldap

automount: files ldap

Page 79: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/nsswitch.conf/etc/nsswitch.conf

## /etc/nsswitch.conf## An example Name Service Switch config file. This file should be# sorted with the most-used services at the beginning.## The entry '[NOTFOUND=return]' means that the search for an# entry should stop if the search in the previous entry turned# up nothing. Note that if the search failed due to some other reason# (like no NIS server responding) then the search continues with the# next entry.## Valid entries include:## nisplus Use NIS+ (NIS version 3)# nis Use NIS (NIS version 2), also called YP# dns Use DNS (Domain Name Service)# files Use the local files# db Use the local database (.db) files# compat Use NIS on compat mode# hesiod Use Hesiod for user lookups# [NOTFOUND=return] Stop searching if not found so far# # To use db, put the "db" in front of "files" for entries you want to be# looked up first in the databases## Example:#passwd: db files nisplus nis#shadow: db files nisplus nis#group: db files nisplus nis # Django : 2011-10-28 LDAP Client Authentication# default# passwd: files# shadow: files# group: filespasswd: files ldapshadow: files ldapgroup: files ldap #hosts: db files nisplus nis dnshosts: files dns # Example - obey only what nisplus tells us...#services: nisplus [NOTFOUND=return] files#networks: nisplus [NOTFOUND=return] files#protocols: nisplus [NOTFOUND=return] files#rpc: nisplus [NOTFOUND=return] files#ethers: nisplus [NOTFOUND=return] files#netmasks: nisplus [NOTFOUND=return] files  bootparams: nisplus [NOTFOUND=return] files ethers: filesnetmasks: filesnetworks: filesprotocols: filesrpc: filesservices: files # Django : 2011-10-28 LDAP Client Authentication# default

Page 80: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# netgroup: nisplusnetgroup: ldap publickey: nisplus # Django : 2011-10-28 LDAP Client Authentication# default# automount: files nisplusautomount: files ldapaliases: files nisplus

system-auth

Durch den Aufruf des Programmes authconfig wurden die folgenden pam.d-Konfigurationsdateien angepasst:

/etc/pam.d/fingerprint-auth /etc/pam.d/password-auth /etc/pam.d/smartcard-auth /etc/pam.d/smtp /etc/pam.d/system-auth

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam.d/fingerprint-auth/etc/pam.d/fingerprint-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/password-auth/etc/pam.d/password-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so

Page 81: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smartcard-auth/etc/pam.d/smartcard-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_onlyauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_pkcs11.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smtp/etc/pam.d/smtp

#%PAM-1.0auth include password-authaccount include password-auth # vim /etc/pam.d/system-auth/etc/pam.d/system-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so

Page 82: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so

automatischer Systemstart des nslc-Dämon

Damit nun beim nächsten Start des Systems der notwendige naming services LDAP client daemon kurz nslcd mit gestartet wird, versetzen wir das Startscript in den Modus “on“.

# chkconfig nslcd on

Den Status überprüfen wir bei Bedarf mittels:

# chkconfig --list | grep nslcd nslcd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Zum Abschluss unserer Konfiguration starten wir nun unseren CentOS 6 Client einmal durch.

# reboot

Test

LDAP Abfrage

Zur Abfrage eines LDAP-Users können wir folgenden Aufruf verwenden:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JENna3VQVFplsdfsT2wvR2dSMUg4OWlxQjRtaU4yYVN5VndHUWE 2SVlubW40eGlGdzJkVjRsbWNKakRoYzlxd2tFYWJQdTZUL1BITWNXcW215Sdsads6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

LDAP-Abfrage mit dem User Django aber mit falschem Passwort:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "uid=django,ou=People,dc=nausch,dc=org"Enter LDAP Password: ldap_bind: Invalid credentials (49)

LDAP-Abfrage mit dem User Django aber mit richtigem Passwort:

$ ldapsearch -x -LLL -H ldap://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "uid=django,ou=People,dc=nausch,dc=org"

Page 83: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccountobjectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JENna3VQVFplJDss2wvR2dSMUg4OWlxQjRtaU4yYVN5VndHUWE 2SVlum31nScH3fFiSt31nV0lLd3pPzlxd2t564JQdTZUL1BITWNXcWFLbW9KUnd6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

Clienttest

Die erfolgreiche Konfiguration unseres Rechners überprüfen wir so:

1. Mit getent lassen wir uns die Informationen eines Users anzeigen, der sowohl in der /etc/shadow wie auch im zentralen LDAP-Verzeichnisdienst hinterlegt ist. Wenn alles gut gelaufen ist, werden uns zwei Einträge präsentiert. 2. $ getent passwd | grep django3. django:x:500:500::/home/django:/bin/bashdjango:x:500:500:Django:/home/django:/bin/bash

4. Als nächstes wählen wir einen Nutzer der nur im LDAP-Verzeichnisdienst einen Account hat, nicht aber auf der lokalen Maschine. 5. $ getent passwd | grep bigchiefbigchief:x:501:501:BigChief:/home/bigchief:/bin/bash

6. Dann melden wir uns nun an unserem Client als ein Benutzer an, der lokal auf der Maschine nicht existiert, werden wir beim Login nach dem Passwort gefragt, welches gegen den zentralen OpenLDAP-Server verifiziert wird. Ist das Passwort richtig wird auch gleich das zugehörige Nutzer-Homeverzeichnis angelegt. 7. [django@vml010008 ~]$ su - bigchief8. Password: 9. Creating directory '/home/bigchief'.[bigchief@vml010008 ~]$

Page 85: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Der Cyrus Hochleistungs-Mailserver mit Unterstützung für IMAP und SIEVE unter CentOS 6.x

Der eMail-Server Cyrus ist ein Open-Source-Projekt der Carnegie Mellon University, welches ursprünglich für das Campus-Mail-System der Universität entwickelt wurde. In der Zwischenzeit ist er jedoch ein anerkannter und auch im professionellen Bereich eingesetzter MDA1). Er unterstützt neben dem POP32) auch das Protokoll IMAP3), auf welches wir in der weiteren Dokumentation weiter eingehen werden. Cyrus arbeitet mit diversen SMTP-Servern unter Linux/Unix zusammen und ist für das Zusammenspiel mit unserem Mailserver Postfix bestens gerüstet. Cyrus benutzt die Cyrus SASL Library - eine Implementierung von SASL - um mehrere Authentifizierungsmethoden zur Verfügung stellen zu können, wie z.B. Plain, CRAM-MD5, Digest-MD5, oder PAM.

Über das Anwendungsprotokoll IMAP erlaubt der Cyrus-Server den Benutzern die Verwaltung von empfangenen E-Mails, die sich in einem Postfach auf dem Mailserver befinden. IMAP wurde im Jahr 1986 entworfen, um den Zugriff auf Mailboxen und Nachrichten so bereitzustellen, als befänden sich diese auf dem lokalen Rechner. Im Gegensatz zu POP3 verbleiben die eMails aber auf dem Mailserver und werden dort verwaltet. Für das Versenden der Nachrichten wird das Protokoll SMTP verwendet. Zur Kommunikation mit dem IMAP-Server horcht der Server auf dem Port 143. Die Definition von IMAP ist im RFC 3501 definiert worden.

Installation

Die Installation unseres MDA4) nehmen wir mit Hilfe unseres Paketmanagers yum vor. Neben dem eigentlichen Programmpaket cyrus-imapd kommt noch das Paket cyrus-imapd-utils zum Einsatz.

# yum install cyrus-imapd cyrus-imapd-utils -y

Was uns die beiden Programmpakete mitbringen können wir bei Bedarf den Angaben im jeweiligen RPM entnehmen.

cyrus-imapd # rpm -qil cyrus-imapdName : cyrus-imapd Relocations: (not relocatable)Version : 2.3.16 Vendor: CentOSRelease : 6.el6_1.4 Build Date: Thu 01 Dec 2011 06:24:38 PM CETInstall Date: Mon 26 Dec 2011 10:27:26 PM CET Build Host: c6b5.bsys.dev.centos.orgGroup : System Environment/Daemons Source RPM: cyrus-imapd-2.3.16-6.el6_1.4.src.rpmSize : 45641427 License: BSDSignature : RSA/SHA1, Wed 07 Dec 2011 06:51:07 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://cyrusimap.web.cmu.edu/Summary : A high-performance mail server with IMAP, POP3, NNTP and SIEVE supportDescription :The cyrus-imapd package contains the core of the Cyrus IMAP server.It is a scaleable enterprise mail system designed for use fromsmall to large enterprise environments using standards-basedinternet mail technologies.

Page 86: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

A full Cyrus IMAP implementation allows a seamless mail and bulletinboard environment to be set up across multiple servers. It differs fromother IMAP server implementations in that it is run on "sealed"servers, where users are not normally permitted to log in and have nosystem account on the server. The mailbox database is stored in partsof the file system that are private to the Cyrus IMAP server. All useraccess to mail is through software using the IMAP, POP3 or KPOPprotocols. It also includes support for virtual domains, NNTP,mailbox annotations, and much more. The private mailbox database designgives the server large advantages in efficiency, scalability andadministratability. Multiple concurrent read/write connections to thesame mailbox are permitted. The server supports access control lists onmailboxes and storage quotas on mailbox hierarchies.

The Cyrus IMAP server supports the IMAP4rev1 protocol describedin RFC 3501. IMAP4rev1 has been approved as a proposed standard.It supports any authentication mechanism available from the SASLlibrary, imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using SSL andTLSv1) can be used for security. The server supports single instancestore where possible when an email message is addressed to multiplerecipients, SIEVE provides server side email filtering./etc/cron.daily/cyrus-imapd/etc/cyrus.conf/etc/imapd.conf/etc/logrotate.d/cyrus-imapd/etc/pam.d/csync/etc/pam.d/imap/etc/pam.d/lmtp/etc/pam.d/mupdate/etc/pam.d/nntp/etc/pam.d/pop/etc/pam.d/sieve/etc/pki/cyrus-imapd/etc/pki/cyrus-imapd/cyrus-imapd.pem/etc/rc.d/init.d/cyrus-imapd/etc/sysconfig/cyrus-imapd/usr/lib/cyrus-imapd/usr/lib/cyrus-imapd/arbitron/usr/lib/cyrus-imapd/arbitronsort.pl/usr/lib/cyrus-imapd/chk_cyrus/usr/lib/cyrus-imapd/compile_sieve/usr/lib/cyrus-imapd/convert-sieve.pl/usr/lib/cyrus-imapd/ctl_cyrusdb/usr/lib/cyrus-imapd/ctl_deliver/usr/lib/cyrus-imapd/ctl_mboxlist/usr/lib/cyrus-imapd/cvt_cyrusdb/usr/lib/cyrus-imapd/cvt_cyrusdb_all/usr/lib/cyrus-imapd/cyr_dbtool/usr/lib/cyrus-imapd/cyr_df/usr/lib/cyrus-imapd/cyr_expire/usr/lib/cyrus-imapd/cyr_synclog/usr/lib/cyrus-imapd/cyrdump/usr/lib/cyrus-imapd/cyrfetchnews/usr/lib/cyrus-imapd/cyrus-master/usr/lib/cyrus-imapd/deliver/usr/lib/cyrus-imapd/dohash/usr/lib/cyrus-imapd/fud/usr/lib/cyrus-imapd/idled/usr/lib/cyrus-imapd/imapd/usr/lib/cyrus-imapd/ipurge/usr/lib/cyrus-imapd/lmtpd/usr/lib/cyrus-imapd/lmtpproxyd/usr/lib/cyrus-imapd/make_md5/usr/lib/cyrus-imapd/make_sha1/usr/lib/cyrus-imapd/masssievec/usr/lib/cyrus-imapd/mbexamine/usr/lib/cyrus-imapd/mbpath/usr/lib/cyrus-imapd/migrate-metadata

Page 87: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib/cyrus-imapd/mkimap/usr/lib/cyrus-imapd/mknewsgroups/usr/lib/cyrus-imapd/mupdate/usr/lib/cyrus-imapd/mupdate-loadgen.pl/usr/lib/cyrus-imapd/nntpd/usr/lib/cyrus-imapd/notifyd/usr/lib/cyrus-imapd/pop3d/usr/lib/cyrus-imapd/proxyd/usr/lib/cyrus-imapd/ptdump/usr/lib/cyrus-imapd/ptexpire/usr/lib/cyrus-imapd/ptloader/usr/lib/cyrus-imapd/quota/usr/lib/cyrus-imapd/reconstruct/usr/lib/cyrus-imapd/rehash/usr/lib/cyrus-imapd/sievec/usr/lib/cyrus-imapd/sieved/usr/lib/cyrus-imapd/smmapd/usr/lib/cyrus-imapd/squatter/usr/lib/cyrus-imapd/sync_client/usr/lib/cyrus-imapd/sync_reset/usr/lib/cyrus-imapd/sync_server/usr/lib/cyrus-imapd/timsieved/usr/lib/cyrus-imapd/tls_prune/usr/lib/cyrus-imapd/translatesieve/usr/lib/cyrus-imapd/undohash/usr/lib/cyrus-imapd/unexpunge/usr/lib/cyrus-imapd/upgradesieve/usr/share/cyrus-imapd/usr/share/cyrus-imapd/rpm/usr/share/cyrus-imapd/rpm/db.cfg/usr/share/cyrus-imapd/rpm/magic/usr/share/doc/cyrus-imapd-2.3.16/usr/share/doc/cyrus-imapd-2.3.16/COPYRIGHT/usr/share/doc/cyrus-imapd-2.3.16/README/usr/share/doc/cyrus-imapd-2.3.16/README.autocreate-cyrus-2.3/usr/share/doc/cyrus-imapd-2.3.16/README.autosievefolder/usr/share/doc/cyrus-imapd-2.3.16/README.rpm/usr/share/doc/cyrus-imapd-2.3.16/altnamespace.html/usr/share/doc/cyrus-imapd-2.3.16/anoncvs.html/usr/share/doc/cyrus-imapd-2.3.16/bugs.html/usr/share/doc/cyrus-imapd-2.3.16/changes.html/usr/share/doc/cyrus-imapd-2.3.16/conf/usr/share/doc/cyrus-imapd-2.3.16/conf/cmu-backend.conf/usr/share/doc/cyrus-imapd-2.3.16/conf/cmu-frontend.conf/usr/share/doc/cyrus-imapd-2.3.16/conf/normal.conf/usr/share/doc/cyrus-imapd-2.3.16/conf/prefork.conf/usr/share/doc/cyrus-imapd-2.3.16/conf/small.conf/usr/share/doc/cyrus-imapd-2.3.16/contrib/usr/share/doc/cyrus-imapd-2.3.16/cyrusv2.mc/usr/share/doc/cyrus-imapd-2.3.16/faq.html/usr/share/doc/cyrus-imapd-2.3.16/feedback.html/usr/share/doc/cyrus-imapd-2.3.16/index.html/usr/share/doc/cyrus-imapd-2.3.16/install-admin-mb.html/usr/share/doc/cyrus-imapd-2.3.16/install-auth.html/usr/share/doc/cyrus-imapd-2.3.16/install-compile.html/usr/share/doc/cyrus-imapd-2.3.16/install-configure.html/usr/share/doc/cyrus-imapd-2.3.16/install-murder.html/usr/share/doc/cyrus-imapd-2.3.16/install-netnews.html/usr/share/doc/cyrus-imapd-2.3.16/install-perf.html/usr/share/doc/cyrus-imapd-2.3.16/install-prereq.html/usr/share/doc/cyrus-imapd-2.3.16/install-replication.html/usr/share/doc/cyrus-imapd-2.3.16/install-sieve.html/usr/share/doc/cyrus-imapd-2.3.16/install-snmpmon.html/usr/share/doc/cyrus-imapd-2.3.16/install-testing.html/usr/share/doc/cyrus-imapd-2.3.16/install-upgrade.html/usr/share/doc/cyrus-imapd-2.3.16/install-virtdomains.html/usr/share/doc/cyrus-imapd-2.3.16/install.html/usr/share/doc/cyrus-imapd-2.3.16/internal/usr/share/doc/cyrus-imapd-2.3.16/internal/bytecode

Page 88: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/doc/cyrus-imapd-2.3.16/internal/database-formats.html/usr/share/doc/cyrus-imapd-2.3.16/internal/hacking/usr/share/doc/cyrus-imapd-2.3.16/internal/internationalization.html/usr/share/doc/cyrus-imapd-2.3.16/internal/locking/usr/share/doc/cyrus-imapd-2.3.16/internal/mailbox-format.html/usr/share/doc/cyrus-imapd-2.3.16/internal/master-state-machine.fig/usr/share/doc/cyrus-imapd-2.3.16/internal/prot-events/usr/share/doc/cyrus-imapd-2.3.16/internal/prot.html/usr/share/doc/cyrus-imapd-2.3.16/internal/replication_examples/usr/share/doc/cyrus-imapd-2.3.16/internal/replication_protocol/usr/share/doc/cyrus-imapd-2.3.16/internal/specials/usr/share/doc/cyrus-imapd-2.3.16/internal/uuid/usr/share/doc/cyrus-imapd-2.3.16/internal/var_directory_structure/usr/share/doc/cyrus-imapd-2.3.16/mailing-list.html/usr/share/doc/cyrus-imapd-2.3.16/man.html/usr/share/doc/cyrus-imapd-2.3.16/murder.fig/usr/share/doc/cyrus-imapd-2.3.16/murder.png/usr/share/doc/cyrus-imapd-2.3.16/netnews.fig/usr/share/doc/cyrus-imapd-2.3.16/netnews.png/usr/share/doc/cyrus-imapd-2.3.16/notes.html/usr/share/doc/cyrus-imapd-2.3.16/os.html/usr/share/doc/cyrus-imapd-2.3.16/overview.html/usr/share/doc/cyrus-imapd-2.3.16/questions.html/usr/share/doc/cyrus-imapd-2.3.16/readme.html/usr/share/doc/cyrus-imapd-2.3.16/sieve-protocol.html/usr/share/doc/cyrus-imapd-2.3.16/sieve.html/usr/share/doc/cyrus-imapd-2.3.16/specs.html/usr/share/doc/cyrus-imapd-2.3.16/text/usr/share/doc/cyrus-imapd-2.3.16/text/altnamespace/usr/share/doc/cyrus-imapd-2.3.16/text/anoncvs/usr/share/doc/cyrus-imapd-2.3.16/text/bugs/usr/share/doc/cyrus-imapd-2.3.16/text/changes/usr/share/doc/cyrus-imapd-2.3.16/text/faq/usr/share/doc/cyrus-imapd-2.3.16/text/feedback/usr/share/doc/cyrus-imapd-2.3.16/text/index/usr/share/doc/cyrus-imapd-2.3.16/text/install/usr/share/doc/cyrus-imapd-2.3.16/text/install-admin-mb/usr/share/doc/cyrus-imapd-2.3.16/text/install-auth/usr/share/doc/cyrus-imapd-2.3.16/text/install-compile/usr/share/doc/cyrus-imapd-2.3.16/text/install-configure/usr/share/doc/cyrus-imapd-2.3.16/text/install-murder/usr/share/doc/cyrus-imapd-2.3.16/text/install-netnews/usr/share/doc/cyrus-imapd-2.3.16/text/install-perf/usr/share/doc/cyrus-imapd-2.3.16/text/install-prereq/usr/share/doc/cyrus-imapd-2.3.16/text/install-replication/usr/share/doc/cyrus-imapd-2.3.16/text/install-sieve/usr/share/doc/cyrus-imapd-2.3.16/text/install-snmpmon/usr/share/doc/cyrus-imapd-2.3.16/text/install-testing/usr/share/doc/cyrus-imapd-2.3.16/text/install-upgrade/usr/share/doc/cyrus-imapd-2.3.16/text/install-virtdomains/usr/share/doc/cyrus-imapd-2.3.16/text/mailing-list/usr/share/doc/cyrus-imapd-2.3.16/text/man/usr/share/doc/cyrus-imapd-2.3.16/text/notes/usr/share/doc/cyrus-imapd-2.3.16/text/os/usr/share/doc/cyrus-imapd-2.3.16/text/overview/usr/share/doc/cyrus-imapd-2.3.16/text/questions/usr/share/doc/cyrus-imapd-2.3.16/text/readme/usr/share/doc/cyrus-imapd-2.3.16/text/sieve/usr/share/doc/cyrus-imapd-2.3.16/text/sieve-protocol/usr/share/doc/cyrus-imapd-2.3.16/text/specs/usr/share/man/man5/cyrus.conf.5.gz/usr/share/man/man5/imapd.conf.5.gz/usr/share/man/man5/krb.equiv.5.gz/usr/share/man/man8/arbitron.8.gz/usr/share/man/man8/chk_cyrus.8.gz/usr/share/man/man8/ctl_cyrusdb.8.gz/usr/share/man/man8/ctl_deliver.8.gz/usr/share/man/man8/ctl_mboxlist.8.gz/usr/share/man/man8/cvt_cyrusdb.8.gz

Page 89: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/man/man8/cyr_dbtool.8.gz/usr/share/man/man8/cyr_df.8.gz/usr/share/man/man8/cyr_expire.8.gz/usr/share/man/man8/cyr_synclog.8.gz/usr/share/man/man8/cyrfetchnews.8.gz/usr/share/man/man8/cyrus-master.8.gz/usr/share/man/man8/deliver.8.gz/usr/share/man/man8/fud.8.gz/usr/share/man/man8/idled.8.gz/usr/share/man/man8/imapd.8cyrus.gz/usr/share/man/man8/ipurge.8.gz/usr/share/man/man8/lmtpd.8.gz/usr/share/man/man8/make_md5.8.gz/usr/share/man/man8/make_sha1.8.gz/usr/share/man/man8/mbexamine.8.gz/usr/share/man/man8/mbpath.8.gz/usr/share/man/man8/nntpd.8.gz/usr/share/man/man8/notifyd.8.gz/usr/share/man/man8/pop3d.8cyrus.gz/usr/share/man/man8/quota.8.gz/usr/share/man/man8/reconstruct.8.gz/usr/share/man/man8/rmnews.8.gz/usr/share/man/man8/smmapd.8.gz/usr/share/man/man8/squatter.8.gz/usr/share/man/man8/sync_client.8.gz/usr/share/man/man8/sync_reset.8.gz/usr/share/man/man8/sync_server.8.gz/usr/share/man/man8/timsieved.8.gz/usr/share/man/man8/tls_prune.8.gz/usr/share/man/man8/unexpunge.8.gz/var/lib/imap/var/lib/imap/backup/var/lib/imap/db/var/lib/imap/log/var/lib/imap/md5/var/lib/imap/meta/var/lib/imap/msg/var/lib/imap/proc/var/lib/imap/ptclient/var/lib/imap/quota/var/lib/imap/rpm/var/lib/imap/sieve/var/lib/imap/socket/var/lib/imap/sync/var/lib/imap/user/var/spool/imap

cyrus-imapd-utils # rpm -qil cyrus-imapd-utilsName : cyrus-imapd-utils Relocations: (not relocatable)Version : 2.3.16 Vendor: CentOSRelease : 6.el6_1.4 Build Date: Thu 01 Dec 2011 06:24:38 PM CETInstall Date: Mon 26 Dec 2011 10:27:06 PM CET Build Host: c6b5.bsys.dev.centos.orgGroup : Applications/System Source RPM: cyrus-imapd-2.3.16-6.el6_1.4.src.rpmSize : 733204 License: BSDSignature : RSA/SHA1, Wed 07 Dec 2011 06:51:10 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://cyrusimap.web.cmu.edu/Summary : Cyrus IMAP server administration utilitiesDescription :The cyrus-imapd-utils package contains administrative tools for theCyrus IMAP server. It can be installed on systems other than theone running the server./usr/bin/cyradm/usr/bin/imtest

Page 90: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/bin/installsieve/usr/bin/lmtptest/usr/bin/mupdatetest/usr/bin/nntptest/usr/bin/notifytest/usr/bin/pop3test/usr/bin/sieveshell/usr/bin/sivtest/usr/bin/smtptest/usr/bin/synctest/usr/lib64/perl5/vendor_perl/Cyrus/usr/lib64/perl5/vendor_perl/Cyrus/IMAP/usr/lib64/perl5/vendor_perl/Cyrus/IMAP.pm/usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Admin.pm/usr/lib64/perl5/vendor_perl/Cyrus/IMAP/IMSP.pm/usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm/usr/lib64/perl5/vendor_perl/Cyrus/SIEVE/usr/lib64/perl5/vendor_perl/Cyrus/SIEVE/managesieve.pm/usr/lib64/perl5/vendor_perl/auto/usr/lib64/perl5/vendor_perl/auto/Cyrus/usr/lib64/perl5/vendor_perl/auto/Cyrus/IMAP/usr/lib64/perl5/vendor_perl/auto/Cyrus/IMAP/IMAP.so/usr/lib64/perl5/vendor_perl/auto/Cyrus/SIEVE/usr/lib64/perl5/vendor_perl/auto/Cyrus/SIEVE/managesieve/usr/lib64/perl5/vendor_perl/auto/Cyrus/SIEVE/managesieve/managesieve.so/usr/share/doc/cyrus-imapd-utils-2.3.16/usr/share/doc/cyrus-imapd-utils-2.3.16/Changes/usr/share/doc/cyrus-imapd-utils-2.3.16/README/usr/share/doc/cyrus-imapd-utils-2.3.16/examples/usr/share/doc/cyrus-imapd-utils-2.3.16/examples/auditmbox.pl/usr/share/doc/cyrus-imapd-utils-2.3.16/examples/imapcollate.pl/usr/share/doc/cyrus-imapd-utils-2.3.16/examples/imapdu.pl/usr/share/doc/cyrus-imapd-utils-2.3.16/examples/test-imsp.pl/usr/share/man/man1/cyradm.1.gz/usr/share/man/man1/imtest.1.gz/usr/share/man/man1/installsieve.1.gz/usr/share/man/man1/lmtptest.1.gz/usr/share/man/man1/mupdatetest.1.gz/usr/share/man/man1/nntptest.1.gz/usr/share/man/man1/pop3test.1.gz/usr/share/man/man1/sieveshell.1.gz/usr/share/man/man1/sivtest.1.gz/usr/share/man/man1/smtptest.1.gz/usr/share/man/man3/Cyrus::IMAP.3pm.gz/usr/share/man/man3/Cyrus::IMAP::Admin.3pm.gz/usr/share/man/man3/Cyrus::IMAP::IMSP.3pm.gz/usr/share/man/man3/Cyrus::IMAP::Shell.3pm.gz/usr/share/man/man3/Cyrus::SIEVE::managesieve.3pm.gz

Server-Konfiguration

imapd.conf

In der Konfigurationsdatei /etc/imapd.conf werden das Verhalten und die Verzeichnis(strukturen) des IMAP-Servers definiert. Mit dem Editor unserer Wahl bearbeiten und ergänzen wir die vom RPM mitgebrachten Defaultwerte.

# vim /etc/imapd.conf/etc/imapd.conf

# Defaultkonfigurationsdatei aus dem RPM-Paket cyrus-imapd angepasst an die# lokalen Rahmenbedingungen und versehen mit Kommentaren# Django : 2011-12-08 # Konfigurationsverzeichnis der IMAP-Servers, in dem die Informationen# wie die Berechtigungen, Quotas, und Informationen übder die# Mailboxen gespeichert

Page 91: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

configdirectory: /var/lib/imap # Die Default-Partition, in der alle neuen User angelegt werden.partition-default: /var/spool/imap # postmaster, gibt den Postmaster an, also den E-Mail Administrator. Dies ist auch die# Absenderadresse, die bei Versenden von Empfangsbestätigungen von sieve verwendet wird.postmaster: postmaster # Der Benutzer mit den Administratoren-Rechtenadmins: cyrus # Sieve ist ein Filter, mit dem Nachrichten automatisch bei der Zustellung in verschiedene# Postfächer / Ordner einsortiert. In diesem Verzeichnis wird nach den sieve-Scripten gesucht.sievedir: /var/lib/imap/sieve # Pfadangaben zum Befehl sendmail. Sieve verschickt über den Befehl sendmail # Reject-, Redirect- und Vacation-Nachrichtensendmail: /usr/sbin/sendmail # Definition des Hostnamens der bei der Begrüßungsmeldung des POP, IMAP und LMTP Daemon # ausgegeben wird.servername: imap.nausch.org # Festlegung welche Daten des Servers bei der Begrüßungsmeldung und des Funktionsumfanges# des Servers ausgegeben werden sollen.# "off" = keinerlei Ausgabe# "min" = Ausgabe des Servernamens bei der Begrüßung, Keine Angaben zum Funktionsumfang# des Servers # "on" = Ausgabe des Servernamens und der Version bei der Begrüßung; Ausgabe des# Cyrus-Version bei der Abfrage der Fähigkeitenserverinfo: min # Für die IMAP-Verzeichnisstrukturen werden Hash-Werte gebildet, was den Zugriff# wesentlich beschleunigt. Die Verzeichnisstruktur wird dabei wesentlich fein-# granularer, so wird aus /var/spool/imap/user/django /var/spool/imap/d/user/djangohashimapspool: yes # anonymen Benutzerzugang sperren, bedeutet, wie der Name schon sagt, # dass sich alle Benutzer authentifizieren müssen. allowanonymouslogin: no # Plaintexteingabe beim Lpgin erlauben? Nur zum Testen und Spielen von web-cyradm aktiviert.allowplaintext: no # Virtuellen Domain-Support aktivieren, d.h. Cyrus erzeugt die neuen Nutzerpostfächer# jeweils unter der betreffenden Domainstrukturvirtdomains: yes # Unqualifizierte Postfächer werden unterhalb des des user-Verzeichnisses der# default-Domäne angeordnet# defaultdomain: nausch.org # Nutzung des auxprop-Plugins zur Benutzer-Authentifizierungsasl_pwcheck_method: auxprop# Nutzung des ldapdb-Treibers für den Zugriff auf einen OpenLDAP-Serversasl_auxprop_plugin: ldapdb # Nutzerauthentifizierung mit Hilfe folgender Verfahren:# Klartextpasswörtern# verschlüsselten Passwörtern (CRAM-MD5 oder DIGEST-MD5)#sasl_mech_list: DIGEST-MD5 CRAM-MD5

Page 92: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

sasl_mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN # Definition der Anbindung an unseren zentralen LDAP-Serversasl_ldapdb_uri: ldap://ldap.dmz.nausch.orgsasl_ldapdb_id: SASLSystemUsersasl_ldapdb_pw: klais-is-a-geek!sasl_ldapdb_mech: DIGEST-MD5 # Konvertieren der Usernamen in Kleinbuchstaben vor dem Login/Authentifizierungusername_tolower: yes # lmtpd gibt einen permaneten Fehlercode zurück, wenn die Quota einer User-Mailbox # ausgereizt wurde. lmtp_overquota_perm_failure: yes # lmtpd konvertiert automatisch Empfängeradressen in Kleinbuchstabenlmtp_downcase_rcpt: yes # Ein Wert größer als Null setzt einen Quo in kByte. Ein Wert der nicht 0 ist, # erlaubt dem Benutzer das anlegen seiner eigenen INBOXautocreatequota: 2048000 # Sobald 90% der Quota erreicht ist, gibt der Server Warnmeldungen ausquotawarn: 90 # Postfach wird angelegt, wenn per lmtpd eine Nachricht angeliefert wird,# für die noch kein Inbox bestehtcreateonpost: no # Loggt sich ein User neu an, oder es wird eine Nachricht per lmtpd # angeliefert, für das noch kein Account besteht, so wird dieser automatisch # mit den definierten Ordnern angelegt###autocreateinboxfolders: inbox|achiveautocreateinboxfolders: Archives | Drafts | Sent | Trash # Loggt sich ein User neu an, oder es wird eine Nachricht per lmtpd # angeliefert, für das noch kein Account besteht, so werden automatisch # folgende Ordner abboniertautosubscribeinboxfolders: Archives | Drafts | Sent | Trash # Ist diese Option auf " yes" gesetzt, würde Cyrus keine E-Mails im # 8 Bit Format annehmen. Ist sie auf "no", so wandelt Cyrus die # Zeichen in 7 Bit um.reject8bit: no # Nach 30 Minuten IMAP-Untätigkeit den Benutzer automatisch abmeldentimeout: 30 # Normalerweise trennt Cyrus IMAP Ordern mit einem ".". Mit der Option: # "unixhierarchysep", kann man die Ordner mit einem "/" trennen lassen. # Wichtig wird diese Option sobald Benutzernamen Punkte enthalten. unixhierarchysep: yes # TLS-Einstellungen für IMAP over SSL (Port 993)tls_cert_file: /etc/pki/cyrus-imapd/servercert.pemtls_key_file: /etc/pki/cyrus-imapd/serverkey.pemtls_ca_file: /etc/pki/cyrus-imapd/cacert-root.pem # uncomment this if you're operating in a DSCP environment (RFC-4594)# qosmarking: af13

cyrus.conf

In der Konfigurationsdatei /etc/cyrus.conf wird der Cyrus-Master-Server konfiguriert und festgelegt, welche Dienste der Server anbieten soll. Mit unserem Standardeditor bearbeiten wir diese Datei und deaktivieren alle ungewollten Dienste.

Page 93: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# vim /etc/cyrus.conf/etc/cyrus.conf

# Defaultkonfigurationsdatei aus dem RPM-Paket cyrus-imapd angepasst an die# lokalen Rahmenbedingungen und versehen mit Kommentaren# Django : 2011-12-08 START { # do not delete this entry! recover cmd="ctl_cyrusdb -r"  # this is only necessary if using idled for IMAP IDLE idled cmd="idled"} # UNIX sockets start with a slash and are put into /var/lib/imap/socketsSERVICES { # add or remove based on preferences imap cmd="imapd" listen="imap" prefork=5 # Django : 2011-12-08 # nachfolgende drei Zeilen deaktiviert, da wir vorerst "nur" die beiden # Dienste imap und sieve nutzen wollen und werden # imaps cmd="imapd -s" listen="imaps" prefork=1 # pop3 cmd="pop3d" listen="pop3" prefork=3 # pop3s cmd="pop3d -s" listen="pop3s" prefork=1 sieve cmd="timsieved" listen="sieve" prefork=0  # these are only necessary if receiving/exporting usenet via NNTP # nntp cmd="nntpd" listen="nntp" prefork=3 # nntps cmd="nntpd -s" listen="nntps" prefork=1  # at least one LMTP is required for delivery # Django : 2011-12-08 weitergabe des MTA (Postfix) an den MDA (Cyrus) über einen # lokalen UNIX-Dateisocket, sofern sich der MTA und MDA auf einem Server befindet. # lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1 # # Befindet sich der MTA und MDA auf zwei getrennten Servern, so wird die # Anbindung über eine TCP/IP-Verbindung realisiert. lmtp cmd="lmtpd" listen="lmtp" prefork=0  lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1  # this is only necessary if using notifications # Django : 2011-12-08 # Informationen über eintreffende Nachrichten an ein weiteres Postfach # weiterleiten. notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1} EVENTS { # this is required checkpoint cmd="ctl_cyrusdb -c" period=30  # this is only necessary if using duplicate delivery suppression, # Sieve or NNTP delprune cmd="cyr_expire -E 3" at=0400  # this is only necessary if caching TLS sessions tlsprune cmd="tls_prune" at=0400 # Django : 2011-12-08 # Damit bei einer Suche in den Mailboxen von einem Client nicht alle Mails einzeln # aufgerufen werden und durchsucht werden müssen, nutzen wir den Dienst *squatter*, # der einen Index der Mailboxen in regelmäßigen Abständen (30 Minuten) erstellt. squatter cmd="squatter -r *" period=30}

Page 94: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Postfix

Damit unser Mailserver Postfix, der die Nachrichten von fremden Mailserver annimmt, bewertet und prüft, auch an unser internes Postoffice weiterleiten kann, sind noch Ergänzungen an der Konfiguration des Postfix-Mailservers notwendig.

Hier kommt es nun im Detail darauf an, auf welchen Hosts unser Postfix-SMTP-Server und wo der Cyrus-IMAP-Server betrieben wird.

MTA und MDA auf gleichem Host

Als erstes betrachten wir den ganzen Konfogurationsaufwand, wenn beide Server auf einem Host betrieben werden.

master.conf

In der /etc/postfix/master.cf ist für cyrus mit der Zustellmethode deliver bereits alles vorbereitet.

# vim /etc/postfix/master.cf...# Django : 2009-02-07 Aktiviert für MDA-Support cyrus aktiviert# Cyrus 2.1.5 (Amos Gouaux)# Also specify in main.cf: cyrus_destination_recipient_limit=1cyrus unix - n n - - pipe user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}...

main.cf

In der /etc/postfix/main.cf ändern wir nunmehr folgende Optionen ab.

# vim /etc/postfix/main.cf...# Django : 2009-02-07 Aktiviert für MDA-Support cyrus aktiviertmailbox_transport = cyruscyrus_destination_recipient_limit=1...

MTA und MDA auf getrennten Hosts

Laufen die beiden Mailserverkomponenten auf getrennten Hosts, so ist der nötige Konfigurationsaufwand geringfügig größer. Nachfolgend gehen wir nun auf diese Details genauer ein.

main.cf

Für die individuelle Weiterleitung unserer Nachrichten benutzen wir die beiden Lookup-Tabellen:

1. transport_maps2. relay_domains

Im ersten Schritt erweitern wir nun unsere Postfix-Konfigurationsdatei um folgende Zeilen. Hierzu nutzen wir wie immer den Editor unserer Wahl, so z.B. vim.

# vim /etc/postfix/main.cf# Django : 2012-02-06# Zur Weitergabe der angenommenen Nachrichten an das backend-System (Cyrus-IMAP-Server) verwenden wir# eine separate Tabelle zur individuellen Weiterleitung. relay_domains = btree:/etc/postfix/relay_domains 

Page 95: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Lookup-Tabelle zum Aktivieren einer alternativen Mailrouting bei der Zustellung an einen weiteren Mailservertransport_maps = btree:/etc/postfix/transport_maps, btree:/etc/postfix/relay_domains

Die gerade definierten Lookup-Tabellen legen wir nun als nächstes an.

1. transport_maps: Lookup-Tabelle zum Aktivieren einer alternativen Mailrouting bei der Zustellung an einen weiteren Mailserver

# vim /etc/postfix/transport_maps# Kapitel 5.2.5 transport-Tabelle: Abweichende Zustellung# Lookup-Tabelle zum Aktivieren einer alternativen Mailrouting bei der Zustellung an einen weiteren Mailserver# Nach dem Ändern und/oder Erweitern der Tabelle, muß noch mittels $ postmap /etc/postfix/transport_maps# die zugehörige Datenbank erzeugt werden.## Alle eMails, die an Subdomains von nausch.org gerichtet sind ("." am Anfang der Zeile!)# werden an den/die Mailserver von intra.nausch.org (MX-Records) weitergeleitet. (keine "["-Klammern!)#.nausch.org smtp:intra.nausch.org # Mails an backup.nausch.org werden an den Mailserver (A-Record) auf Port 25 mit Namen mail.intra.nausch.org geschickt.#backup.nausch.org smtp:[mail.intra.nausch.org]:25

2. relay_domains: Lookup-Tabelle zur Definition der Domänen, für die unser Mailserver Nachricht annehmen soll.

# vim /etc/postfix/relay_domains# Kapitel 12.1 Postfix als eingehendes Mailrelay vor einem anderen Server# Lookup-Tabelle zur Definition der Domänen, für die unser Mailserver Nachricht annehmen soll.# Nach dem Ändern und/oder Erweitern der Tabelle, muß noch mittels $ postmap /etc/postfix/relay_domains# die zugehörige Datenbank erzeugt werden.## Relevanz ost erst eimal nur die erste Spalte. Die zweite Spalte dient nur zum Erhalten der Tabellenstruktur und# kann daher z.B. als Hinweisfled zum Dokumentieren verwendet werden.# Beispiel:# omni128.de meine eigene Domäne

3. transport_maps UND relay_domains: Da wir sowieso beide Informationen benötigen können wir auch gleich direkt den jeweiligen Transportweg direkt in der zweiten Spalte der relay_domains-Tabelle hierzu verwenden.

# vim /etc/postfix/relay_domains# Kapitel 12.1 Postfix als eingehendes Mailrelay vor einem anderen Server# Lookup-Tabelle zur Definition der Domänenm für die unser Mailserver Nachricht annehmen soll.# Nach dem Ändern und/oder Erweitern der Tabelle, muß noch mittels $ postmap /etc/postfix/relay_domains# die zugehörige Datenbank erzeugt werden.## Relevanz ost erst eimal nur die erste Spalte. Die zweite Spalte dient nur zum Erhalten der Tabellenstruktur und# kann daher z.B. als Hinweisfled zum Dokumentieren verwendet werden.# Beispiel:# omni128.de meine eigene Domäne## Da für jede Domäne auch ein Transportweg definiert werden muss, erledigen wir die Definition des selbigen gleich # hier in dieser Tabelle, in dem wir die Spalte zwei hierzu verwenden.nausch.org lmtp:[imap.intra.nausch.org]:24

Page 96: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

omni128.de lmtp:[imap.intra.nausch.org]:24wetterstation-pliening.info lmtp:[imap.intra.nausch.org]:24ebersberger-liedersammlung.de lmtp:[imap.intra.nausch.org]:24

master.conf

In der /etc/postfix/master.cf ist für die Zustellung an unseren Cyrus-IMAP-Server mit dem Zustellprotokoll lmtp bereits alles vorbereitet.

# vim /etc/postfix/master.cf...local unix - n n - - local...

iptables-Paketfilterregeln

In der Regel wird unser IMAP-Hinter einer Firewall stehen und mit Hilfe von iptables abgesichert sein. Damit nun unser IMAP-Mailserver Anfragen auf den beiden Ports 143 und 993 auch annehmen kann, tragen wir in der zentralen Konfigurationsdatei /etc/sysconfig/iptables von iptables am Ende der INPUT-Regeln nachfolgende Zeilen ein.

vim /etc/sysconfig/iptables # Django : 2011-12-08 Port 143 (IMAP2) und 993 (IMAP over SSL) freigeschaltet -A INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 993 -j ACCEPT # end

Anschließend aktivieren wir die Änderungen an unserem Paketfilter, indem wir den Daemon durchstarten.

# service iptables restart iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]

Authentifizierungs-Konfiguration am IMAP-Server

Der Cyrus-IMAP-Server unterstützt bei der Authentifizierung der unterschiedlichen Nutzer mehrere Authentifizierungsmethoden.

Für weitergehende und tiefgreifende Erklärungen zu den Authentifizierungsmöglichkeiten mit Cyrus SASL, sei dem geneigtem Leser die überhaus hilfreiche Dokumentation von Authentifizierung mit Cyrus SASL von Peer Heinlein ans Herz gelegt!

Nachfolgend gehen wir auf die wichtigsten drei Varianten ein.

cyrus-sasl-plain: Nutzerauthentifizierung mit Hilfe von Klartextpassworten cyrus-sasl-md5: Nutzerauthentifizierung mit Hilfe von verschlüsselten Passwörtern (CRAM-MD5 oder DIGEST-MD5) cyrus-sasl-ldap: Nutzerauthentifizierung mit Anbindung an einen LDAP-Server

Mit Hilfe des Programms pluginviewer aus dem PRM cyrus-sasl können alle zur Verfügung stehenden und ladbaren SASL Plugins und deren Einstellungen angezeigt werden.

1. Ausgabe der auxprop-plugins

# pluginviewer -aInstalled auxprop mechanisms are:sasldbList of auxprop plugins followsPlugin "sasldb" , API version: 4

Page 97: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

supports store: yes

2. Ausgabe der Serverseitigen Authentifizierungsplugins (SASL)

# pluginviewer -sInstalled SASL (server side) mechanisms are:PLAIN LOGIN ANONYMOUS EXTERNALList of server plugins followsPlugin "plain" [loaded], API version: 4

SASL mechanism: PLAIN, best SSF: 0, supports setpass: nosecurity flags: NO_ANONYMOUSfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

Plugin "login" [loaded], API version: 4SASL mechanism: LOGIN, best SSF: 0, supports setpass: nosecurity flags: NO_ANONYMOUSfeatures:

Plugin "anonymous" [loaded], API version: 4SASL mechanism: ANONYMOUS, best SSF: 0, supports setpass: nosecurity flags: NO_PLAINTEXTfeatures: WANT_CLIENT_FIRST

3. Ausgabe der Clientseitigen Authentifizierungsplugins (SASL)

# pluginviewer -cInstalled SASL (client side) mechanisms are:PLAIN LOGIN ANONYMOUS EXTERNALList of client plugins followsPlugin "plain" [loaded], API version: 4

SASL mechanism: PLAIN, best SSF: 0security flags: NO_ANONYMOUSfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

Plugin "login" [loaded], API version: 4SASL mechanism: LOGIN, best SSF: 0security flags: NO_ANONYMOUSfeatures: SERVER_FIRST

Plugin "anonymous" [loaded], API version: 4SASL mechanism: ANONYMOUS, best SSF: 0security flags: NO_PLAINTEXTfeatures: WANT_CLIENT_FIRST

Plugin "EXTERNAL" [loaded], API version: 4SASL mechanism: EXTERNAL, best SSF: 0security flags: NO_ANONYMOUS|NO_PLAINTEXT|NO_DICTIONARYfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

cyrus-sasl-plain

Sofern noch nicht bei der Grundinstallation erfolgt, installieren wir nun das notwendige RPM mit Hilfe von yum.

# yum install cyrus-sasl-plain -y

Bei Bedarf verrät uns der Aufruf von rpm -qil die Inhalte, die wir mit Hilfe des RPM-Paketes installiert haben.

# rpm -qil cyrus-sasl-plainName : cyrus-sasl-plain Relocations: (not relocatable)Version : 2.1.23 Vendor: CentOSRelease : 13.el6 Build Date: Wed 07 Dec 2011 11:02:22 PM CETInstall Date: Wed 21 Dec 2011 09:11:29 AM CET Build Host: c6b18n3.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: cyrus-sasl-2.1.23-13.el6.src.rpmSize : 37616 License: BSDSignature : RSA/SHA1, Thu 08 Dec 2011 08:53:00 PM CET, Key ID 0946fca2c105b9de

Page 98: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Packager : CentOS BuildSystem <http://bugs.centos.org>URL : http://asg.web.cmu.edu/sasl/sasl-library.htmlSummary : PLAIN and LOGIN authentication support for Cyrus SASLDescription :The cyrus-sasl-plain package contains the Cyrus SASL plugins which supportPLAIN and LOGIN authentication schemes./usr/lib64/sasl2/liblogin.so/usr/lib64/sasl2/liblogin.so.2/usr/lib64/sasl2/liblogin.so.2.0.23/usr/lib64/sasl2/libplain.so/usr/lib64/sasl2/libplain.so.2/usr/lib64/sasl2/libplain.so.2.0.23

cyrus-sasl-md5

Sofern noch nicht bei der Grundinstallation erfolgt, installieren wir nun das notwendige RPM mit Hilfe von yum.

# yum install cyrus-sasl-md5 -y

Bei Bedarf verrät uns der Aufruf von rpm -qil die Inhalte, die wir mit Hilfe des RPM-Paketes installiert haben.

# rpm -qil cyrus-sasl-md5Name : cyrus-sasl-md5 Relocations: (not relocatable)Version : 2.1.23 Vendor: CentOSRelease : 13.el6 Build Date: Wed 07 Dec 2011 11:02:22 PM CETInstall Date: Wed 18 Jan 2012 11:16:58 PM CET Build Host: c6b18n3.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: cyrus-sasl-2.1.23-13.el6.src.rpmSize : 75024 License: BSDSignature : RSA/SHA1, Thu 08 Dec 2011 08:53:18 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://asg.web.cmu.edu/sasl/sasl-library.htmlSummary : CRAM-MD5 and DIGEST-MD5 authentication support for Cyrus SASLDescription :The cyrus-sasl-md5 package contains the Cyrus SASL plugins which supportCRAM-MD5 and DIGEST-MD5 authentication schemes./usr/lib64/sasl2/libcrammd5.so/usr/lib64/sasl2/libcrammd5.so.2/usr/lib64/sasl2/libcrammd5.so.2.0.23/usr/lib64/sasl2/libdigestmd5.so/usr/lib64/sasl2/libdigestmd5.so.2/usr/lib64/sasl2/libdigestmd5.so.2.0.23

cyrus-sasl-ldap

Sofern noch nicht bei der Grundinstallation erfolgt, installieren wir nun das notwendige RPM mit Hilfe von yum.

# yum install cyrus-sasl-ldap -y

Bei Bedarf verrät uns der Aufruf von rpm -qil die Inhalte, die wir mit Hilfe des RPM-Paketes installiert haben.

# rpm -qil cyrus-sasl-ldapName : cyrus-sasl-ldap Relocations: (not relocatable)Version : 2.1.23 Vendor: CentOSRelease : 13.el6 Build Date: Wed 07 Dec 2011 11:02:22 PM CETInstall Date: Wed 18 Jan 2012 11:19:41 PM CET Build Host: c6b18n3.bsys.dev.centos.org

Page 99: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Group : System Environment/Libraries Source RPM: cyrus-sasl-2.1.23-13.el6.src.rpmSize : 18784 License: BSDSignature : RSA/SHA1, Thu 08 Dec 2011 08:53:06 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://asg.web.cmu.edu/sasl/sasl-library.htmlSummary : LDAP auxprop support for Cyrus SASLDescription :The cyrus-sasl-ldap package contains the Cyrus SASL plugin which supports usinga directory server, accessed using LDAP, for storing shared secrets./usr/lib64/sasl2/libldapdb.so/usr/lib64/sasl2/libldapdb.so.2/usr/lib64/sasl2/libldapdb.so.2.0.23

Prüfung

Mit Hilfe des Programms pluginviewer aus dem PRM cyrus-sasl überprüfen wir nun erneut, welche SASL-Plugins nun zur Verfügung stehen und geladen werden können.

SASL Server-Plugins # pluginviewer -sInstalled SASL (server side) mechanisms are:PLAIN LOGIN ANONYMOUS CRAM-MD5 DIGEST-MD5 EXTERNALList of server plugins followsPlugin "plain" [loaded], API version: 4

SASL mechanism: PLAIN, best SSF: 0, supports setpass: nosecurity flags: NO_ANONYMOUSfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

Plugin "login" [loaded], API version: 4SASL mechanism: LOGIN, best SSF: 0, supports setpass: nosecurity flags: NO_ANONYMOUSfeatures:

Plugin "anonymous" [loaded], API version: 4SASL mechanism: ANONYMOUS, best SSF: 0, supports setpass: nosecurity flags: NO_PLAINTEXTfeatures: WANT_CLIENT_FIRST

Plugin "crammd5" [loaded], API version: 4SASL mechanism: CRAM-MD5, best SSF: 0, supports setpass: nosecurity flags: NO_ANONYMOUS|NO_PLAINTEXTfeatures: SERVER_FIRST

Plugin "digestmd5" [loaded], API version: 4SASL mechanism: DIGEST-MD5, best SSF: 128, supports setpass: nosecurity flags: NO_ANONYMOUS|NO_PLAINTEXT|MUTUAL_AUTHfeatures: PROXY_AUTHENTICATION

SaSL Client-Plugins # pluginviewer -cInstalled SASL (client side) mechanisms are:PLAIN LOGIN ANONYMOUS CRAM-MD5 DIGEST-MD5 EXTERNALList of client plugins followsPlugin "plain" [loaded], API version: 4

SASL mechanism: PLAIN, best SSF: 0security flags: NO_ANONYMOUSfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

Plugin "login" [loaded], API version: 4SASL mechanism: LOGIN, best SSF: 0security flags: NO_ANONYMOUSfeatures: SERVER_FIRST

Plugin "anonymous" [loaded], API version: 4SASL mechanism: ANONYMOUS, best SSF: 0security flags: NO_PLAINTEXTfeatures: WANT_CLIENT_FIRST

Plugin "crammd5" [loaded], API version: 4SASL mechanism: CRAM-MD5, best SSF: 0security flags: NO_ANONYMOUS|NO_PLAINTEXTfeatures: SERVER_FIRST

Plugin "digestmd5" [loaded], API version: 4

Page 100: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

SASL mechanism: DIGEST-MD5, best SSF: 128security flags: NO_ANONYMOUS|NO_PLAINTEXT|MUTUAL_AUTHfeatures: PROXY_AUTHENTICATION|NEED_SERVER_FQDN

Plugin "EXTERNAL" [loaded], API version: 4SASL mechanism: EXTERNAL, best SSF: 0security flags: NO_ANONYMOUS|NO_PLAINTEXT|NO_DICTIONARYfeatures: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION

Authentifizierungs-Konfiguration am OpenLDAP-Server

Speicherung von Passwörtern

Bevor wir uns nun an die Konfiguration der SASL-Unterstützung am OpenLDAP-Server machen, wollen wir uns noch kurz überlegen, wie wir die Passworte in der Datenbank ablegen. Die vermutlich vordergründigste, oft geübte und gängige Praxis ist wohl die Passworte nicht direkt in der Datenbank abzulegen, sondern gehashte Speicherungen vorzunehmen. Die Passworte in der /etc/shadow ist eine gängige Variante dieses Vorgehends.

# grep django /etc/shadow django:$6$h6QWOPz5$053ur$Ch1kiS731nV0lLD3pPYQf1p0vk72XgPinPXjn32ZQmlTR0HRfB4aPelNJ1CFYF9pT3qt97bbSVUnxrB1:15187:0:99999:7:::

Will nun der Server bei der Anmeldung überprüfen benötigt er was? Genau das Passwort in Klartext! denn Nur so ist er in der Lage, den Passworthash des übermittelten Klartextpasswortes mit dem Hash in seiner Datenbank zu vergleichen. Ist nun jemand in der Lage die Übertragung zu kompromittieren, hält er unweigerlich die Anmeldedaten in Händen. Und wer will das? Keiner!

Mit Hilfe von CRAM5) haben wir nun ein Authentifizierungsverfahren an der Hand, mit der wir das Vorgenannte Problem mit der Übertragung eines Passwortes elegant umschiffen. Denn beim Anmeldevorgang erzeugt der Server bei der Clientanfrage einen individuellen Sitzungsschlüssel, das Challenge, welches der Server zum Client überträgt. Client und Server führen nun eine mathematische Operation mit dem nur ihnen bekannten Passwort durch. Das Rechenergebnis übermittelt der Client an den Server, der den empfangenen Wert mit seinem errechneten Ergebnis der zuvor angestellten Operation vergleicht. Stimmen die Ergebnisse überein, so kann der Server mit davon ausgehen, dass hat der Client das richtige Passwort kennt und verwendet! Ein Abhören der Leitung bringt nichts, da sich bei jeder Sitzung der Challenge-Wert ändert - ein abgefangenens Challenge ist für künftige Loginversuche daher völlig wertlos!

Damit unser Server auch wirklich sichere Authentifizierungsmethoden anbieten kann, ist es notwendig die Passworte der Nutzer in der Datenbank in Klartext abzulegen.

Nur so ist sichergestellt, dass die Passworte nie über das Internet übertragen werden müssen. Denn dort liegt das größte Bedrohungspotential. Unser Postmaster und Netzwerkadministrator hat auch ohne Passwort jederzeit die Möglichkeit auf Daten der Nutzer zuzugreifen!

SASL-Unterstützung am OpenLDAP-Server

Da wir zur Nutzerverwaltung beim Cyrus-IMAP-Server auf unser zentralen Verzeichnisdienst OpenLDAP zurückgreifen wollen, müssen wir noch die Konfiguration am zentralen LDAP-server erweiteren. Ein bereits installieren und funktionsfähigen LDAP-Server wird bei der weiteren Konfiguration vorausgesetzt.

Der Cyrus-IMAP-Mailserver, bietet mehrere Verfahren zur Authentifizierung der einzelnen Benutzer bzw. eMail-Konten an. Bei unserer Installation wollen wir auf die folgenden beiden Methoden zurückgreifen:

1. Authentifizierung durch „Klartext“-Passwörter 2. Authentifizierung durch „MD5-Verschlüsselten“-Passwörter (CRAM-MD5 und DIGEST-MD5)

Page 101: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Installation

Für die Realisierung der Authentifizierungsmethode benötigen wir nun die betreffenden RPM-Pakete aus dem Base-Repository von CentOS 6.x, die wir mit Hilfe der Paketmanager yum installieren.

1. cyrus-sasl-plain

# yum install cyrus-sasl-plain -y

Bei Bedarf informieren wir uns mit Hilfe des Aufrufes rpm -qil darüber, was genau nun dieses Paket bei der Installation mitbrachte.

# rpm -qil cyrus-sasl-plainName : cyrus-sasl-plain Relocations: (not relocatable)Version : 2.1.23 Vendor: CentOSRelease : 13.el6 Build Date: Wed 07 Dec 2011 11:02:22 PM CETInstall Date: Thu 09 Feb 2012 08:52:57 PM CET Build Host: c6b18n3.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: cyrus-sasl-2.1.23-13.el6.src.rpmSize : 37616 License: BSDSignature : RSA/SHA1, Thu 08 Dec 2011 08:53:00 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://asg.web.cmu.edu/sasl/sasl-library.htmlSummary : PLAIN and LOGIN authentication support for Cyrus SASLDescription :The cyrus-sasl-plain package contains the Cyrus SASL plugins which supportPLAIN and LOGIN authentication schemes./usr/lib64/sasl2/liblogin.so/usr/lib64/sasl2/liblogin.so.2/usr/lib64/sasl2/liblogin.so.2.0.23/usr/lib64/sasl2/libplain.so/usr/lib64/sasl2/libplain.so.2/usr/lib64/sasl2/libplain.so.2.0.23

2. cyrus-sasl-md5

# yum install cyrus-sasl-md5 -y

Bei Bedarf informieren wir uns mit Hilfe des Aufrufes rpm -qil darüber, was genau nun dieses Paket bei der Installation mitbrachte.

# rpm -qil cyrus-sasl-md5Name : cyrus-sasl-md5 Relocations: (not relocatable)Version : 2.1.23 Vendor: CentOSRelease : 13.el6 Build Date: Wed 07 Dec 2011 11:02:22 PM CETInstall Date: Thu 09 Feb 2012 09:00:51 PM CET Build Host: c6b18n3.bsys.dev.centos.orgGroup : System Environment/Libraries Source RPM: cyrus-sasl-2.1.23-13.el6.src.rpmSize : 75024 License: BSDSignature : RSA/SHA1, Thu 08 Dec 2011 08:53:18 PM CET, Key ID 0946fca2c105b9dePackager : CentOS BuildSystem <http://bugs.centos.org>URL : http://asg.web.cmu.edu/sasl/sasl-library.htmlSummary : CRAM-MD5 and DIGEST-MD5 authentication support for Cyrus SASLDescription :The cyrus-sasl-md5 package contains the Cyrus SASL plugins which supportCRAM-MD5 and DIGEST-MD5 authentication schemes./usr/lib64/sasl2/libcrammd5.so/usr/lib64/sasl2/libcrammd5.so.2/usr/lib64/sasl2/libcrammd5.so.2.0.23/usr/lib64/sasl2/libdigestmd5.so/usr/lib64/sasl2/libdigestmd5.so.2

Page 102: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/lib64/sasl2/libdigestmd5.so.2.0.23

Anschließend starten wir unseren OpenLDAP-Server einmal durch.

# service slapd restart Stopping slapd: [ OK ] Starting slapd: [ OK ]

Fragen wir nun die unterstützten SASL-Mechanismen ab, so werden uns die beiden gerade installierten Cyrus-SASL-Mechanismen, angeboten. Hierzu verwenden wir folgenden Aufruf:

# ldapsearch -LLL -ZZ -x -H ldap://ldap.dmz.nausch.org -s "base" -b "" -W -D "cn=Manager,dc=nausch,dc=org" supportedSASLMechanismsEnter LDAP Password: dn:supportedSASLMechanisms: DIGEST-MD5supportedSASLMechanisms: PLAINsupportedSASLMechanisms: CRAM-MD5supportedSASLMechanisms: LOGIN

SASL Authentifizierung mit technischem User

Wie schon bei der Konfiguration des OpenLDAP-Servers, wollen wir bei der SASL-Authentifizierung einen technischen User verwenden. Wir legen uns daher im ersten Schritt einen eigenen speziellen technischen User an, mit dem später die Anfragen an unseren OpenLDAP-Server gerichtet werden sollen.

SASLAuthenticationUser

Der Einfachheit halber wollen wir hierzu folgenden User in unserem DIT6) hinterlegen:

uid=SASLAuthenticationUser,dc=nausch,dc=org

Zur sicheren Übertragung des Anmeldeschlüssels, speichern wir auch dieses Passwort des technischen Useres in Klartext in der Datenbank ab. Hierzu stellen wir die Verschlüsselung der Passworte von SSHA von CLEARTEXT um. Hierzu legen wir uns eine Konfigurationsdatei im *.LDIF-Format mit nachfolgendem Inhalt an.

# vim /etc/openldap/ldif/password-hash.ldif/etc/openldap/ldif/password-hash.ldif

dn: olcDatabase={-1}frontend,cn=configdelete: olcPasswordHasholcPasswordHash: {SSHA}-add: olcPasswordHasholcPasswordHash: {CLEARTEXT}

Die Daten aus dieser *.LDIF-Datei übetragen wir nun in den DIT7) unseres OpenLDAP-Servers.

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/password-hash.ldif Enter LDAP Password: modifying entry "olcDatabase={-1}frontend,cn=config"

Die Konfiguration unseres technischen Users nehmen wir nun auch mit Hilfe einer *.LDIF-Datei vor. Hierzu legen wir uns folgende Datei an.

# vim /etc/openldap/ldif/SASLAuthenticationUser.ldif/etc/openldap/ldif/SASLAuthenticationUser.ldif

dn: uid=SASLAuthenticationUser,dc=nausch,dc=orgcn: SASLAuthenticationUser

Page 103: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

sn: SASLAuthenticationUseruid: SASLAuthenticationUserobjectClass: inetOrgPersonobjectClass: simpleSecurityObjectobjectClass: topuserPassword: Klausi-is-a-G33k!structuralObjectClass: inetOrgPersonauthzTo: ldap:///dc=nausch,dc=org??sub?(objectClass=*)

Bevor wir nun die gerade erstellte *.LDIF-Datei in unseren OpenLDAP-server übertragen können, ist es notwendig den Daemon zu stoppen.

# service slapd stop Stopping slapd: [ OK ]

Anschließend übertragen wir die Daten aus der *.LDIF-Datei in den DIT8) unseres OpenLDAP-Servers.

# slapadd -v -l /etc/openldap/ldif/SASLAuthenticationUser.ldif added: "uid=SASLAuthenticationUser,dc=nausch,dc=org" (0000000a) _#################### 100.00% eta none elapsed none fast! Closing DB...

Zum Schluß starten wir unseren OpenLDAP-Server wieder!

# service slapd start Starting slapd: [ OK ]

SASL-Mappings

Damit der OpenLDAP-Server überhaupt mit SASL Anfragen umgehen kann, müssen noch zwei Erweiterungen vorgenommen werden.

Weiterführend informationen findet man im Kapitel DIGEST-MD5, wie auch im Mapping Authentication Identities des OpenLDAP-admin Guides

1. olcAuthzRegexp Hierzu legen wir uns eine Konfigurationsdatei im *.LDIF-Format mit nachfolgendem Inhalt an.

# vim /etc/openldap/ldif/authz-regexp.ldif/etc/openldap/ldif/authz-regexp.ldif

dn: cn=configchangetype: modifyadd: olcAuthzRegexpolcAuthzRegexp: uid=([^,@]*) ldap:///dc=nausch,dc=org??sub?(&(uid=$1)(objectClass=*))

Die Daten aus dieser *.LDIF-Datei übetragen wir nun in den DIT9) unseres OpenLDAP-Servers.

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/authz-regexp.ldifEnter LDAP Password: modifying entry "cn=config"

2. olcAuthzPolicy Hierzu legen wir uns eine Konfigurationsdatei im *.LDIF-Format mit nachfolgendem Inhalt an.

# vim /etc/openldap/ldif/authz-policy.ldif/etc/openldap/ldif/authz-policy.ldif

dn: cn=configchangetype: modifydelete: olcAuthzPolicyolcAuthzPolicy: none

Page 104: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

-add: olcAuthzPolicyolcAuthzPolicy: to

Die Daten aus dieser *.LDIF-Datei übetragen wir nun in den DIT10) unseres OpenLDAP-Servers.

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/authz-policy.ldifEnter LDAP Password: modifying entry "cn=config"

Zum Schluß überprüfen wir nun noch, ob die beiden Konfigurationsänderungen von unserem OpenLDAP-Server auch wirklich akzeptiert wurden.

# ldapsearch -W -x -D cn=config -b cn=config "(objectclass=olcGlobal)" | grep olcAuth

Nach der Eingabe des oben gezeigten Befehles, geben wir noch das Passwort für unseren OpenLDAP-Server ein und erhalten dann als Antwort:

olcAuthzPolicy: to olcAuthzRegexp: {0}uid=([^,@]*) ldap:///dc=nausch,dc=org??sub?(&(uid=$1)(objectClass=*))

SASL-Access-Rights

Bevor wir uns nun daran machen, die Zugriffsrechte auf die Benutzerstrukturen in unserem DIT11) zu erweitern, sehen wir erst noch einmal an, welche Informationen aktuell gespeichert sind.

# ldapsearch -W -x -D cn=config -b olcDatabase={-1}frontend,cn=configEnter LDAP Password: # extended LDIF## LDAPv3# base <olcDatabase={-1}frontend,cn=config> with scope subtree# filter: (objectclass=*)# requesting: ALL# # {-1}frontend, configdn: olcDatabase={-1}frontend,cn=configolcPasswordHash: {CLEARTEXT}objectClass: olcDatabaseConfigobjectClass: olcFrontendConfigolcDatabase: {-1}frontendolcAccess: {0}to attrs=userPassword,shadowLastChange,shadowMax,shadowWarning by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by anonymous auth by * noneolcAccess: {1}to dn="cn=Manager,dc=nausch,dc=org" by self write by * noneolcAccess: {2}to dn="cn=Technischeruser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * noneolcAccess: {3}to dn.regex="cn=([^,]+),ou=Group,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: {4}to dn.regex="uid=([^,]+),ou=People,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess:: ezV9dG8gKiAgYnkgc23ursCh1kiS731nV0lLD3pPVsZiB3cml0ZSAgYnkgZG4uYmFz1uYXVzY2gsZGM9b3JnIiB3cml0ZSAgYnkgKiByZWFkIA==olcAddContentAcl: FALSEolcLastMod: TRUEolcMaxDerefDepth: 0olcReadOnly: FALSEolcSchemaDN: cn=SubschemaolcMonitoring: FALSE 

Page 105: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Da wir die Konfiguration unseres OpenLDAP-Servers nicht mit Hilfe von Konfigurationsdateien vorgenommen haben, sondern die Konfiguration im OpenLDAP-Server selbst vorhalten, importieren wir auch hier unsere neuen SASL-Access-Rights mit Hilfe einer kleinen ldif-Hilfsdatei. Diese Datei legen wir im Verzeichnis /etc/openldap/ldif ab.

# vim /etc/openldap/ldif/SASL-Access-Rights.ldif/etc/openldap/ldif/SASL-Access-Rights.ldif

dn: olcDatabase={-1}frontend,cn=configdelete: olcAccessolcAccess: {0}olcAccess: {1}olcAccess: {2}olcAccess: {3}olcAccess: {4}olcAccess: {5}-add: olcAccessolcAccess: to attrs=userPassword,shadowLastChange,shadowMax,shadowWarning by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by anonymous auth by * noneolcAccess: to dn="cn=Manager,dc=nausch,dc=org" by self write by * noneolcAccess: to dn="cn=Technischeruser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * noneolcAccess: to dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * autholcAccess: to dn.regex="cn=([^,]+),ou=Group,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: to dn.regex="uid=([^,]+),ou=People,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=nausch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: to * by self write by dn.base="cn=manager,dc=nausch,dc=org" write by * read

Anschließend ändern und aktivieren wir nun die Konfiguration unseres OpenLDAP-Servers, indem wir die gerade angelegte *.LDIF-Datei einspielen.

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/SASL-Access-Rights.ldif Enter LDAP Password: modifying entry "olcDatabase={-1}frontend,cn=config"

Abschließend überprüfen wir ob unsere Änderungen übernommen wurden.

# ldapsearch -W -x -D cn=config -b olcDatabase={-1}frontend,cn=configEnter LDAP Password:# extended LDIF## LDAPv3# base <olcDatabase={-1}frontend,cn=config> with scope subtree# filter: (objectclass=*)# requesting: ALL# # {-1}frontend, configdn: olcDatabase={-1}frontend,cn=config

Page 106: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

olcPasswordHash: {CLEARTEXT}objectClass: olcDatabaseConfigobjectClass: olcFrontendConfigolcDatabase: {-1}frontendolcAddContentAcl: FALSEolcLastMod: TRUEolcMaxDerefDepth: 0olcReadOnly: FALSEolcSchemaDN: cn=SubschemaolcMonitoring: FALSEolcAccess: {0}to attrs=userPassword,shadowLastChange,shadowMax,shadowWarning by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technisch eruser,dc=nausch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by anonymous auth by * noneolcAccess: {1}to dn="cn=Manager,dc=nausch,dc=org" by self write by * noneolcAccess: {2}to dn="cn=Technischeruser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * noneolcAccess: {3}to dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by * autholcAccess: {4}to dn.regex="cn=([^,]+),ou=Group,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc=na usch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: {5}to dn.regex="uid=([^,]+),ou=People,dc=nausch,dc=org" by self write by dn="cn=Manager,dc=nausch,dc=org" write by dn="cn=Technischeruser,dc= nausch,dc=org" read by dn="uid=SASLAuthenticationUser,dc=nausch,dc=org" read by dn.exact,expand="uid=$1,ou=People,dc=nausch,dc=org" read by * noneolcAccess: {6}to * by self write by dn.base="cn=manager,dc=nausch,dc=org" write by * read # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Programmstart

erster manueller Start

In RPM wird uns ein Startupscript mitgeliefert - über dieses starten wir unseren IMAP-Server.

# service cyrus-imapd start Importing cyrus-imapd databases: [ OK ] Starting cyrus-imapd: [ OK ]

Ob der Server läuft können wir einfach überprüfen.

# netstat -tulpen | grep 143 tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 0 122799 14383/cyrus-master tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 0 122805 14383/cyrus-master

Oder:

# lsof -i tcp:imap2 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME cyrus-mas 14383 cyrus 5u IPv4 122799 0t0 TCP *:imap (LISTEN) imapd 14390 cyrus 4u IPv4 122799 0t0 TCP *:imap (LISTEN) imapd 14394 cyrus 4u IPv4 122799 0t0 TCP *:imap (LISTEN) imapd 14396 cyrus 4u IPv4 122799 0t0 TCP *:imap (LISTEN) imapd 14398 cyrus 4u IPv4 122799 0t0 TCP *:imap (LISTEN) imapd 14399 cyrus 4u IPv4 122799 0t0 TCP *:imap (LISTEN)

Page 107: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Als weiteren Test verbinden wir uns einfach mit Hilfe des Befehles telnet auf Port 143. Nach Eingabe einer Sequenz-Nummer, in unserem Beispiel s001 verlassen wir mit dem Befehl logout wieder den IMAP-Server.

# telnet localhost 143 Connected to localhost. Escape character is '^]'. * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED COMPRESS=DEFLATE] vml000070.dmz.nausch.org Cyrus IMAP v2.3.16-Fedora-RPM-2.3.16-6.el6_1.4 server ready s001 logout * BYE LOGOUT received s001 OK Completed Connection closed by foreign host.

automatisches Starten des Dienste beim Systemstart

Damit nun unser IMAP-Mailserver beim Booten automatisch gestartet wird, nehmen wir noch folgende Konfigurationsschritte vor.

# chkconfig cyrus-imapd on

Anschließend überprüfen wir noch unsere Änderung:

# chkconfig --list | grep cyrus-imapd cyrus-imapd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

System-/Logintests

Einlieferung via LMTP

Genauso wie bei SMTP erfolgt bei LMTP12) erfolgt der Kommunikationsablauf mit Hilfe von Befehlen, wie

MAIL FROM RCPT TO DATA LHLO bei LMTP und HELO bzw. EHLO bei SMTP

Wir liefern nun unsere erste Nachricht auf dem Port 24 (LMTP Mail Delivery) ein. Unsere eMail wird dabei folgende Daten umfassen:

Einliefernder Host: vml000080.dmz.nausch.org Absenderadresse: [email protected] Empfänger: [email protected]

Wir bauen also eine Verbindung zu unserem IMAP-Server auf Port 24 auf.

# telnet localhost 24Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.220 imap.nausch.org server readyLHLO vml000080.dmz.nausch.org250-imap.nausch.org250-8BITMIME250-ENHANCEDSTATUSCODES250-PIPELINING250-SIZE250-STARTTLS250-AUTH EXTERNAL250 IGNOREQUOTA

Page 108: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

mail from:<[email protected]>250 2.1.0 okrcpt to:<[email protected]>250 2.1.5 okDATA354 go aheadFrom: [email protected]: [email protected]: TestmailDate: 2012-02-20 17:15

Ahoi,das ist eine Testmail, eingeliefert via telnet imap-server auf Port 24.250 2.1.5 Okquit221 2.0.0 byeConnection closed by foreign host.

imtest

Mit dem Programm imtest aus dem Paket cyrus-imapd-utils können wir sowohl den Zugriff auf unseren IMAP-Server testen, wie auch die Mailbox abfragen.

Logintest

Im ersten Schritt testen wir nun den Zugriff auf unseren IMAP-Server.

# imtest -p imap -a Django -m DIGEST-MD5 localhost

Mit der Zeichenfolge S: werden dabei die Meldungen des Servers und mit C: die Meldungen des Clients gekennzeichnet.

S: * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 SASL-IR COMPRESS=DEFLATE] imap.nausch.org server readyC: A01 AUTHENTICATE DIGEST-MD5S: + bm9uY2U9ImpSaFpFSC9ORjBOJ3ur$1Ck1$T31nR1eSs3nAr$eh0L3S2dSaXVaekJIQ2t2OWJ0RW9SbzROUsRTA9IixyZWFsbT0iaW1hcC5uYXVzY2gub3JnIixxb3A9ImF1dGgsYXV0aC1pbnQsYXV0aC1jb25mIixjaXBoZXI9InJjNC00MCxyYzQtNTYscmM0LGRlcywzZGVzIixtYXhidWY9NDA5NixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==Please enter your password: C: dXNlcm5sg54hbWU9ImluZ2UiLHJlYWJpbWFwLm5hdXNjaC5vcmciLG5vbmNlPSJqUmhaRUgvTkYwTlVSQVdgY2cEtnUml1WnpCSENrdjlidEVvUm80TlArbEUwPSIsY25vbmNlPSJMZjkybi9aSU1qVTRLdTUvb29hSzJJcjRVTFhhKzFBRFM5azF2QVB4d1BJPSIsbmM9MDAwMDAwMDEscW9wPWF1dGgtY29uZixjaXBoZXI9cmM0LG1heGJ1Zj0xMDI0LGRpZ2VzdC11cmk9ImltYXAvbG9jYWxob3N0IixyZXNwb25zZT00NGIwNWU4MGFkNWNhNTUzYTM3NmI5NjM5Nzg3NzU0ZA==S: + cnNwYXV0a$Up3Rg31leDAxYiN2U0ZWViZGMzZTNhZDZlMWE3YmZhODQ5NGRhODBlMw==C: S: A01 OK Success (privacy protection)Authenticated.Security strength factor: 128C: C01 CAPABILITYS: * CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 COMPRESS=DEFLATE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE SCAN IDLE LISTEXT LIST-SUBSCRIBED X-NETSCAPE URLAUTHS: C01 OK Completed

Das Beispiel zeigt einen erfolgreichen LOGIN bei unserem IMAP-Server. Mit der Sequenznummer 01 und dem Befehl LOGOUT melden wir uns vom IMAP-server wieder ab.

01 LOGOUT

Page 109: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

* BYE LOGOUT received01 OK CompletedConnection closed.

Mailboxabfrage

Im nächsten Schritt fragen wir die Mailbox ab. Hierzu melden wir uns wieder mit Hilfe von imtest an unserem IMAP-Server an.

# imtest -p imap -a Django -m DIGEST-MD5 localhost

Anschließend fragen wir unsere Testmailbox ab. Hierzu verwenden wir immer die folgende Notation: Sequenz-Nummer BEFEHL Als erstes lassen wir uns den Inhalt unserer Mailbox anzeigen:

01 LIST "" ** LIST (\HasChildren) "/" "INBOX"* LIST (\HasNoChildren) "/" "INBOX/achive"* LIST (\HasNoChildren) "/" "INBOX/inbox"01 OK Completed (0.000 secs 4 calls)

Dann fragen wir den Status unserer Mailbox ab:

02 SELECT INBOX* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] * 1 EXISTS* 1 RECENT* OK [UNSEEN 1] * OK [UIDVALIDITY 1329754509] * OK [UIDNEXT 2] * OK [NOMODSEQ] Sorry, modsequences have not been enabled on this mailbox* OK [URLMECH INTERNAL]02 OK [READ-WRITE] Completed

Im nächsten Schritt fragen wir den Status der Inbox ab, da wir wissen wollen, ob unsere Testnachricht auch erfolgreich eingestellt wurde.

03 STATUS INBOX (MESSAGES)* STATUS INBOX (MESSAGES 1)03 OK Completed

Unsere testnachricht befindet sich also in unserer Inbox und wir holen diese Nachricht ab und lassen uns diese somit am Bildschirm ausgeben.

04 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[])* 1 FETCH (FLAGS (\Recent) UID 1 RFC822.SIZE 330 BODY[] {330}Return-Path: <[email protected]>Received: from vml000080.dmz.nausch.org (localhost [127.0.0.1])

by imap.nausch.org with LMTPA; Mon, 20 Feb 2012 18:28:19 +0100

X-Sieve: CMU Sieve 2.3From: [email protected]: [email protected]: TestmailDate: 2012-02-20 17:15Message-ID: <[email protected]>

Ahoi,das ist eine Testmail, eingeliefert via telnet imap-server auf Port 24)04 OK Completed (0.000 sec)

Zum Schluß melden wir uns wieder von unserem IMAP-Server ab.

Page 110: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

05 LOGOUT* BYE LOGOUT received05 OK CompletedConnection closed.

Links Zurück zum Kapitel >>Mailserverinstallation unter CentOS 6<< Zurück zu >>Projekte und Themenkapitel<<

Absicherung des OpenLDAP-Servers - LDAPS-Konfiguration

Damit unser OpenLDAP-Server auch via ldaps erreichbar ist, werden wir in diesem Kapitel die Erstellung und Integration eines Server-Zertifikates sowie die nötigen Konfigurationsschritte näher betrachten.

Zertifikatserstellung

Für unseren OpenLDAP-Server werden wir ein Zertifikat von der freien Community-Zertifizierungsstelle CAcert. Selbstverständlich kann man sich auch selbst eine CA erstellen und ein selfsigned Zertifikat generieren. Die grundlegende Herangehensweise ist dabei die gleiche; wir werden uns bei der weiteren Betrachtung daher auf die CAcert-Variante beziehen.

privaten Schlüssel generieren

Als erstes generieren wir uns einen privaten Schlüssel.

# openssl genrsa -out /etc/pki/tls/private/private.key 2048 Generating RSA private key, 2048 bit long modulus ................................................................................+++ ..+++ e is 65537 (0x10001)

Über die Dateiberechtigung schützen wir die Datei vor fremden Blicken.

# chmod 400 /etc/pki/tls/private/private.key

Bei Bedarf kann man mit openssl rsa -in <keyfile> -noout -text die Schlüsseldatei öffnen und ausgeben lassen.

# openssl rsa -in /etc/pki/tls/private/private.key -noout -text

Zertifikatsregistrierungsanforderung

Damit von CAcert unser digitales Zertifikat erstellt werden kann, benötigen wir ein CSR1), eine Textzeichenfolge, die wir mit Hilfe der SSL-Software openssl auf unserem zu zertifizierenden Servers erzeugen. Mit Eingabe eines Punktes . erzeugen wir dabei ein leeres Feld.

# openssl req -new -key /etc/pki/tls/private/private.key -out /etc/pki/tls/misc/ldap.dmz.nausch.org.csrYou are about to be asked to enter information that will be incorporated

Page 111: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

into your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [XX]:DEState or Province Name (full name) []:BayernLocality Name (eg, city) [Default City]:PlieningOrganization Name (eg, company) [Default Company Ltd]:NauschOrganizational Unit Name (eg, section) []:.Common Name (eg, your name or your server's hostname) []:ldap.dmz.nausch.orgEmail Address []:[email protected] Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []:An optional company name []:

Auch hier passen wir die Dateiberechtigung des gerade erstellten CSR2) an.

# chmod 400 /etc/pki/tls/misc/ldap.dmz.nausch.org.csr

Den Inhalt unseres CSR, der gerade erstellten Datei, geben wir dann auf der Seite von CAcert im im Browserfenster bei der Bestellung ein.

Bei Bedarf können wir uns den Inhalt unseres CSR in lesbarer Form ausgeben lassen.

# openssl req -noout -text -in /etc/pki/tls/misc/ldap.dmz.nausch.org.csr

CAcert Server-Zertifikat

Von CAcert erhalten wir dann unser Zertifikat, welches wir in einer einfachen Textdatei auf unserem Server ablegen.

# vim /etc/pki/tls/certs/ldap.dmz.nausch.org.crt

Anschließend passen wir auch hier die Dateiberechtigungen an.

# chmod 400 /etc/pki/tls/certs/ldap.dmz.nausch.org.crt

Den Inhalt unseres CAcert-Zertifikates können wir mit folgenden Befehlsaufrufes lesbar ausgeben lassen.

# openssl req -noout -text -in /etc/pki/tls/misc/ldap.dmz.nausch.org.csr

CAcert Root-Zertifikat

Von CAcert laden wir uns das Class 1 Root-Zertifikat auf unseren Server.

# wget http://www.cacert.org/certs/root.crt

Anschließend überprüfen wir den Fingerprint des heruntergeladenen Root-Zertifikates.

# openssl x509 -noout -fingerprint -in /etc/pki/tls/certs/root.crt SHA1 Fingerprint=13:5C:EC:36:F4:9C:B8:E9:3B:1A:B2:70:CD:80:88:46:76:CE:8F:33

Diesen vergleichen wir mit den Angaben auf der Webseite von CAcert.

Page 112: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Konfiguration

Schlüsseldateien ablegen

Für unsere OpenLDAP-Installation legen wir uns am besten einen eigenen Unterordner unter /etc/pki an.

# mkdir -p /etc/pki/ldap/certs # mkdir -p /etc/pki/ldap/private

Anschließend legen wir dort die drei benötigten Dateien ab:

1. unseren Serverzertifikat : servercert.pem

# cp /etc/pki/tls/certs/ldap.dmz.nausch.org.crt /etc/pki/ldap/certs/servercert.pem

2. unseren Serverschlüssel : serverkey.pem und

# cp /etc/pki/tls/private/private.key /etc/pki/ldap/PRIVATE/serverkey.pem

3. das CA-Zertifikat : cacert.pem

# cp /etc/pki/tls/certs/root.crt /etc/pki/ldap/certs/cacert.pem

Abschließend passen wir noch die Datei- und Nutzerberechtigungen an.

1. # chown root:ldap /etc/pki/openldap/certs/* # chmod 640 /etc/pki/openldap/certs*2. # chown root:ldap /etc/pki/openldap/private/* # chmod 640 /etc/pki/openldap/private*

Anpassen der /etc/sysconfig/ldap (Server)

Damit unser OpenLDAP-Server zukünftig LDAPS auf Port 636 unter IPv4 zur verfügung stellen kann, bearbeiten wir nun die systemweite Konfigurationsdatei.

# vim /etc/sysconfig/ldap/etc/sysconfig/ldap

# Options of slapd (see man slapd)#SLAPD_OPTIONS=# Django : 2011-11-11 LDAPs - Konfiguration# default : SLAPD_OPTIONS=# Nur IPv4 Unterstützung aktiviertSLAPD_OPTIONS="-4" # options of slurpd (see man slurpd)# #SLURPD_OPTIONS= # At least one of SLAPD_LDAP, SLAPD_LDAPI and SLAPD_LDAPS must be set to 'yes'!## Run slapd with -h "... ldap:/// ..."# yes/no, default: yes#SLAPD_LDAP=yes # Run slapd with -h "... ldapi:/// ..."# yes/no, default: no#SLAPD_LDAPI=no # Run slapd with -h "... ldaps:/// ..."# yes/no, default: no#SLAPD_LDAPS=no

Page 113: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Django : 2011-11-11 LDAPs - Konfiguration# default : SLAPD_LDAPS=noSLAPD_LDAPS=yes # Run slapd with -h "... $SLAPD_URLS ..."# This option could be used instead of previous three ones, but:# - it doesn't overwrite settings of $SLAPD_LDAP, $SLAPD_LDAPS and $SLAPD_LDAPI options# - it isn't overwritten by settings of $SLAPD_LDAP, $SLAPD_LDAPS and $SLAPD_LDAPI options# example: SLAPD_URLS="ldapi:///var/lib/ldap_root/ldapi ldapi:/// ldaps:///"# default: empty#SLAPD_URLS="" # Maximum allowed time to wait for slapd shutdown on 'service ldap stop' (in seconds)#SLAPD_SHUTDOWN_TIMEOUT=3 # Parameters to ulimit called right before starting slapd# - use this to change system limits for slapd#SLAPD_ULIMIT_SETTINGS="" 

Nähere Informationen zu den möglichen Parametern entnehmen wir der zugehörigen Manpage. # man dlapd

LDAPS Konfiguration .LDIF

Da wir unsere Konfiguration des OpenLDAP-Servers mit Hilfe von .LDIF-Datreien realisiert haben, werden wir nun eine passende .LDIF-Datei erstellen und diese anschließend in das System importieren.

# vim /etc/openldap/ldif/TLS.ldif/etc/openldap/ldif/TLS.ldif

dn: cn=configchangetype: modifyadd: olcTLSCipherSuiteolcTLSCipherSuite: HIGH-add: olcTLSCertificateFileolcTLSCertificateFile: /etc/pki/openldap/certs/servercert.pem-add: olcTLSCertificateKeyFileolcTLSCertificateKeyFile: /etc/pki/openldap/private/serverkey.pem-add: olcTLSCACertificateFileolcTLSCACertificateFile: /etc/pki/openldap/certs/cacert.pem

Anschließend importieren wir unsere LDIF-Konfigurationsdatei in den laufenden OpenLDAP-Server

# ldapmodify -W -x -D cn=config -f /etc/openldap/ldif/TLS.ldif Enter LDAP Password: modifying entry "cn=config"

Mit einer LDAP-Suche im OpenLDAP-Server mit dem CommonNAme config können wir uns davon überzeugen, dass der Import entsprechend geklappt hat.

# ldapsearch -W -x -D cn=config -b cn=config "(objectclass=olcGlobal)"Enter LDAP Password:# extended LDIF## LDAPv3# base <cn=config> with scope subtree# filter: (objectclass=olcGlobal)# requesting: ALL#

Page 114: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 # configdn: cn=configobjectClass: olcGlobalcn: configolcConfigFile: /etc/openldap/slapd.confolcConfigDir: /etc/openldap/slapd.dolcAllows: bind_v2olcArgsFile: /var/run/openldap/slapd.argsolcAttributeOptions: lang-olcAuthzPolicy: noneolcConcurrency: 0olcConnMaxPending: 100olcConnMaxPendingAuth: 1000olcDisallows: bind_anonolcGentleHUP: FALSEolcIdleTimeout: 15olcIndexSubstrIfMaxLen: 4olcIndexSubstrIfMinLen: 2olcIndexSubstrAnyLen: 4olcIndexSubstrAnyStep: 2olcIndexIntLen: 4olcLocalSSF: 71olcLogLevel: StatsolcPidFile: /var/run/openldap/slapd.pidolcReadOnly: FALSEolcReferral: ldap://ldap.dmz.nausch.orgolcRequires: authcolcReverseLookup: FALSEolcSaslSecProps: noplain,noanonymousolcSockbufMaxIncoming: 262143olcSockbufMaxIncomingAuth: 16777215olcThreads: 16olcTLSCRLCheck: noneolcTLSVerifyClient: neverolcToolThreads: 1olcWriteTimeout: 0olcTLSCipherSuite: HIGHolcTLSCertificateFile: /etc/pki/openldap/certs/servercert.pemolcTLSCertificateKeyFile: /etc/pki/openldap/private/serverkey.pemolcTLSCACertificateFile: /etc/pki/openldap/certs/cacert.pem # search resultsearch: 2result: 0 Success # numResponses: 2# numEntries: 1

Aktivierung der OpenLDAP-Konfiguration

Damit nun unser OpenLDAP-server auch wirklich LDAPS sprechen kann müssen wir diesen nun einmal durchstarten.

# service slapd restart Stopping slapd: [ OK ] Starting slapd: [ OK ]

Ob nun der OpenLDAP-Server auch auf den beiden Ports 389 und 636 lauscht überprüfen wir mit Hilfe des Programmes netstat.

# netstat -tulpen | grep slapd tcp 0 0 0.0.0.0:636 0.0.0.0:* LISTEN 0 65657 27311/slapd tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 0 65655 27311/slapd

Page 115: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Unser verwendetes CAcert Serverzertifikat können wir mit Hilfe von openssl überprüfen.

# openssl s_client -connect ldap.dmz.nausch.org:636 -showcerts -state -CAfile /etc/pki/openldap/certs/cacert.pem -cert /etc/pki/openldap/certs/servercert.pem -key /etc/pki/openldap/private/serverkey.pemCONNECTED(00000003)SSL_connect:before/connect initializationSSL_connect:SSLv2/v3 write client hello ASSL_connect:SSLv3 read server hello Adepth=1 O = Root CA, OU = http://www.cacert.org, CN = CA Cert Signing Authority, emailAddress = [email protected] return:1depth=0 CN = ldap.dmz.nausch.orgverify return:1SSL_connect:SSLv3 read server certificate ASSL_connect:SSLv3 read server done ASSL_connect:SSLv3 write client key exchange ASSL_connect:SSLv3 write change cipher spec ASSL_connect:SSLv3 write finished ASSL_connect:SSLv3 flush dataSSL_connect:SSLv3 read server session ticket ASSL_connect:SSLv3 read finished A---Certificate chain 0 s:/CN=ldap.dmz.nausch.org i:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/[email protected] CERTIFICATE-----MIIE4TCCAsmgAwIBAgIDCvFhMA0GCSqGSIb3DQEBBQUAMHkxEDAOBgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9ydEBjYWNlcnQub3JnMB4XDTExMTExMDIxMTMyMFoXDTEzMTEwOTIxMTMyMFowHjEcMBoGA1UEAxMTbGRhcC5kbXoubmF1c2NoLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMm8BoT246isZpY6mz+VU6WQS75NHJBSuYQcrh1O8JuheAq32XpVRqO4uIEhAcyrqMjR2Sjg4XqOlx39mAtbnvN1Era7Cb2geTNRQsagmINA2LOu7zt4CsKE92KdQhgohnS/Tm6K4I5ssXMFK1UhtCD9uu2eBFNYNgWHf0B7AVRVh3yXo+bUbTL0Lt2CSpA0dnNauT+rPpC3gOjaEXEtOFOIMOtIz+UkCxLsXh1baG3Hjgiohq8EfN9yrlg7wpNo2b1IUWaqIYEkcl0l+f9+eCPIkMgw2PhR4e4Xlw8h2ffd/CfwTFeNYH37bJ8JvSd2PWzpcZsosMCqblOdjkz1XE8CAwEAAaOBzDCByTAMBgNVHRMBAf8EAjAAMDQGA1UdJQQtMCsGCCsGAQUFBwMCBggrBgEFBQcDAQYJYIZIAYb4QgQBBgorBgEEAYI3CgMDMAsGA1UdDwQEAwIFoDAzBggrBgEFBQcBAQQnMCUwIwYIKwYBBQUHMAGGF2h0dHA6Ly9vY3NwLmNhY2VydC5vcmcvMEEGA1UdEQQ6MDiCE2xkYXAuZG16Lm5hdXNjaC5vcmegIQYIKwYBBQUHCAWgFQwTbGRhcC5kbXoubmF1c2NoLm9yZzANBgkqhkiG9w0BAQUFAAOCAgEAk4eKyTcz/uoK4cXvG6GaZzfBp+iohwE/KeLsmLI1LN0XUfouIOhfV6vNnRoH+Odus+wy25FRbnYAYKJNPCyIY9iH5iKH988rx2oQ+XtVUHuD0dOOuDi4fIhXyXjfPGYJ3hI5TYTH7eU2bv+2egNr0dnrgOZPgN9ql1yPH7moM+8I7zMYrISUzjGdvJNpXIXQlvu/jLRCtJRUoDfa5CYK5XjxGrCdWFupMUYujcKNvnhOPLtcy5C7L0HfYfjNvYMDGFhBgho74mX5Z7qkQw6chQwdSoDENsHxdQOaAkGjubQ6wEaI36BN4IG7zu4nSI1sn0r76JBOeeAglLJnGT7+y0CPnExuo/Pa8hzdN4S6BlSKHU0vvfk3FxEQZ3osV0aIzr+8qPTK7CmsDLplZfvvUiWJ8XduutiBvmSeAWX0dufY8AtlyoGTZRSGo3dvLK1rxvElxRQrFP2y7HN7NhMl2MjyHRW92nJoet4HRnL+mEZW0FmLYPD/FzD1axYf5bwcgz8fQuJSD3dXPpSWhsqVODFfGhQPQwPLaKTlPj32C6BqHcWBpUWddyF3hAzLolNmgWYZnCXru0GDJ/qrm/z7NFQWTSLpeU4SW4auT1CdPEwqXapAvRxcerm6xUHomoBrm5Rp+yTnbOoL4CPhuT8bNJimazTFTaNZRfP4g5lnaak=-----END CERTIFICATE----- 1 s:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/[email protected] i:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/[email protected] CERTIFICATE-----MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAOBgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC

Page 116: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42yfk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jcG8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4kepKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43qlaegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQQUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivUfslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4wggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGYgBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRwczovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYlaHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhCAQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQgb3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIBACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCcnWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/cgr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBlJzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvYsONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+TSCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYFCpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwumGCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzkzk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmWomTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD-----END CERTIFICATE--------Server certificatesubject=/CN=ldap.dmz.nausch.orgissuer=/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/[email protected] client certificate CA names sent---SSL handshake has read 3445 bytes and written 439 bytes---New, TLSv1/SSLv3, Cipher is AES256-SHAServer public key is 2048 bitSecure Renegotiation IS supportedCompression: zlib compressionExpansion: zlib compressionSSL-Session: Protocol : TLSv1 Cipher : AES256-SHA Session-ID: 9501557C4CDF9E555B52430A74226B9E2C8F28C4DCC81786E8BC092BB4694CD7 Session-ID-ctx: Master-Key: C17E92622EF087873AB9D3D13AAE9DB96D41491C2D97CBA0B95F0FF16A219FE51AF3A559E7AE1666FAD5B54602EE4778 Key-Arg : None Krb5 Principal: None PSK identity: None PSK identity hint: None TLS session ticket: 0000 - 89 36 bc f1 45 7d 8b de-23 88 7b 01 2e ba e6 8b .6..E}..#.{..... 0010 - 38 72 be ca c8 37 cf e0-56 16 eb 8f be 54 f3 91 8r...7..V....T.. 0020 - 7e c6 f6 eb 1a 82 b8 87-8b 5c 10 ef 2c 4a 8b ef ~........\..,J.. 0030 - cc 55 03 dd 6b 25 77 7e-81 68 c7 f2 01 fc 23 e2 .U..k%w~.h....#. 0040 - 98 88 8b a7 69 e6 79 6b-ae ae 77 54 f2 7e ab 54 ....i.yk..wT.~.T 0050 - 70 e1 5a 31 98 b9 dd 42-4a 64 cd 2f e6 d5 2f 77 p.Z1...BJd./../w 0060 - 0d 6d 5f 44 c0 bc fa 85-9b 38 ba 53 68 06 4c fe .m_D.....8.Sh.L. 0070 - 41 93 80 28 af 56 0a ed-47 2b 89 32 b9 65 34 0c A..(.V..G+.2.e4.

Page 117: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

0080 - d8 00 a4 86 b8 db d3 40-33 0e 3c db 97 ed 01 2b .......@3.<....+ 0090 - f1 92 fe ea a0 d2 03 4d-11 b8 90 fb a7 be c6 5a .......M.......Z 00a0 - 3a aa b7 54 f8 fd 70 18-df 1e 36 40 4e 97 02 12 :..T..p...6@N...  Compression: 1 (zlib compression) Start Time: 1321002877 Timeout : 300 (sec) Verify return code: 0 (ok)---SSL3 alert read:warning:close notifyclosedSSL3 alert write:warning:close notify

Anpassen der /etc/openldap/ldap.conf (Client)

Für die Konfiguration des LADP-Clients auf dem Server, erweitern wir die betreffende Konfigurationsdatei im Verzeichnis /etc/openladp/.

# vim /etc/openldap/ldap.conf/etc/openldap/ldap.conf

## LDAP Defaults# # See ldap.conf(5) for details# This file should be world readable but not world writable. #BASE dc=example, dc=com#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 # Django: 2011-10-26BASE dc=nausch, dc=org # Definition des standardmäßig abgefragten Teilbaums / Searchbase # Anfragen werden unterhalb von dc=nausch, dc=org ausgeführt.URI ldap://ldap.dmz.nausch.org # Definition des LDAP-Servers  # Django: 2011-11-11 LDAPs Konfigiuration# TLS_REQCERT allow# Specifies what checks to perform on server certificates in a TLS session, if any.# The server certificate is requested. If no certificate is provided, the session proceeds normally. If a bad# certificate is provided, it will be ignored and the session proceeds normally. TLS_REQCERT allow #SIZELIMIT 12#TIMELIMIT 15#DEREF never

Konfigurationstest

Nun ist es an der Zeit unsere erste Suchanfrage über unseren neu geschaffenen verschlüsselten Weg an unseren OpenLDAP-Server zu richten:

# ldapsearch -x -LLL -H ldaps://ldap.dmz.nausch.org -b "dc=nausch,dc=org" "uid=django" -W -D "cn=Technischeruser,dc=nausch,dc=org"Enter LDAP Password: dn: uid=django,ou=People,dc=nausch,dc=orguid: djangocn: DjangoobjectClass: accountobjectClass: posixAccount

Page 118: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

objectClass: topobjectClass: shadowAccountuserPassword:: e2NyeXB0fSQ2JENna3VQVFplJDRiT2wvR2dSMUg4OWlxQjRtaU4yYVN5VndHUWE 2SVlubW40eGlGdzJkVjRsbWNKakRoYzlxd2tFYWJQdTZUL1BITWNXcWFLbW9KUnd6NlhwVTd3Vm0xshadowLastChange: 15272shadowMin: 0shadowMax: 99999shadowWarning: 7loginShell: /bin/bashuidNumber: 500gidNumber: 500homeDirectory: /home/djangogecos: Django

Im LDAP-Log wird unsere erfolgreiche verschlüsselte Abfrage über Port 636 entsprechend dokumentiert.

# tail -f /var/log/ldap.logNov 11 10:21:12 vml000030 slapd[27311]: conn=12 fd=16 ACCEPT from IP=10.0.0.30:60097 (IP=0.0.0.0:636)Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 fd=16 TLS established tls_ssf=256 ssf=256Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=0 BIND dn="cn=Technischeruser,dc=nausch,dc=org" method=128Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=0 BIND dn="cn=Technischeruser,dc=nausch,dc=org" mech=SIMPLE ssf=0Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=0 RESULT tag=97 err=0 text=Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=1 SRCH base="dc=nausch,dc=org" scope=2 deref=0 filter="(uid=django)"Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=Nov 11 10:21:12 vml000030 slapd[27311]: conn=12 op=2 UNBINDNov 11 10:21:12 vml000030 slapd[27311]: conn=12 fd=16 closed

Clientkonfiguration (LDAPS Auth mit techn. User)

Bei der Absicherung unserer Clientabfragen mittels TLS setzen wir auf unsere bereits vorhanden Grundinstallation mit einem technischen User auf.

Die abschließende Konfiguration nehmen wir mit Hilfe vom system-config-authentication vor.

# system-config-authentication

In dem folgendem Fenster aktivieren wir erst einmal die notwendige TLS-Verschlüsselung, in dem wir die [Auswahlbox]] bei Use TLS to mencrypt connections anwählen.

Page 119: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Als nächstes müssen wir noch das Rootzertifikat der CA herunterladen, damit der Client später seine Anfragen mit Hilfe dieses Zertifikates verschlüsseln und an den OpenLDAP-Server übertragen kann. Wir wählen hier zu den Menüpunkt Download CA Certificate… aus.

Dort tragen wir die URL des Class 1 PKI Keys http://www.cacert.org/certs/root.crt ein.

Page 120: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Abschließend verlassen wir das Konfigurationsfenster in dem wir die Schaltfläche Apply anwählen.

Mit Hilfe eines geschickten Find-Befehles ermitteln wir nun, welche Konfigurationsdateien durch die vorangegangene Konfiguration in der GUI von system-config-authentication angetastet wurden.

# find -type f -printf '%TY.%Tm.%Td %p\n' | sort -nr | more2011.11.11 ./pam_ldap.conf2011.11.11 ./pam.d/system-auth-ac2011.11.11 ./pam.d/smartcard-auth-ac2011.11.11 ./pam.d/password-auth-ac2011.11.11 ./pam.d/fingerprint-auth-ac2011.11.11 ./openldap/ldap.conf2011.11.11 ./openldap/cacerts/authconfig_downloaded.pem2011.11.10 ./sysconfig/authconfig2011.11.10 ./nsswitch.conf

pam_ldap.conf

In der Konfigurationsdatei /etc/pam_ldap.conf tragen wir folgende Daten nach:

binddn dc=nausch,dc=org bindpw Klaus-ist-der-groesste! uri ldap://ldap.dmz.nausch.org ssl start_tls tls_cacertdir /etc/openldap/cacerts pam_password sha512

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam_ldap.conf/etc/pam_ldap.conf

# @(#)$Id: ldap.conf,v 1.38 2006/05/15 08:13:31 lukeh Exp $## This is the configuration file for the LDAP nameservice# switch library and the LDAP PAM module.## The man page for this file is pam_ldap(5)## PADL Software# http://www.padl.com# # Your LDAP server. Must be resolvable without using LDAP.# Multiple hosts may be specified, each separated by a # space. How long nss_ldap takes to failover depends on# whether your LDAP client library supports configurable# network or connect timeouts (see bind_timelimit). # Django : 2011-10-28 LDAP Client-Authentication# default : host 127.0.0.1 # The distinguished name of the search base.# Django : 2011-11-10 LDAP Client-Authentication# base dc=example,dc=combinddn dc=nausch,dc=org # Another way to specify your LDAP server is to provide an# uri with the server name. This allows to use# Unix Domain Sockets to connect to a local LDAP Server.#uri ldap://127.0.0.1/#uri ldaps://127.0.0.1/ #uri ldapi://%2fvar%2frun%2fldapi_sock/# Note: %2f encodes the '/' used as directory separator 

Page 121: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# The LDAP version to use (defaults to 3# if supported by client library)#ldap_version 3 # The distinguished name to bind to the server with.# Optional: default is to bind anonymously.#binddn cn=proxyuser,dc=example,dc=com # The credentials to bind with. # Optional: default is no credential.#bindpw secret# Django : 2011-11-10 LDAP Client-Authenticationbindpw Klaus-ist-der-groesste! # The distinguished name to bind to the server with# if the effective user ID is root. Password is# stored in /etc/ldap.secret (mode 600)#rootbinddn cn=manager,dc=example,dc=com # The port.# Optional: default is 389.#port 389 # The search scope.#scope sub#scope one#scope base # Search timelimit#timelimit 30 # Bind/connect timelimit#bind_timelimit 30 # Reconnect policy: hard (default) will retry connecting to# the software with exponential backoff, soft will fail# immediately.#bind_policy hard # Idle timelimit; client will close connections# (nss_ldap only) if the server has not been contacted# for the number of seconds specified below.#idle_timelimit 3600 # Filter to AND with uid=%s#pam_filter objectclass=account # The user ID attribute (defaults to uid)#pam_login_attribute uid # Search the root DSE for the password policy (works# with Netscape Directory Server)#pam_lookup_policy yes # Check the 'host' attribute for access control# Default is no; if set to yes, and user has no# value for the host attribute, and pam_ldap is# configured for account management (authorization)# then the user will not be allowed to login.#pam_check_host_attr yes # Check the 'authorizedService' attribute for access# control# Default is no; if set to yes, and the user has no# value for the authorizedService attribute, and# pam_ldap is configured for account management# (authorization) then the user will not be allowed# to login.#pam_check_service_attr yes

Page 122: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 # Group to enforce membership of#pam_groupdn cn=PAM,ou=Groups,dc=example,dc=com # Group member attribute#pam_member_attribute uniquemember # Specify a minium or maximum UID number allowed#pam_min_uid 0#pam_max_uid 0 # Template login attribute, default template user# (can be overriden by value of former attribute# in user's entry)#pam_login_attribute userPrincipalName#pam_template_login_attribute uid#pam_template_login nobody # HEADS UP: the pam_crypt, pam_nds_passwd,# and pam_ad_passwd options are no# longer supported.## Do not hash the password at all; presume# the directory server will do it, if# necessary. This is the default.#pam_password clear # Hash password locally; required for University of# Michigan LDAP server, and works with Netscape# Directory Server if you're using the UNIX-Crypt# hash mechanism and not using the NT Synchronization# service. #pam_password crypt # Remove old password first, then update in# cleartext. Necessary for use with Novell# Directory Services (NDS)#pam_password clear_remove_old#pam_password nds # RACF is an alias for the above. For use with# IBM RACF#pam_password racf # Update Active Directory password, by# creating Unicode password and updating# unicodePwd attribute.#pam_password ad # Use the OpenLDAP password change# extended operation to update the password.#pam_password exop # Redirect users to a URL or somesuch on password# changes.#pam_password_prohibit_message Please visit http://internal to change your password. # RFC2307bis naming contexts# Syntax:# nss_base_XXX base?scope?filter# where scope is {base,one,sub}# and filter is a filter to be &'d with the# default filter.# You can omit the suffix eg:# nss_base_passwd ou=People,# to append the default base DN but this# may incur a small performance impact.#nss_base_passwd ou=People,dc=example,dc=com?one#nss_base_shadow ou=People,dc=example,dc=com?one

Page 123: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#nss_base_group ou=Group,dc=example,dc=com?one#nss_base_hosts ou=Hosts,dc=example,dc=com?one#nss_base_services ou=Services,dc=example,dc=com?one#nss_base_networks ou=Networks,dc=example,dc=com?one#nss_base_protocols ou=Protocols,dc=example,dc=com?one#nss_base_rpc ou=Rpc,dc=example,dc=com?one#nss_base_ethers ou=Ethers,dc=example,dc=com?one#nss_base_netmasks ou=Networks,dc=example,dc=com?ne#nss_base_bootparams ou=Ethers,dc=example,dc=com?one#nss_base_aliases ou=Aliases,dc=example,dc=com?one#nss_base_netgroup ou=Netgroup,dc=example,dc=com?one # attribute/objectclass mapping# Syntax:#nss_map_attribute rfc2307attribute mapped_attribute#nss_map_objectclass rfc2307objectclass mapped_objectclass # configure --enable-nds is no longer supported.# NDS mappings#nss_map_attribute uniqueMember member # Services for UNIX 3.5 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount User#nss_map_attribute uid msSFU30Name#nss_map_attribute uniqueMember msSFU30PosixMember#nss_map_attribute userPassword msSFU30Password#nss_map_attribute homeDirectory msSFU30HomeDirectory#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_objectclass posixGroup Group#pam_login_attribute msSFU30Name#pam_filter objectclass=User#pam_password ad # configure --enable-mssfu-schema is no longer supported.# Services for UNIX 2.0 mappings#nss_map_objectclass posixAccount User#nss_map_objectclass shadowAccount user#nss_map_attribute uid msSFUName#nss_map_attribute uniqueMember posixMember#nss_map_attribute userPassword msSFUPassword#nss_map_attribute homeDirectory msSFUHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup Group#nss_map_attribute cn msSFUName#pam_login_attribute msSFUName#pam_filter objectclass=User#pam_password ad # RFC 2307 (AD) mappings#nss_map_objectclass posixAccount user#nss_map_objectclass shadowAccount user#nss_map_attribute uid sAMAccountName#nss_map_attribute homeDirectory unixHomeDirectory#nss_map_attribute shadowLastChange pwdLastSet#nss_map_objectclass posixGroup group#nss_map_attribute uniqueMember member#pam_login_attribute sAMAccountName#pam_filter objectclass=User#pam_password ad # configure --enable-authpassword is no longer supported# AuthPassword mappings#nss_map_attribute userPassword authPassword # AIX SecureWay mappings#nss_map_objectclass posixAccount aixAccount#nss_base_passwd ou=aixaccount,?one#nss_map_attribute uid userName

Page 124: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#nss_map_attribute gidNumber gid#nss_map_attribute uidNumber uid#nss_map_attribute userPassword passwordChar#nss_map_objectclass posixGroup aixAccessGroup#nss_base_group ou=aixgroup,?one#nss_map_attribute cn groupName#nss_map_attribute uniqueMember member#pam_login_attribute userName#pam_filter objectclass=aixAccount#pam_password clear # Netscape SDK LDAPS#ssl on # Netscape SDK SSL options#sslpath /etc/ssl/certs # OpenLDAP SSL mechanism# start_tls mechanism uses the normal LDAP port, LDAPS typically 636#ssl start_tls#ssl on # OpenLDAP SSL options# Require and verify server certificate (yes/no)# Default is to use libldap's default behavior, which can be configured in# /etc/openldap/ldap.conf using the TLS_REQCERT setting. The default for# OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".#tls_checkpeer yes # CA certificates for server certificate verification# At least one of these are required if tls_checkpeer is "yes"#tls_cacertfile /etc/ssl/ca.cert#tls_cacertdir /etc/ssl/certs # Seed the PRNG if /dev/urandom is not provided#tls_randfile /var/run/egd-pool # SSL cipher suite# See man ciphers for syntax#tls_ciphers TLSv1 # Client certificate and key# Use these, if your server requires client authentication.#tls_cert#tls_key # Disable SASL security layers. This is needed for AD.#sasl_secprops maxssf=0 # Override the default Kerberos ticket cache location.#krb5_ccname FILE:/etc/.ldapcache # SASL mechanism for PAM authentication - use is experimental# at present and does not support password policy control#pam_sasl_mech DIGEST-MD5 # Django : 2011-10-28 LDAP Client-Authentication, automatisch eingetragen mit Hilfe von authconfiguri ldap://ldap.dmz.nausch.orgssl start_tlstls_cacertdir /etc/openldap/cacertspam_password sha256

system-auth

Es wurden auch folgenden pam.d-Konfigurationsdateien angepasst:

/etc/pam.d/fingerprint-auth

Page 125: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/etc/pam.d/password-auth /etc/pam.d/smartcard-auth /etc/pam.d/smtp /etc/pam.d/system-auth

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/pam.d/fingerprint-auth/etc/pam.d/fingerprint-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/password-auth/etc/pam.d/password-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smartcard-auth/etc/pam.d/smartcard-auth

#%PAM-1.0# This file is auto-generated.

Page 126: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_onlyauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password required pam_pkcs11.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so # vim /etc/pam.d/smtp/etc/pam.d/smtp

#%PAM-1.0auth include password-authaccount include password-auth # vim /etc/pam.d/system-auth/etc/pam.d/system-auth

#%PAM-1.0# This file is auto-generated.# User changes will be destroyed the next time authconfig is run.auth required pam_env.soauth sufficient pam_fprintd.soauth sufficient pam_unix.so nullok try_first_passauth requisite pam_succeed_if.so uid >= 500 quietauth sufficient pam_ldap.so use_first_passauth required pam_deny.so account required pam_unix.so broken_shadowaccount sufficient pam_localuser.soaccount sufficient pam_succeed_if.so uid < 500 quietaccount [default=bad success=ok user_unknown=ignore] pam_ldap.soaccount required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 type=password sufficient pam_unix.so sha256 shadow nullok try_first_pass use_authtokpassword sufficient pam_ldap.so use_authtokpassword required pam_deny.so session optional pam_keyinit.so revokesession required pam_limits.sosession optional pam_oddjob_mkhomedir.sosession [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uidsession required pam_unix.sosession optional pam_ldap.so

ldap.conf

In der Konfigurationsdatei /etc/openldap/ldap.conf tragen wir folgende Daten nach:

BASE dc=nausch, dc=org URI ldap://ldap.dmz.nausch.org TLS_CACERTDIR /etc/openldap/cacerts

Page 127: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/openldap/ldap.conf/etc/openldap/ldap.conf

## LDAP Defaults# # See ldap.conf(5) for details# This file should be world readable but not world writable. #BASE dc=example, dc=com#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 #SIZELIMIT 12#TIMELIMIT 15#DEREF never # Django : 2011-10-28 LDAP Client AuthenticationBASE dc=nausch, dc=orgURI ldap://ldap.dmz.nausch.orgTLS_CACERTDIR /etc/openldap/cacerts

authconfig

In der Konfigurationsdatei /etc/sysconfig/authconfig setzen wir die beiden folgenden Werte von no auf yes:

USELDAP=yes (LDAP-Authentifizierung aktivieren.) FORCELEGACY=no (Da wir nun TLS bei der LDAP-Authentifizierung unter CentOS 6 nutzen wollen, setzen wir diem Option FORCELEGACY wieder auf no zurück.

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/sysconfig/authconfig/etc/sysconfig/authconfig

USEMKHOMEDIR=noUSEPAMACCESS=noCACHECREDENTIALS=yesUSESSSDAUTH=noUSESHADOW=yesUSEWINBIND=noUSEDB=noFORCELEGACY=noUSEFPRINTD=yesFORCESMARTCARD=noPASSWDALGORITHM=sha512USELDAPAUTH=noUSEPASSWDQC=noUSELOCAUTHORIZE=yesUSECRACKLIB=yesUSEWINBINDAUTH=noUSESMARTCARD=noUSELDAP=yesUSENIS=noUSEKERBEROS=noUSESYSNETAUTH=noUSESMBAUTH=noUSESSSD=noUSEHESIOD=no

Page 128: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

nsswitch.conf

In der Konfigurationsdatei /etc/pam.d/system-auth tragen wir folgende Daten nach:

passwd: files ldap shadow: files ldap group: files ldap

netgroup: ldap

automount: files ldap

Zur Bearbeitung der Konfigurationsdatei nutzen wir wie so oft immer unseren Editor der Wahl vim.

# vim /etc/nsswitch.conf/etc/nsswitch.conf

## /etc/nsswitch.conf## An example Name Service Switch config file. This file should be# sorted with the most-used services at the beginning.## The entry '[NOTFOUND=return]' means that the search for an# entry should stop if the search in the previous entry turned# up nothing. Note that if the search failed due to some other reason# (like no NIS server responding) then the search continues with the# next entry.## Valid entries include:## nisplus Use NIS+ (NIS version 3)# nis Use NIS (NIS version 2), also called YP# dns Use DNS (Domain Name Service)# files Use the local files# db Use the local database (.db) files# compat Use NIS on compat mode# hesiod Use Hesiod for user lookups# [NOTFOUND=return] Stop searching if not found so far# # To use db, put the "db" in front of "files" for entries you want to be# looked up first in the databases## Example:#passwd: db files nisplus nis#shadow: db files nisplus nis#group: db files nisplus nis # Django : 2011-10-28 LDAP Client Authentication# default# passwd: files# shadow: files# group: filespasswd: files ldapshadow: files ldapgroup: files ldap #hosts: db files nisplus nis dnshosts: files dns # Example - obey only what nisplus tells us...#services: nisplus [NOTFOUND=return] files#networks: nisplus [NOTFOUND=return] files#protocols: nisplus [NOTFOUND=return] files

Page 129: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

#rpc: nisplus [NOTFOUND=return] files#ethers: nisplus [NOTFOUND=return] files#netmasks: nisplus [NOTFOUND=return] files  bootparams: nisplus [NOTFOUND=return] files ethers: filesnetmasks: filesnetworks: filesprotocols: filesrpc: filesservices: files # Django : 2011-10-28 LDAP Client Authentication# default# netgroup: nisplusnetgroup: ldap publickey: nisplus # Django : 2011-10-28 LDAP Client Authentication# default# automount: files nisplusautomount: files ldapaliases: files nisplus

Clienttest

Zum Testen unserer Konfiguration starten wir einfach unseren CentOS-6 Host und melden uns an.

Bei Bedarf beobachten wir das LDAP-Logfile auf dem OpenLDAP-Server.

# tail -f /var/log/ldap-log

Page 130: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Links Zurück zum Kapitel >>OpenLDAP Server unter CentOS 6.x<< Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite

Page 131: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

phpLDAPadmin unter CentOS 6.x

Zur einfachen Administration unseres LDAP-Servers bedienen wir uns des PHP-Projektes phpLDAPadmin.

Installation

Zu erst installieren wir die benötigten Pakete und Programme.

Statt die Web-Applikation selbst aus den Programmquellen zu installieren, benutzen wir das vorgefertigte RPM aus dem Projekt Extra Packages for Enterprise Linux kurz EPEL. Hierzu binden wir erst einmal das EPEL-Repository, wie im Kapitel Einbinden des EPEL Repository unter CentOS 6.x beschrieben in unserem definierten Webserverhost ein.

php-Pakete

Für unseren komfortablen Weg der Administration unseres OpenLDAP-Servers muß natürlich ein funktionstüchtiger OpenLDAP Server unter CentOS 6.x und ein passender Apache-Webserver zur Verfügung stehen. Bei letzterem werden folgende PHP-Module benötigt:

php php-cli php-common php-ldap

Diese Pakete installieren wir, sofern diese nicht schon beid der Grunddinstallation unseres Apache-Webservers erfolgte, mit Hilfe von YUM

# yum install php php-cli php-common php-ldap -y

Anschließend starten wir bei Bedarf unseren Webserver einmal durch.

# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]

phpldapadmin

Dank unseres EPEL Repositories reicht nun auch hier für die Programminstallation ein Aufruf mit Unterstützung von YUM.

# yum install phpldapadmin -y

Was uns das Paket phpldapadmin alles mitbringt, zeigt uns der Aufruf von:

# rpm -qil phpldapadminName : phpldapadmin Relocations: (not relocatable)Version : 1.2.1.1 Vendor: Fedora ProjectRelease : 2.20111006git.el6 Build Date: Wed 26 Oct 2011 03:08:08 PM CEST

Page 132: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Install Date: Sat 07 Jan 2012 05:38:39 PM CET Build Host: x86-13.phx2.fedoraproject.orgGroup : Applications/Internet Source RPM: phpldapadmin-1.2.1.1-2.20111006git.el6.src.rpmSize : 2345025 License: GPLv2+Signature : RSA/8, Thu 27 Oct 2011 11:17:18 AM CEST, Key ID 3b49df2a0608b895Packager : Fedora ProjectURL : http://phpldapadmin.sourceforge.netSummary : Web-based tool for managing LDAP serversDescription :PhpLDAPadmin is a web-based LDAP client.It provides easy, anywhere-accessible, multi-language administrationfor your LDAP server. Its hierarchical tree-viewer and advanced searchfunctionality make it intuitive to browse and administer your LDAP directory.

Since it is a web application, this LDAP browser works on many platforms,making your LDAP server easily manageable from any location.

PhpLDAPadmin is the perfect LDAP browser for the LDAP professionaland novice alike. Its user base consists mostly of LDAP administrationprofessionals.

Edit /etc/phpldapadmin/config.php to change default (localhost) LDAP serverlocation and other things. Edit /etc/httpd/conf.d/phpldapadmin.conf to allowaccess by remote web-clients./etc/httpd/conf.d/phpldapadmin.conf/etc/phpldapadmin/etc/phpldapadmin/config.php/usr/share/doc/phpldapadmin-1.2.1.1/usr/share/doc/phpldapadmin-1.2.1.1/INSTALL/usr/share/doc/phpldapadmin-1.2.1.1/LICENSE/usr/share/doc/phpldapadmin-1.2.1.1/config.php.example/usr/share/phpldapadmin/usr/share/phpldapadmin/VERSION/usr/share/phpldapadmin/config/usr/share/phpldapadmin/hooks/usr/share/phpldapadmin/hooks/classes/usr/share/phpldapadmin/hooks/classes/README/usr/share/phpldapadmin/hooks/functions/usr/share/phpldapadmin/hooks/functions/README/usr/share/phpldapadmin/hooks/functions/example.php/usr/share/phpldapadmin/htdocs/usr/share/phpldapadmin/htdocs/add_attr_form.php/usr/share/phpldapadmin/htdocs/add_oclass_form.php/usr/share/phpldapadmin/htdocs/add_value_form.php/usr/share/phpldapadmin/htdocs/cmd.php/usr/share/phpldapadmin/htdocs/collapse.php/usr/share/phpldapadmin/htdocs/common.php/usr/share/phpldapadmin/htdocs/compare.php/usr/share/phpldapadmin/htdocs/compare_form.php/usr/share/phpldapadmin/htdocs/copy.php/usr/share/phpldapadmin/htdocs/copy_form.php/usr/share/phpldapadmin/htdocs/create.php/usr/share/phpldapadmin/htdocs/create_confirm.php/usr/share/phpldapadmin/htdocs/css/usr/share/phpldapadmin/htdocs/css/default/usr/share/phpldapadmin/htdocs/css/default/style.css/usr/share/phpldapadmin/htdocs/css/tango/usr/share/phpldapadmin/htdocs/css/tango/style.css/usr/share/phpldapadmin/htdocs/delete.php/usr/share/phpldapadmin/htdocs/delete_attr.php/usr/share/phpldapadmin/htdocs/delete_form.php/usr/share/phpldapadmin/htdocs/download_binary_attr.php/usr/share/phpldapadmin/htdocs/draw_tree_node.php/usr/share/phpldapadmin/htdocs/entry_chooser.php/usr/share/phpldapadmin/htdocs/expand.php/usr/share/phpldapadmin/htdocs/export.php/usr/share/phpldapadmin/htdocs/export_form.php/usr/share/phpldapadmin/htdocs/images

Page 133: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/INFO/usr/share/phpldapadmin/htdocs/images/ajax-progress.gif/usr/share/phpldapadmin/htdocs/images/ajax-spinner.gif/usr/share/phpldapadmin/htdocs/images/countries/usr/share/phpldapadmin/htdocs/images/countries/af.png/usr/share/phpldapadmin/htdocs/images/countries/al.png/usr/share/phpldapadmin/htdocs/images/countries/am.png/usr/share/phpldapadmin/htdocs/images/countries/an.png/usr/share/phpldapadmin/htdocs/images/countries/ao.png/usr/share/phpldapadmin/htdocs/images/countries/ar.png/usr/share/phpldapadmin/htdocs/images/countries/at.png/usr/share/phpldapadmin/htdocs/images/countries/au.png/usr/share/phpldapadmin/htdocs/images/countries/aw.png/usr/share/phpldapadmin/htdocs/images/countries/az.png/usr/share/phpldapadmin/htdocs/images/countries/ba.png/usr/share/phpldapadmin/htdocs/images/countries/bb.png/usr/share/phpldapadmin/htdocs/images/countries/bd.png/usr/share/phpldapadmin/htdocs/images/countries/be.png/usr/share/phpldapadmin/htdocs/images/countries/bf.png/usr/share/phpldapadmin/htdocs/images/countries/bg.png/usr/share/phpldapadmin/htdocs/images/countries/bh.png/usr/share/phpldapadmin/htdocs/images/countries/bi.png/usr/share/phpldapadmin/htdocs/images/countries/bj.png/usr/share/phpldapadmin/htdocs/images/countries/bm.png/usr/share/phpldapadmin/htdocs/images/countries/bn.png/usr/share/phpldapadmin/htdocs/images/countries/bo.png/usr/share/phpldapadmin/htdocs/images/countries/br.png/usr/share/phpldapadmin/htdocs/images/countries/bs.png/usr/share/phpldapadmin/htdocs/images/countries/bt.png/usr/share/phpldapadmin/htdocs/images/countries/bw.png/usr/share/phpldapadmin/htdocs/images/countries/by.png/usr/share/phpldapadmin/htdocs/images/countries/bz.png/usr/share/phpldapadmin/htdocs/images/countries/ca.png/usr/share/phpldapadmin/htdocs/images/countries/cf.png/usr/share/phpldapadmin/htdocs/images/countries/cg.png/usr/share/phpldapadmin/htdocs/images/countries/ch.png/usr/share/phpldapadmin/htdocs/images/countries/ci.png/usr/share/phpldapadmin/htdocs/images/countries/ck.png/usr/share/phpldapadmin/htdocs/images/countries/cl.png/usr/share/phpldapadmin/htdocs/images/countries/cm.png/usr/share/phpldapadmin/htdocs/images/countries/cn.png/usr/share/phpldapadmin/htdocs/images/countries/co.png/usr/share/phpldapadmin/htdocs/images/countries/cr.png/usr/share/phpldapadmin/htdocs/images/countries/cu.png/usr/share/phpldapadmin/htdocs/images/countries/cv.png/usr/share/phpldapadmin/htdocs/images/countries/cy.png/usr/share/phpldapadmin/htdocs/images/countries/cz.png/usr/share/phpldapadmin/htdocs/images/countries/de.png/usr/share/phpldapadmin/htdocs/images/countries/dk.png/usr/share/phpldapadmin/htdocs/images/countries/dz.png/usr/share/phpldapadmin/htdocs/images/countries/ec.png/usr/share/phpldapadmin/htdocs/images/countries/ee.png/usr/share/phpldapadmin/htdocs/images/countries/eg.png/usr/share/phpldapadmin/htdocs/images/countries/er.png/usr/share/phpldapadmin/htdocs/images/countries/es.png/usr/share/phpldapadmin/htdocs/images/countries/et.png/usr/share/phpldapadmin/htdocs/images/countries/fi.png/usr/share/phpldapadmin/htdocs/images/countries/fj.png/usr/share/phpldapadmin/htdocs/images/countries/fo.png/usr/share/phpldapadmin/htdocs/images/countries/fr.png/usr/share/phpldapadmin/htdocs/images/countries/ga.png/usr/share/phpldapadmin/htdocs/images/countries/gb.png/usr/share/phpldapadmin/htdocs/images/countries/ge.png/usr/share/phpldapadmin/htdocs/images/countries/gi.png/usr/share/phpldapadmin/htdocs/images/countries/gl.png/usr/share/phpldapadmin/htdocs/images/countries/gp.png/usr/share/phpldapadmin/htdocs/images/countries/gr.png/usr/share/phpldapadmin/htdocs/images/countries/gt.png/usr/share/phpldapadmin/htdocs/images/countries/gu.png

Page 134: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/countries/gy.png/usr/share/phpldapadmin/htdocs/images/countries/hk.png/usr/share/phpldapadmin/htdocs/images/countries/hr.png/usr/share/phpldapadmin/htdocs/images/countries/ht.png/usr/share/phpldapadmin/htdocs/images/countries/hu.png/usr/share/phpldapadmin/htdocs/images/countries/id.png/usr/share/phpldapadmin/htdocs/images/countries/ie.png/usr/share/phpldapadmin/htdocs/images/countries/il.png/usr/share/phpldapadmin/htdocs/images/countries/in.png/usr/share/phpldapadmin/htdocs/images/countries/iq.png/usr/share/phpldapadmin/htdocs/images/countries/ir.png/usr/share/phpldapadmin/htdocs/images/countries/is.png/usr/share/phpldapadmin/htdocs/images/countries/it.png/usr/share/phpldapadmin/htdocs/images/countries/jm.png/usr/share/phpldapadmin/htdocs/images/countries/jo.png/usr/share/phpldapadmin/htdocs/images/countries/jp.png/usr/share/phpldapadmin/htdocs/images/countries/ke.png/usr/share/phpldapadmin/htdocs/images/countries/kg.png/usr/share/phpldapadmin/htdocs/images/countries/kh.png/usr/share/phpldapadmin/htdocs/images/countries/ki.png/usr/share/phpldapadmin/htdocs/images/countries/kp.png/usr/share/phpldapadmin/htdocs/images/countries/kr.png/usr/share/phpldapadmin/htdocs/images/countries/ky.png/usr/share/phpldapadmin/htdocs/images/countries/kz.png/usr/share/phpldapadmin/htdocs/images/countries/lb.png/usr/share/phpldapadmin/htdocs/images/countries/lc.png/usr/share/phpldapadmin/htdocs/images/countries/lk.png/usr/share/phpldapadmin/htdocs/images/countries/lt.png/usr/share/phpldapadmin/htdocs/images/countries/lu.png/usr/share/phpldapadmin/htdocs/images/countries/lv.png/usr/share/phpldapadmin/htdocs/images/countries/ly.png/usr/share/phpldapadmin/htdocs/images/countries/ma.png/usr/share/phpldapadmin/htdocs/images/countries/mc.png/usr/share/phpldapadmin/htdocs/images/countries/md.png/usr/share/phpldapadmin/htdocs/images/countries/mg.png/usr/share/phpldapadmin/htdocs/images/countries/mn.png/usr/share/phpldapadmin/htdocs/images/countries/mo.png/usr/share/phpldapadmin/htdocs/images/countries/mp.png/usr/share/phpldapadmin/htdocs/images/countries/ms.png/usr/share/phpldapadmin/htdocs/images/countries/mt.png/usr/share/phpldapadmin/htdocs/images/countries/mx.png/usr/share/phpldapadmin/htdocs/images/countries/my.png/usr/share/phpldapadmin/htdocs/images/countries/mz.png/usr/share/phpldapadmin/htdocs/images/countries/na.png/usr/share/phpldapadmin/htdocs/images/countries/nc.png/usr/share/phpldapadmin/htdocs/images/countries/nf.png/usr/share/phpldapadmin/htdocs/images/countries/nl.png/usr/share/phpldapadmin/htdocs/images/countries/no.png/usr/share/phpldapadmin/htdocs/images/countries/np.png/usr/share/phpldapadmin/htdocs/images/countries/nr.png/usr/share/phpldapadmin/htdocs/images/countries/nz.png/usr/share/phpldapadmin/htdocs/images/countries/om.png/usr/share/phpldapadmin/htdocs/images/countries/pa.png/usr/share/phpldapadmin/htdocs/images/countries/pe.png/usr/share/phpldapadmin/htdocs/images/countries/pf.png/usr/share/phpldapadmin/htdocs/images/countries/ph.png/usr/share/phpldapadmin/htdocs/images/countries/pk.png/usr/share/phpldapadmin/htdocs/images/countries/pl.png/usr/share/phpldapadmin/htdocs/images/countries/pm.png/usr/share/phpldapadmin/htdocs/images/countries/pr.png/usr/share/phpldapadmin/htdocs/images/countries/pt.png/usr/share/phpldapadmin/htdocs/images/countries/py.png/usr/share/phpldapadmin/htdocs/images/countries/qa.png/usr/share/phpldapadmin/htdocs/images/countries/ro.png/usr/share/phpldapadmin/htdocs/images/countries/ru.png/usr/share/phpldapadmin/htdocs/images/countries/sa.png/usr/share/phpldapadmin/htdocs/images/countries/sb.png/usr/share/phpldapadmin/htdocs/images/countries/sd.png/usr/share/phpldapadmin/htdocs/images/countries/se.png

Page 135: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/countries/sg.png/usr/share/phpldapadmin/htdocs/images/countries/si.png/usr/share/phpldapadmin/htdocs/images/countries/sk.png/usr/share/phpldapadmin/htdocs/images/countries/sl.png/usr/share/phpldapadmin/htdocs/images/countries/so.png/usr/share/phpldapadmin/htdocs/images/countries/sr.png/usr/share/phpldapadmin/htdocs/images/countries/sy.png/usr/share/phpldapadmin/htdocs/images/countries/tc.png/usr/share/phpldapadmin/htdocs/images/countries/tg.png/usr/share/phpldapadmin/htdocs/images/countries/th.png/usr/share/phpldapadmin/htdocs/images/countries/tn.png/usr/share/phpldapadmin/htdocs/images/countries/to.png/usr/share/phpldapadmin/htdocs/images/countries/tp.png/usr/share/phpldapadmin/htdocs/images/countries/tr.png/usr/share/phpldapadmin/htdocs/images/countries/tt.png/usr/share/phpldapadmin/htdocs/images/countries/tv.png/usr/share/phpldapadmin/htdocs/images/countries/tw.png/usr/share/phpldapadmin/htdocs/images/countries/tz.png/usr/share/phpldapadmin/htdocs/images/countries/ua.png/usr/share/phpldapadmin/htdocs/images/countries/ug.png/usr/share/phpldapadmin/htdocs/images/countries/us.png/usr/share/phpldapadmin/htdocs/images/countries/uy.png/usr/share/phpldapadmin/htdocs/images/countries/va.png/usr/share/phpldapadmin/htdocs/images/countries/ve.png/usr/share/phpldapadmin/htdocs/images/countries/vg.png/usr/share/phpldapadmin/htdocs/images/countries/vi.png/usr/share/phpldapadmin/htdocs/images/countries/vn.png/usr/share/phpldapadmin/htdocs/images/countries/ws.png/usr/share/phpldapadmin/htdocs/images/countries/ye.png/usr/share/phpldapadmin/htdocs/images/countries/yu.png/usr/share/phpldapadmin/htdocs/images/countries/za.png/usr/share/phpldapadmin/htdocs/images/countries/zw.png/usr/share/phpldapadmin/htdocs/images/default/usr/share/phpldapadmin/htdocs/images/default/add.png/usr/share/phpldapadmin/htdocs/images/default/address-book.png/usr/share/phpldapadmin/htdocs/images/default/bug-big.png/usr/share/phpldapadmin/htdocs/images/default/bug.png/usr/share/phpldapadmin/htdocs/images/default/calendar.png/usr/share/phpldapadmin/htdocs/images/default/catalog.png/usr/share/phpldapadmin/htdocs/images/default/children.png/usr/share/phpldapadmin/htdocs/images/default/compare.png/usr/share/phpldapadmin/htdocs/images/default/country.png/usr/share/phpldapadmin/htdocs/images/default/create.png/usr/share/phpldapadmin/htdocs/images/default/cut.png/usr/share/phpldapadmin/htdocs/images/default/debug-cache.png/usr/share/phpldapadmin/htdocs/images/default/device.png/usr/share/phpldapadmin/htdocs/images/default/disabled.png/usr/share/phpldapadmin/htdocs/images/default/document.png/usr/share/phpldapadmin/htdocs/images/default/door.png/usr/share/phpldapadmin/htdocs/images/default/error-big.png/usr/share/phpldapadmin/htdocs/images/default/error.png/usr/share/phpldapadmin/htdocs/images/default/export-big.png/usr/share/phpldapadmin/htdocs/images/default/export.png/usr/share/phpldapadmin/htdocs/images/default/files.png/usr/share/phpldapadmin/htdocs/images/default/find.png/usr/share/phpldapadmin/htdocs/images/default/folder.png/usr/share/phpldapadmin/htdocs/images/default/forum-big.png/usr/share/phpldapadmin/htdocs/images/default/hard-drive.png/usr/share/phpldapadmin/htdocs/images/default/help-big.png/usr/share/phpldapadmin/htdocs/images/default/help.png/usr/share/phpldapadmin/htdocs/images/default/home-big.png/usr/share/phpldapadmin/htdocs/images/default/home.png/usr/share/phpldapadmin/htdocs/images/default/host.png/usr/share/phpldapadmin/htdocs/images/default/import-big.png/usr/share/phpldapadmin/htdocs/images/default/index.php/usr/share/phpldapadmin/htdocs/images/default/info-big.png/usr/share/phpldapadmin/htdocs/images/default/info.png/usr/share/phpldapadmin/htdocs/images/default/invalid.png/usr/share/phpldapadmin/htdocs/images/default/key.png

Page 136: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/default/ldap-alias.png/usr/share/phpldapadmin/htdocs/images/default/ldap-dc.png/usr/share/phpldapadmin/htdocs/images/default/ldap-default.png/usr/share/phpldapadmin/htdocs/images/default/ldap-o.png/usr/share/phpldapadmin/htdocs/images/default/ldap-ou.png/usr/share/phpldapadmin/htdocs/images/default/ldap-server.png/usr/share/phpldapadmin/htdocs/images/default/ldap-uid.png/usr/share/phpldapadmin/htdocs/images/default/ldap-uniquegroup.png/usr/share/phpldapadmin/htdocs/images/default/ldap-user.png/usr/share/phpldapadmin/htdocs/images/default/light-big.png/usr/share/phpldapadmin/htdocs/images/default/light.png/usr/share/phpldapadmin/htdocs/images/default/locality.png/usr/share/phpldapadmin/htdocs/images/default/lock.png/usr/share/phpldapadmin/htdocs/images/default/login.png/usr/share/phpldapadmin/htdocs/images/default/logo-small.png/usr/share/phpldapadmin/htdocs/images/default/logo.png/usr/share/phpldapadmin/htdocs/images/default/logout-big.png/usr/share/phpldapadmin/htdocs/images/default/mail.png/usr/share/phpldapadmin/htdocs/images/default/mail_account.png/usr/share/phpldapadmin/htdocs/images/default/mail_alias.png/usr/share/phpldapadmin/htdocs/images/default/minus.png/usr/share/phpldapadmin/htdocs/images/default/monitorserver-big.png/usr/share/phpldapadmin/htdocs/images/default/move.png/usr/share/phpldapadmin/htdocs/images/default/n.png/usr/share/phpldapadmin/htdocs/images/default/network.png/usr/share/phpldapadmin/htdocs/images/default/nogo.png/usr/share/phpldapadmin/htdocs/images/default/nt_machine.png/usr/share/phpldapadmin/htdocs/images/default/nt_user.png/usr/share/phpldapadmin/htdocs/images/default/paypal-donate.png/usr/share/phpldapadmin/htdocs/images/default/phone.png/usr/share/phpldapadmin/htdocs/images/default/photo.png/usr/share/phpldapadmin/htdocs/images/default/plus.png/usr/share/phpldapadmin/htdocs/images/default/process.png/usr/share/phpldapadmin/htdocs/images/default/refresh-big.png/usr/share/phpldapadmin/htdocs/images/default/refresh.png/usr/share/phpldapadmin/htdocs/images/default/rename.png/usr/share/phpldapadmin/htdocs/images/default/request-feature-big.png/usr/share/phpldapadmin/htdocs/images/default/rfc.png/usr/share/phpldapadmin/htdocs/images/default/save.png/usr/share/phpldapadmin/htdocs/images/default/schema-big.png/usr/share/phpldapadmin/htdocs/images/default/search-big.png/usr/share/phpldapadmin/htdocs/images/default/server-settings.png/usr/share/phpldapadmin/htdocs/images/default/server-small.png/usr/share/phpldapadmin/htdocs/images/default/server.png/usr/share/phpldapadmin/htdocs/images/default/smile-big.png/usr/share/phpldapadmin/htdocs/images/default/smile.png/usr/share/phpldapadmin/htdocs/images/default/switch.png/usr/share/phpldapadmin/htdocs/images/default/terminal.png/usr/share/phpldapadmin/htdocs/images/default/timeout.png/usr/share/phpldapadmin/htdocs/images/default/tools-no.png/usr/share/phpldapadmin/htdocs/images/default/tools.png/usr/share/phpldapadmin/htdocs/images/default/trash-big.png/usr/share/phpldapadmin/htdocs/images/default/trash.png/usr/share/phpldapadmin/htdocs/images/default/tree_collapse.png/usr/share/phpldapadmin/htdocs/images/default/tree_collapse_corner.png/usr/share/phpldapadmin/htdocs/images/default/tree_collapse_corner_first.png/usr/share/phpldapadmin/htdocs/images/default/tree_collapse_first.png/usr/share/phpldapadmin/htdocs/images/default/tree_corner.png/usr/share/phpldapadmin/htdocs/images/default/tree_expand.png/usr/share/phpldapadmin/htdocs/images/default/tree_expand_corner.png/usr/share/phpldapadmin/htdocs/images/default/tree_expand_corner_first.png/usr/share/phpldapadmin/htdocs/images/default/tree_expand_first.png/usr/share/phpldapadmin/htdocs/images/default/tree_folder_closed.png/usr/share/phpldapadmin/htdocs/images/default/tree_folder_open.png/usr/share/phpldapadmin/htdocs/images/default/tree_leaf.png/usr/share/phpldapadmin/htdocs/images/default/tree_space.png/usr/share/phpldapadmin/htdocs/images/default/tree_split.png/usr/share/phpldapadmin/htdocs/images/default/tree_split_first.png/usr/share/phpldapadmin/htdocs/images/default/tree_vertline.png

Page 137: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/default/unknown.png/usr/share/phpldapadmin/htdocs/images/default/up.png/usr/share/phpldapadmin/htdocs/images/default/warn-big.png/usr/share/phpldapadmin/htdocs/images/favicon.ico/usr/share/phpldapadmin/htdocs/images/tango/usr/share/phpldapadmin/htdocs/images/tango/INFO/usr/share/phpldapadmin/htdocs/images/tango/add-big.png/usr/share/phpldapadmin/htdocs/images/tango/add.png/usr/share/phpldapadmin/htdocs/images/tango/address-book.png/usr/share/phpldapadmin/htdocs/images/tango/bug-big.png/usr/share/phpldapadmin/htdocs/images/tango/bug.png/usr/share/phpldapadmin/htdocs/images/tango/children-big.png/usr/share/phpldapadmin/htdocs/images/tango/children.png/usr/share/phpldapadmin/htdocs/images/tango/compare-big.png/usr/share/phpldapadmin/htdocs/images/tango/compare.png/usr/share/phpldapadmin/htdocs/images/tango/create-big.png/usr/share/phpldapadmin/htdocs/images/tango/create.png/usr/share/phpldapadmin/htdocs/images/tango/cut-big.png/usr/share/phpldapadmin/htdocs/images/tango/cut.png/usr/share/phpldapadmin/htdocs/images/tango/disabled-big.png/usr/share/phpldapadmin/htdocs/images/tango/disabled.png/usr/share/phpldapadmin/htdocs/images/tango/error-big.png/usr/share/phpldapadmin/htdocs/images/tango/error.png/usr/share/phpldapadmin/htdocs/images/tango/export-big.png/usr/share/phpldapadmin/htdocs/images/tango/export.png/usr/share/phpldapadmin/htdocs/images/tango/forum-big.png/usr/share/phpldapadmin/htdocs/images/tango/forum.png/usr/share/phpldapadmin/htdocs/images/tango/help-big.png/usr/share/phpldapadmin/htdocs/images/tango/help.png/usr/share/phpldapadmin/htdocs/images/tango/import-big.png/usr/share/phpldapadmin/htdocs/images/tango/import.png/usr/share/phpldapadmin/htdocs/images/tango/index.php/usr/share/phpldapadmin/htdocs/images/tango/info-big.png/usr/share/phpldapadmin/htdocs/images/tango/info.png/usr/share/phpldapadmin/htdocs/images/tango/key.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-alias-big.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-alias.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-dc.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-default.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-o.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-ou.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-uid.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-uniquegroup.png/usr/share/phpldapadmin/htdocs/images/tango/ldap-user.png/usr/share/phpldapadmin/htdocs/images/tango/light-big.png/usr/share/phpldapadmin/htdocs/images/tango/light.png/usr/share/phpldapadmin/htdocs/images/tango/login-big.png/usr/share/phpldapadmin/htdocs/images/tango/login.png/usr/share/phpldapadmin/htdocs/images/tango/logo-small.png/usr/share/phpldapadmin/htdocs/images/tango/logo.png/usr/share/phpldapadmin/htdocs/images/tango/logout-big.png/usr/share/phpldapadmin/htdocs/images/tango/logout.png/usr/share/phpldapadmin/htdocs/images/tango/mail-big.png/usr/share/phpldapadmin/htdocs/images/tango/mail.png/usr/share/phpldapadmin/htdocs/images/tango/minus.png/usr/share/phpldapadmin/htdocs/images/tango/monitorserver-big.png/usr/share/phpldapadmin/htdocs/images/tango/monitorserver.png/usr/share/phpldapadmin/htdocs/images/tango/plus.png/usr/share/phpldapadmin/htdocs/images/tango/refresh-big.png/usr/share/phpldapadmin/htdocs/images/tango/refresh.png/usr/share/phpldapadmin/htdocs/images/tango/remove-big.png/usr/share/phpldapadmin/htdocs/images/tango/remove.png/usr/share/phpldapadmin/htdocs/images/tango/rename-big.png/usr/share/phpldapadmin/htdocs/images/tango/rename.png/usr/share/phpldapadmin/htdocs/images/tango/request-feature-big.png/usr/share/phpldapadmin/htdocs/images/tango/request-feature.png/usr/share/phpldapadmin/htdocs/images/tango/save-big.png/usr/share/phpldapadmin/htdocs/images/tango/save.png/usr/share/phpldapadmin/htdocs/images/tango/schema-big.png

Page 138: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/images/tango/schema.png/usr/share/phpldapadmin/htdocs/images/tango/search-big.png/usr/share/phpldapadmin/htdocs/images/tango/search.png/usr/share/phpldapadmin/htdocs/images/tango/server-big.png/usr/share/phpldapadmin/htdocs/images/tango/server.png/usr/share/phpldapadmin/htdocs/images/tango/smile-big.png/usr/share/phpldapadmin/htdocs/images/tango/smile.png/usr/share/phpldapadmin/htdocs/images/tango/switch-big.png/usr/share/phpldapadmin/htdocs/images/tango/switch.png/usr/share/phpldapadmin/htdocs/images/tango/timeout-big.png/usr/share/phpldapadmin/htdocs/images/tango/timeout.png/usr/share/phpldapadmin/htdocs/images/tango/tools-big.png/usr/share/phpldapadmin/htdocs/images/tango/tools.png/usr/share/phpldapadmin/htdocs/images/tango/trash-big.png/usr/share/phpldapadmin/htdocs/images/tango/trash.png/usr/share/phpldapadmin/htdocs/images/tango/tree_collapse.png/usr/share/phpldapadmin/htdocs/images/tango/tree_collapse_corner.png/usr/share/phpldapadmin/htdocs/images/tango/tree_collapse_corner_first.png/usr/share/phpldapadmin/htdocs/images/tango/tree_collapse_first.png/usr/share/phpldapadmin/htdocs/images/tango/tree_corner.png/usr/share/phpldapadmin/htdocs/images/tango/tree_expand.png/usr/share/phpldapadmin/htdocs/images/tango/tree_expand_corner.png/usr/share/phpldapadmin/htdocs/images/tango/tree_expand_corner_first.png/usr/share/phpldapadmin/htdocs/images/tango/tree_expand_first.png/usr/share/phpldapadmin/htdocs/images/tango/tree_folder_closed.png/usr/share/phpldapadmin/htdocs/images/tango/tree_folder_open.png/usr/share/phpldapadmin/htdocs/images/tango/tree_leaf.png/usr/share/phpldapadmin/htdocs/images/tango/tree_space.png/usr/share/phpldapadmin/htdocs/images/tango/tree_split.png/usr/share/phpldapadmin/htdocs/images/tango/tree_split_first.png/usr/share/phpldapadmin/htdocs/images/tango/tree_vertline.png/usr/share/phpldapadmin/htdocs/images/tango/warn-big.png/usr/share/phpldapadmin/htdocs/images/tango/warn.png/usr/share/phpldapadmin/htdocs/import.php/usr/share/phpldapadmin/htdocs/import_form.php/usr/share/phpldapadmin/htdocs/index.php/usr/share/phpldapadmin/htdocs/js/usr/share/phpldapadmin/htdocs/js/CheckAll.js/usr/share/phpldapadmin/htdocs/js/TemplateRender.js/usr/share/phpldapadmin/htdocs/js/ajax_functions.js/usr/share/phpldapadmin/htdocs/js/ajax_tree.js/usr/share/phpldapadmin/htdocs/js/date_selector.js/usr/share/phpldapadmin/htdocs/js/dnChooserPopup.js/usr/share/phpldapadmin/htdocs/js/form_field_toggle_enable.js/usr/share/phpldapadmin/htdocs/js/jscalendar/usr/share/phpldapadmin/htdocs/js/jscalendar/README/usr/share/phpldapadmin/htdocs/js/jscalendar/calendar-blue.css/usr/share/phpldapadmin/htdocs/js/jscalendar/calendar-setup.js/usr/share/phpldapadmin/htdocs/js/jscalendar/calendar.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-af.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-al.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-bg.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-big5-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-big5.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-br.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ca.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-cs-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-cs-win.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-da.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-de.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-du.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-el.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-en.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-es.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-fi.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-fr.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-he-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-hr-utf8.js

Page 139: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-hr.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-hu.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-it.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-jp.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ko-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ko.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-lt-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-lt.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-lv.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-nl.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-no.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-pl-utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-pl.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-pt.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ro.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ru.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-ru_win_.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-si.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-sk.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-sp.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-sv.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-tr.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/calendar-zh.js/usr/share/phpldapadmin/htdocs/js/jscalendar/lang/cn_utf8.js/usr/share/phpldapadmin/htdocs/js/jscalendar/menuarrow.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/active-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/dark-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/hover-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/menuarrow.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/normal-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/rowhover-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/status-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/theme.css/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/title-bg.gif/usr/share/phpldapadmin/htdocs/js/jscalendar/skins/aqua/today-bg.gif/usr/share/phpldapadmin/htdocs/js/layersmenu-browser_detection.js/usr/share/phpldapadmin/htdocs/js/modify_member.js/usr/share/phpldapadmin/htdocs/js/toAscii.js/usr/share/phpldapadmin/htdocs/login.php/usr/share/phpldapadmin/htdocs/login_form.php/usr/share/phpldapadmin/htdocs/logout.php/usr/share/phpldapadmin/htdocs/mass_delete.php/usr/share/phpldapadmin/htdocs/mass_edit.php/usr/share/phpldapadmin/htdocs/mass_update.php/usr/share/phpldapadmin/htdocs/modify_member_form.php/usr/share/phpldapadmin/htdocs/monitor.php/usr/share/phpldapadmin/htdocs/password_checker.php/usr/share/phpldapadmin/htdocs/purge_cache.php/usr/share/phpldapadmin/htdocs/query_engine.php/usr/share/phpldapadmin/htdocs/rdelete.php/usr/share/phpldapadmin/htdocs/refresh.php/usr/share/phpldapadmin/htdocs/rename.php/usr/share/phpldapadmin/htdocs/rename_form.php/usr/share/phpldapadmin/htdocs/schema.php/usr/share/phpldapadmin/htdocs/server_info.php/usr/share/phpldapadmin/htdocs/show_cache.php/usr/share/phpldapadmin/htdocs/template_engine.php/usr/share/phpldapadmin/htdocs/update.php/usr/share/phpldapadmin/htdocs/update_confirm.php/usr/share/phpldapadmin/htdocs/view_jpeg_photo.php/usr/share/phpldapadmin/htdocs/welcome.php/usr/share/phpldapadmin/index.php/usr/share/phpldapadmin/lib/usr/share/phpldapadmin/lib/AJAXTree.php/usr/share/phpldapadmin/lib/Attribute.php/usr/share/phpldapadmin/lib/AttributeFactory.php/usr/share/phpldapadmin/lib/BinaryAttribute.php

Page 140: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/lib/DateAttribute.php/usr/share/phpldapadmin/lib/DnAttribute.php/usr/share/phpldapadmin/lib/GidAttribute.php/usr/share/phpldapadmin/lib/HTMLTree.php/usr/share/phpldapadmin/lib/JpegAttribute.php/usr/share/phpldapadmin/lib/MassRender.php/usr/share/phpldapadmin/lib/MultiLineAttribute.php/usr/share/phpldapadmin/lib/ObjectClassAttribute.php/usr/share/phpldapadmin/lib/PageRender.php/usr/share/phpldapadmin/lib/PasswordAttribute.php/usr/share/phpldapadmin/lib/Query.php/usr/share/phpldapadmin/lib/QueryRender.php/usr/share/phpldapadmin/lib/RandomPasswordAttribute.php/usr/share/phpldapadmin/lib/SambaPasswordAttribute.php/usr/share/phpldapadmin/lib/SelectionAttribute.php/usr/share/phpldapadmin/lib/ShadowAttribute.php/usr/share/phpldapadmin/lib/Template.php/usr/share/phpldapadmin/lib/TemplateRender.php/usr/share/phpldapadmin/lib/Tree.php/usr/share/phpldapadmin/lib/TreeItem.php/usr/share/phpldapadmin/lib/Visitor.php/usr/share/phpldapadmin/lib/blowfish.php/usr/share/phpldapadmin/lib/common.php/usr/share/phpldapadmin/lib/config_default.php/usr/share/phpldapadmin/lib/createlm.php/usr/share/phpldapadmin/lib/ds.php/usr/share/phpldapadmin/lib/ds_ldap.php/usr/share/phpldapadmin/lib/ds_ldap_pla.php/usr/share/phpldapadmin/lib/emuhash_functions.php/usr/share/phpldapadmin/lib/export_functions.php/usr/share/phpldapadmin/lib/functions.php/usr/share/phpldapadmin/lib/hooks.php/usr/share/phpldapadmin/lib/import_functions.php/usr/share/phpldapadmin/lib/ldap_error_codes.txt/usr/share/phpldapadmin/lib/ldap_supported_oids.txt/usr/share/phpldapadmin/lib/page.php/usr/share/phpldapadmin/lib/query_functions.php/usr/share/phpldapadmin/lib/schema_functions.php/usr/share/phpldapadmin/lib/session_functions.php/usr/share/phpldapadmin/lib/syslog.php/usr/share/phpldapadmin/lib/template_functions.php/usr/share/phpldapadmin/lib/xml2array.php/usr/share/phpldapadmin/lib/xmlTemplates.php/usr/share/phpldapadmin/locale/usr/share/phpldapadmin/locale/ca_ES/usr/share/phpldapadmin/locale/ca_ES/LC_MESSAGES/usr/share/phpldapadmin/locale/ca_ES/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/cs_CZ/usr/share/phpldapadmin/locale/cs_CZ/LC_MESSAGES/usr/share/phpldapadmin/locale/cs_CZ/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/da_DK/usr/share/phpldapadmin/locale/da_DK/LC_MESSAGES/usr/share/phpldapadmin/locale/da_DK/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/de_DE/usr/share/phpldapadmin/locale/de_DE/LC_MESSAGES/usr/share/phpldapadmin/locale/de_DE/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/es_ES/usr/share/phpldapadmin/locale/es_ES/LC_MESSAGES/usr/share/phpldapadmin/locale/es_ES/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/fi_FI/usr/share/phpldapadmin/locale/fi_FI/LC_MESSAGES/usr/share/phpldapadmin/locale/fi_FI/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/fr_FR/usr/share/phpldapadmin/locale/fr_FR/LC_MESSAGES/usr/share/phpldapadmin/locale/fr_FR/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/hu_HU/usr/share/phpldapadmin/locale/hu_HU/LC_MESSAGES/usr/share/phpldapadmin/locale/hu_HU/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/it_IT

Page 141: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/usr/share/phpldapadmin/locale/it_IT/LC_MESSAGES/usr/share/phpldapadmin/locale/it_IT/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/ja_JP/usr/share/phpldapadmin/locale/ja_JP/LC_MESSAGES/usr/share/phpldapadmin/locale/ja_JP/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/nl_BE/usr/share/phpldapadmin/locale/nl_BE/LC_MESSAGES/usr/share/phpldapadmin/locale/nl_BE/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/oc_FR/usr/share/phpldapadmin/locale/oc_FR/LC_MESSAGES/usr/share/phpldapadmin/locale/oc_FR/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/pl_PL/usr/share/phpldapadmin/locale/pl_PL/LC_MESSAGES/usr/share/phpldapadmin/locale/pl_PL/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/pt_BR/usr/share/phpldapadmin/locale/pt_BR/LC_MESSAGES/usr/share/phpldapadmin/locale/pt_BR/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/ru_RU/usr/share/phpldapadmin/locale/ru_RU/LC_MESSAGES/usr/share/phpldapadmin/locale/ru_RU/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/sk_SK/usr/share/phpldapadmin/locale/sk_SK/LC_MESSAGES/usr/share/phpldapadmin/locale/sk_SK/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/sv_FI/usr/share/phpldapadmin/locale/sv_FI/LC_MESSAGES/usr/share/phpldapadmin/locale/sv_FI/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/zh_CN/usr/share/phpldapadmin/locale/zh_CN/LC_MESSAGES/usr/share/phpldapadmin/locale/zh_CN/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/locale/zh_TW/usr/share/phpldapadmin/locale/zh_TW/LC_MESSAGES/usr/share/phpldapadmin/locale/zh_TW/LC_MESSAGES/messages.mo/usr/share/phpldapadmin/queries/usr/share/phpldapadmin/queries/SambaUsers.xml/usr/share/phpldapadmin/queries/UserList.xml/usr/share/phpldapadmin/queries/query.dtd/usr/share/phpldapadmin/templates/usr/share/phpldapadmin/templates/creation/usr/share/phpldapadmin/templates/creation/alias.xml/usr/share/phpldapadmin/templates/creation/courierMailAccount.xml/usr/share/phpldapadmin/templates/creation/courierMailAlias.xml/usr/share/phpldapadmin/templates/creation/dNSDomain.xml/usr/share/phpldapadmin/templates/creation/example.xml/usr/share/phpldapadmin/templates/creation/inetOrgPerson.xml/usr/share/phpldapadmin/templates/creation/kolabPerson.xml/usr/share/phpldapadmin/templates/creation/mozillaOrgPerson.xml/usr/share/phpldapadmin/templates/creation/organizationalRole.xml/usr/share/phpldapadmin/templates/creation/ou.xml/usr/share/phpldapadmin/templates/creation/posixAccount.xml/usr/share/phpldapadmin/templates/creation/posixGroup.xml/usr/share/phpldapadmin/templates/creation/sambaDomain.xml/usr/share/phpldapadmin/templates/creation/sambaGroupMapping.xml/usr/share/phpldapadmin/templates/creation/sambaMachine.xml/usr/share/phpldapadmin/templates/creation/sambaSamAccount.xml/usr/share/phpldapadmin/templates/creation/sendmailMTAAliasObject.xml/usr/share/phpldapadmin/templates/creation/sendmailMTAClass.xml/usr/share/phpldapadmin/templates/creation/sendmailMTACluster.xml/usr/share/phpldapadmin/templates/creation/sendmailMTAMapObject.xml/usr/share/phpldapadmin/templates/creation/sendmailVirtualDomain.xml/usr/share/phpldapadmin/templates/creation/sendmailVirtualUser.xml/usr/share/phpldapadmin/templates/creation/simpleSecurityObject.xml/usr/share/phpldapadmin/templates/modification/usr/share/phpldapadmin/templates/modification/inetOrgPerson.xml/usr/share/phpldapadmin/templates/modification/posixGroup.xml/usr/share/phpldapadmin/templates/template.dtd

Page 142: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

Konfiguration

Laut dem phpLDAPadmin Wiki Eintrag machen wir uns nun an die Konfiguration unserer PHP-Anwendung. Die Konfigurationsdatei config.php wurde uns bei der Installation unseres RPM-Paketes unter /etc/phpldapadmin abgelegt. Zur Anbindung an unseren bereits installierten OpenLDAP-Servers ändern wir nun diese Konfigurationsdatei /etc/phpldapadmin/config.php unseren Bedürfnissen und unserer Umgebung entsprechend ab.

# vim /etc/phpldapadmin/config.php

Dort ändern wir bzw. passend folgende Werte unserer Umgebung an:

Sprache

$config->custom->appearance['language'] = 'de_DE';

Zeitzone

$config->custom->appearance['timezone'] = 'Europe/Berlin';

LOGO-Download

$config->custom->appearance['remoteurls'] = false;

Warnmeldungen

$config->custom->appearance['hide_template_warning'] = true;

LDAP-Server Name

$servers->setValue('server','name','ldap.dmz.nausch.org');

LDAP-URI

$servers->setValue('server','host','ldaps://ldap.dmz.nausch.prg');

LDAP BIND ID

$servers->setValue('login','bind_id','cn=Manager,dc=nausch,dc=org');

Passwort Hash-Algorithmus

$servers->setValue('appearance','password_hash','ssha');

LOGIN Attribut

$servers->setValue('login','attr','dn');

Somit ergibt sich folgende Gesamtkonfigurationsdatei.

/etc/phpldapadmin/config.php

<?php/** NOTE ** ** Make sure that <?php is the FIRST line of this file! ** IE: There should NOT be any blank lines or spaces BEFORE <?php **/ /**

Page 143: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

* The phpLDAPadmin config file * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php * * This is where you can customise some of the phpLDAPadmin defaults * that are defined in config_default.php. * * To override a default, use the $config->custom variable to do so. * For example, the default for defining the language in config_default.php * * $this->default->appearance['language'] = array( * 'desc'=>'Language', * 'default'=>'auto'); * * to override this, use $config->custom->appearance['language'] = 'en_EN'; * * This file is also used to configure your LDAP server connections. * * You must specify at least one LDAP server there. You may add * as many as you like. You can also specify your language, and * many other options. * * NOTE: Commented out values in this file prefixed by //, represent the * defaults that have been defined in config_default.php. * Commented out values prefixed by #, dont reflect their default value, you can * check config_default.php if you want to see what the default is. * * DONT change config_default.php, you changes will be lost by the next release * of PLA. Instead change this file - as it will NOT be replaced by a new * version of phpLDAPadmin. */ /********************************************* * Useful important configuration overrides * *********************************************/ /* If you are asked to put PLA in debug mode, this is how you do it: */# $config->custom->debug['level'] = 255;# $config->custom->debug['syslog'] = true;# $config->custom->debug['file'] = '/tmp/pla_debug.log';

/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this to a big random string. */$config->custom->session['blowfish'] = 'c0f84d44993c89604678f9eabe68acfc'; # Autogenerated for vml000090.dmz.nausch.org

/* If your auth_type is http, you can override your HTTP Authentication Realm. */// $config->custom->session['http_realm'] = sprintf('%s %s',app_name(),'login'); /* The language setting. If you set this to 'auto', phpLDAPadmin will attempt to determine your language automatically. If PLA doesnt show (all) strings in your language, then you can do some translation at http://translations.launchpad.net/phpldapadmin and download the translation files, replacing those provided with PLA. (We'll pick up the translations before making the next release too!) */// $config->custom->appearance['language'] = 'auto';// Django 2012-01-07 : Sprache auf Deutsch fest eingestellt$config->custom->appearance['language'] = 'de_DE'; /* The temporary storage directory where we will put jpegPhoto data This directory must be readable and writable by your web server. */// $config->custom->jpeg['tmpdir'] = '/tmp'; // Example for Unix systems# $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems

/* Set this to (bool)true if you do NOT want a random salt used when calling crypt(). Instead, use the first two letters of the user's password. This is insecure but unfortunately needed for some older environments. */# $config->custom->password['no_random_crypt_salt'] = true;

Page 144: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/* PHP script timeout control. If php runs longer than this many seconds then PHP will stop with an Maximum Execution time error. Increase this value from the default if queries to your LDAP server are slow. The default is either 30 seconds or the setting of max_exection_time if this is null. */// $config->custom->session['timelimit'] = 30; // $config->custom->appearance['show_clear_password'] = false; // $config->custom->search['size_limit'] = 50;# $config->custom->search['size_limit'] = 1000;

/* Our local timezone This is to make sure that when we ask the system for the current time, we get the right local time. If this is not set, all time() calculations will assume UTC if you have not set PHP date.timezone. */// $config->custom->appearance['timezone'] = null;# $config->custom->appearance['timezone'] = 'Australia/Melbourne';// Django 2012-01-07 : Zeitzone auf Europa/berlin eingestellt$config->custom->appearance['timezone'] = 'Europe/Berlin'; /********************************************* * Commands * *********************************************/ /* Command availability ; if you don't authorize a command the command links will not be shown and the command action will not be permitted. For better security, set also ACL in your ldap directory. *//*$config->custom->commands['cmd'] = array(

'entry_internal_attributes_show' => true,'entry_refresh' => true,'oslinks' => true,'switch_template' => true

); $config->custom->commands['script'] = array(

'add_attr_form' => true,'add_oclass_form' => true,'add_value_form' => true,'collapse' => true,'compare' => true,'compare_form' => true,'copy' => true,'copy_form' => true,'create' => true,'create_confirm' => true,'delete' => true,'delete_attr' => true,'delete_form' => true,'draw_tree_node' => true,'expand' => true,'export' => true,'export_form' => true,'import' => true,'import_form' => true,'login' => true,'logout' => true,'login_form' => true,'mass_delete' => true,'mass_edit' => true,'mass_update' => true,'modify_member_form' => true,'monitor' => true,'purge_cache' => true,'query_engine' => true,'rename' => true,'rename_form' => true,'rdelete' => true,'refresh' => true,

Page 145: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

'schema' => true,'server_info' => true,'show_cache' => true,'template_engine' => true,'update_confirm' => true,'update' => true

);*/ /********************************************* * Appearance * *********************************************/ /* If you want to choose the appearance of the tree, specify a class name which inherits from the Tree class. */// $config->custom->appearance['tree'] = 'AJAXTree';# $config->custom->appearance['tree'] = 'HTMLTree';

/* Just show your custom templates. */// $config->custom->appearance['custom_templates_only'] = false; /* Disable the default template. */// $config->custom->appearance['disable_default_template'] = false; /* Hide the warnings for invalid objectClasses/attributes in templates. */// $config->custom->appearance['hide_template_warning'] = false;// Django 2012-01-07 : Ausgabe von Warnmeldungen unterbinden$config->custom->appearance['hide_template_warning'] = true; /* Set to true if you would like to hide header and footer parts. */// $config->custom->appearance['minimalMode'] = false; /* Configure what objects are shown in left hand tree */// $config->custom->appearance['tree_filter'] = '(objectclass=*)'; /* The height and width of the tree. If these values are not set, then no tree scroll bars are provided. */// $config->custom->appearance['tree_height'] = null;# $config->custom->appearance['tree_height'] = 600;// $config->custom->appearance['tree_width'] = null;# $config->custom->appearance['tree_width'] = 250;

/* Confirm create and update operations, allowing you to review the changes and optionally skip attributes during the create/update operation. */// $config->custom->confirm['create'] = true;// $config->custom->confirm['update'] = true; /* Confirm copy operations, and treat them like create operations. This allows you to edit the attributes (thus changing any that might conflict with uniqueness) before creating the new entry. */// $config->custom->confirm['copy'] = true; // Django : 2012-01-10 HTTP-Logo Download von sourceforge unterbinden$config->custom->appearance['remoteurls'] = false; /********************************************* * User-friendly attribute translation * *********************************************/ /* Use this array to map attribute names to user friendly names. For example, if you don't want to see "facsimileTelephoneNumber" but rather "Fax". */// $config->custom->appearance['friendly_attrs'] = array();$config->custom->appearance['friendly_attrs'] = array(

'facsimileTelephoneNumber' => 'Fax','gid' => 'Group','mail' => 'Email','telephoneNumber' => 'Telephone','uid' => 'User Name','userPassword' => 'Password'

Page 146: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

); /********************************************* * Hidden attributes * *********************************************/ /* You may want to hide certain attributes from being edited. If you want to hide attributes from the user, you should use your LDAP servers ACLs. NOTE: The user must be able to read the hide_attrs_exempt entry to be excluded. */// $config->custom->appearance['hide_attrs'] = array();# $config->custom->appearance['hide_attrs'] = array('objectClass');

/* Members of this list will be exempt from the hidden attributes. */// $config->custom->appearance['hide_attrs_exempt'] = null;# $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU';

/********************************************* * Read-only attributes * *********************************************/ /* You may want to phpLDAPadmin to display certain attributes as read only, meaning that users will not be presented a form for modifying those attributes, and they will not be allowed to be modified on the "back-end" either. You may configure this list here: NOTE: The user must be able to read the readonly_attrs_exempt entry to be excluded. */// $config->custom->appearance['readonly_attrs'] = array(); /* Members of this list will be exempt from the readonly attributes. */// $config->custom->appearance['readonly_attrs_exempt'] = null;# $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU';

/********************************************* * Group attributes * *********************************************/ /* Add "modify group members" link to the attribute. */// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid'); /* Configure filter for member search. This only applies to "modify group members" feature */// $config->custom->modify_member['filter'] = '(objectclass=Person)'; /* Attribute that is added to the group member attribute. */// $config->custom->modify_member['attr'] = 'dn'; /* For Posix attributes */// $config->custom->modify_member['posixattr'] = 'uid';// $config->custom->modify_member['posixfilter'] = '(uid=*)';// $config->custom->modify_member['posixgroupattr'] = 'memberUid'; /********************************************* * Support for attrs display order * *********************************************/ /* Use this array if you want to have your attributes displayed in a specific order. You can use default attribute names or their fridenly names. For example, "sn" will be displayed right after "givenName". All the other attributes that are not specified in this array will be displayed after in alphabetical order. */// $config->custom->appearance['attr_display_order'] = array();# $config->custom->appearance['attr_display_order'] = array(# 'givenName',# 'sn',# 'cn',# 'displayName',

Page 147: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# 'uid',# 'uidNumber',# 'gidNumber',# 'homeDirectory',# 'mail',# 'userPassword'# );

/********************************************* * Define your LDAP servers in this section * *********************************************/ $servers = new Datastore(); /* $servers->NewServer('ldap_pla') must be called before each new LDAP server declaration. */$servers->newServer('ldap_pla'); /* A convenient name that will appear in the tree viewer and throughout phpLDAPadmin to identify this LDAP server to users. */// Django : 2012-01-07 Festlegung des Servernamens// default : $servers->setValue('server','name','Local LDAP Server');$servers->setValue('server','name','ldap.dmz.nausch.org'); /* Examples: 'ldap.example.com', 'ldaps://ldap.example.com/', 'ldapi://%2fusr%local%2fvar%2frun%2fldapi' (Unix socket at /usr/local/var/run/ldap) */// $servers->setValue('server','host','127.0.0.1');// Django : 2012-01-07 Definitionen unseres LDAP-Servers im Netzwerk$servers->setValue('server','host','ldap://ldap.dmz.nausch.org'); /* The port your LDAP server listens on (no quotes). 389 is standard. */// $servers->setValue('server','port',389); /* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin auto-detect it for you. */// $servers->setValue('server','base',array('')); /* Five options for auth_type: 1. 'cookie': you will login via a web form, and a client-side cookie will store your login dn and password. 2. 'session': same as cookie but your login dn and password are stored on the web server in a persistent session variable. 3. 'http': same as session but your login dn and password are retrieved via HTTP authentication. 4. 'config': specify your login dn and password here in this config file. No login will be required to use phpLDAPadmin for this server. 5. 'sasl': login will be taken from the webserver's kerberos authentication. Currently only GSSAPI has been tested (using mod_auth_kerb).  Choose wisely to protect your authentication information appropriately for your situation. If you choose 'cookie', your cookie contents will be encrypted using blowfish and the secret your specify above as session['blowfish']. */// $servers->setValue('login','auth_type','session'); /* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or 'cookie','session' or 'sasl' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If you specify a login_attr in conjunction with a cookie or session auth_type, then you can also specify the bind_id/bind_pass here for searching the directory for users (ie, if your LDAP server does not allow anonymous binds. */// $servers->setValue('login','bind_id','');# $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');// Django : 2012-01-07 Definitionen des LDAP-Binds auf unserem LDAP-Server$servers->setValue('login','bind_id','cn=Manager,dc=nausch,dc=org'); 

Page 148: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

/* Your LDAP password. If you specified an empty bind_id above, this MUST also be blank. */// $servers->setValue('login','bind_pass','');# $servers->setValue('login','bind_pass','secret');

/* Use TLS (Transport Layer Security) to connect to the LDAP server. */// $servers->setValue('server','tls',false); /************************************ * SASL Authentication * ************************************/ /* Enable SASL authentication LDAP SASL authentication requires PHP 5.x configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to false), then all other sasl options are ignored. */// $servers->setValue('login','auth_type','sasl'); /* SASL auth mechanism */// $servers->setValue('sasl','mech','GSSAPI'); /* SASL authentication realm name */// $servers->setValue('sasl','realm','');# $servers->setValue('sasl','realm','EXAMPLE.COM');

/* SASL authorization ID name If this option is undefined, authorization id will be computed from bind DN, using authz_id_regex and authz_id_replacement. */// $servers->setValue('sasl','authz_id', null); /* SASL authorization id regex and replacement When authz_id property is not set (default), phpLDAPAdmin will try to figure out authorization id by itself from bind distinguished name (DN).  This procedure is done by calling preg_replace() php function in the following way:  $authz_id = preg_replace($sasl_authz_id_regex,$sasl_authz_id_replacement, $bind_dn);  For info about pcre regexes, see: - pcre(3), perlre(3) - http://www.php.net/preg_replace */// $servers->setValue('sasl','authz_id_regex',null);// $servers->setValue('sasl','authz_id_replacement',null);# $servers->setValue('sasl','authz_id_regex','/^uid=([^,]+)(.+)/i');# $servers->setValue('sasl','authz_id_replacement','$1');

/* SASL auth security props. See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */// $servers->setValue('sasl','props',null); /* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5, blowfish, crypt or leave blank for now default algorithm. */// $servers->setValue('appearance','password_hash','md5');// Django : 2012-01-07 Festlegung der Passwort-Hash-Algorithmen// default : $servers->setValue('appearance','password_hash','');$servers->setValue('appearance','password_hash','ssha'); /* If you specified 'cookie' or 'session' as the auth_type above, you can optionally specify here an attribute to use when logging in. If you enter 'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith) and log in as that user. Leave blank or specify 'dn' to use full DN for logging in. Note also that if your LDAP server requires you to login to perform searches, you can enter the DN to use when searching in 'bind_id' and 'bind_pass' above. */// $servers->setValue('login','attr','dn');// Django : 2012-01-07 Login-Attribute setzen// default : $servers->setValue('login','attr','uid');$servers->setValue('login','attr','dn');

Page 149: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

 /* Base DNs to used for logins. If this value is not set, then the LDAP server Base DNs are used. */// $servers->setValue('login','base',array()); /* If 'login,attr' is used above such that phpLDAPadmin will search for your DN at login, you may restrict the search to a specific objectClasses. EG, set this to array('posixAccount') or array('inetOrgPerson',..), depending upon your setup. */// $servers->setValue('login','class',array()); /* If you specified something different from 'dn', for example 'uid', as the login_attr above, you can optionally specify here to fall back to authentication with dn. This is useful, when users should be able to log in with their uid, but the ldap administrator wants to log in with his root-dn, that does not necessarily have the uid attribute. When using this feature, login_class is ignored. */// $servers->setValue('login','fallback_dn',false); /* Specify true If you want phpLDAPadmin to not display or permit any modification to the LDAP server. */// $servers->setValue('server','read_only',false); /* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links in the tree viewer. */// $servers->setValue('appearance','show_create',true); /* Set to true if you would like to initially open the first level of each tree. */// $servers->setValue('appearance','open_tree',false); /* This feature allows phpLDAPadmin to automatically determine the next available uidNumber for a new entry. */// $servers->setValue('auto_number','enable',true); /* The mechanism to use when finding the next available uidNumber. Two possible values: 'uidpool' or 'search'. The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to blindly lookup the next available uidNumber. The 'search' mechanism searches for entries with a uidNumber value and finds the first available uidNumber (slower). */// $servers->setValue('auto_number','mechanism','search'); /* The DN of the search base when the 'search' mechanism is used above. */# $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com');

/* The minimum number to use when searching for the next available number (only when 'search' is used for auto_number. */// $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500)); /* If you set this, then phpldapadmin will bind to LDAP with this user ID when searching for the uidnumber. The idea is, this user id would have full (readonly) access to uidnumber in your ldap directory (the logged in user may not), so that you can be guaranteed to get a unique uidnumber for your directory. */// $servers->setValue('auto_number','dn',null); /* The password for the dn above. */// $servers->setValue('auto_number','pass',null); /* Enable anonymous bind login. */// $servers->setValue('login','anon_bind',true); /* Use customized page with prefix when available. */# $servers->setValue('custom','pages_prefix','custom_');

/* If you set this, then only these DNs are allowed to log in. This array can contain individual users, groups or ldap search filter(s). Keep in mind that the user has not authenticated yet, so this will be an anonymous search to

Page 150: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

the LDAP server, so make your ACLs allow these searches to return results! */# $servers->setValue('login','allowed_dns',array(# 'uid=stran,ou=People,dc=example,dc=com',# '(&(gidNumber=811)(objectClass=groupOfNames))',# '(|(uidNumber=200)(uidNumber=201))',# 'cn=callcenter,ou=Group,dc=example,dc=com'));

/* Set this if you dont want this LDAP server to show in the tree */// $servers->setValue('server','visible',true); /* Set this if you want to hide the base DNs that dont exist instead of displaying the message "The base entry doesnt exist, create it?"// $servers->setValue('server','hide_noaccess_base',false);# $servers->setValue('server','hide_noaccess_base',true); /* This is the time out value in minutes for the server. After as many minutes of inactivity you will be automatically logged out. If not set, the default value will be ( session_cache_expire()-1 ) */# $servers->setValue('login','timeout',30);

/* Set this if you want phpldapadmin to perform rename operation on entry which has children. Certain servers are known to allow it, certain are not. */// $servers->setValue('server','branch_rename',false); /* If you set this, then phpldapadmin will show these attributes as internal attributes, even if they are not defined in your schema. */// $servers->setValue('server','custom_sys_attrs',array(''));# $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));

/* If you set this, then phpldapadmin will show these attributes on objects, even if they are not defined in your schema. */// $servers->setValue('server','custom_attrs',array(''));# $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));

/* These attributes will be forced to MAY attributes and become option in the templates. If they are not defined in the templates, then they wont appear as per normal template processing. You may want to do this because your LDAP server may automatically calculate a default value. In Fedora Directory Server using the DNA Plugin one could ignore uidNumber, gidNumber and sambaSID. */// $servers->setValue('server','force_may',array(''));# $servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));

/********************************************* * Unique attributes * *********************************************/ /* You may want phpLDAPadmin to enforce some attributes to have unique values (ie: not belong to other entries in your tree. This (together with 'unique','dn' and 'unique','pass' option will not let updates to occur with other attributes have the same value. */# $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));

/* If you set this, then phpldapadmin will bind to LDAP with this user ID when searching for attribute uniqueness. The idea is, this user id would have full (readonly) access to your ldap directory (the logged in user may not), so that you can be guaranteed to get a unique uidnumber for your directory. */// $servers->setValue('unique','dn',null); /* The password for the dn above. */// $servers->setValue('unique','pass',null); /************************************************************************** * If you want to configure additional LDAP servers, do so below. * * Remove the commented lines and use this section as a template for all * * your other LDAP servers. *

Page 151: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

**************************************************************************/ /*$servers->newServer('ldap_pla');$servers->setValue('server','name','LDAP Server');$servers->setValue('server','host','127.0.0.1');$servers->setValue('server','port',389);$servers->setValue('server','base',array(''));$servers->setValue('login','auth_type','cookie');$servers->setValue('login','bind_id','');$servers->setValue('login','bind_pass','');$servers->setValue('server','tls',false); # SASL auth$servers->setValue('login','auth_type','sasl');$servers->setValue('sasl','mech','GSSAPI');$servers->setValue('sasl','realm','EXAMPLE.COM');$servers->setValue('sasl','authz_id',null);$servers->setValue('sasl','authz_id_regex','/^uid=([^,]+)(.+)/i');$servers->setValue('sasl','authz_id_replacement','$1');$servers->setValue('sasl','props',null); $servers->setValue('appearance','password_hash','md5');$servers->setValue('login','attr','dn');$servers->setValue('login','fallback_dn',false);$servers->setValue('login','class',null);$servers->setValue('server','read_only',false);$servers->setValue('appearance','show_create',true); $servers->setValue('auto_number','enable',true);$servers->setValue('auto_number','mechanism','search');$servers->setValue('auto_number','search_base',null);$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));$servers->setValue('auto_number','dn',null);$servers->setValue('auto_number','pass',null); $servers->setValue('login','anon_bind',true);$servers->setValue('custom','pages_prefix','custom_');$servers->setValue('unique','attrs',array('mail','uid','uidNumber'));$servers->setValue('unique','dn',null);$servers->setValue('unique','pass',null); $servers->setValue('server','visible',true);$servers->setValue('login','timeout',30);$servers->setValue('server','branch_rename',false);$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));$servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));*/?>

Anpassung Webserver

Hier haben wir nun zwei Möglichkeiten phpLDAPadmin bereitzustellen.

phpldapadmin.conf

Im Verzeichnis /etc/httpd/conf.d/ wurde bei der Installation des RPMs eine Konfigurationsdatei mit dem Namen phpldapadmin.conf mit folgendem Inhalte abgelegt:

/etc/httpd/conf.d/phpldapadmin.conf

#

Page 152: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

# Web-based tool for managing LDAP servers# Alias /phpldapadmin /usr/share/phpldapadmin/htdocsAlias /ldapadmin /usr/share/phpldapadmin/htdocs <Directory /usr/share/phpldapadmin/htdocs> Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1</Directory>

Bei Bedarf passen wir unserer Umgebung entsprechend an.

virtueller Host

Oder wir legen uns alternativ zu der vorgenannten Variante einen VHOST an. Hierzu ergänzen wir unsere /etc/httpd/conf.d/vhosts.conf um folgende Zeilen.

/etc/httpd/conf.d/apache vhost.conf

## Web application to manage LDAP# phpldapadmin.nausch.org#<VirtualHost *:80> ServerAdmin [email protected] ServerName phpldapadmin.nausch.org ServerAlias www.phpldapadmin.nausch.org ServerPath / DocumentRoot "/usr/share/phpldapadmin/htdocs" <Directory "/usr/share/phpldapadmin/htdocs"> Options -Indexes FollowSymLinks Order deny,allow Deny from all Allow from 127.0.0.1 Allow from 10.0 </Directory> DirectoryIndex index.php ErrorLog logs/phpldapadmin_error.log CustomLog logs/phpldapadmin_access.log combined</VirtualHost>

Nutzen wir die Zugriffsvariante über einen vHOST, so deaktivieren wir noch den Zugriff über das Verzeichnis, in dem wir die zugehörige Konfigurationsdatei umbenennen.

# mv /etc/httpd/conf.d/phpldapadmin.conf /etc/httpd/conf.d/phpldapadmin.conf.orig

Egal welche der beiden Variante wir nutzen, damit der Webserver von den Änderungen auch etwas mitbekommt ist dieser nurchzustarten.

# service httpd restart httpd beenden: [ OK ] httpd starten: [ OK ]

Programmstart

Mit dem Browser unserer Wahl haben wir nun einen Zugang zu unserem LDAP-Server.

elinks http://host/phpLDAPadmin

bzw.

Page 153: Web viewNeben dem Server-Part openldap-server werden noch zwei Pakete welches zur Laufzeit des Servers benötigt werden installiert. ... # 1.b) mostly naive

elinks http://phpldapadmin.nausch.org

Links Zurück zum Kapitel >>OpenLDAP Server unter CentOS 6.x<< Zurück zu >>Projekte und Themenkapitel<< Zurück zur Startseite