OpenLDAP (Ubuntu 14 04): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 86: | Zeile 86: | ||
<pre> | <pre> | ||
nano db.ldif | nano db.ldif | ||
</pre> | |||
Die Datei ''/etc/ldap/schema/db.ldif'' mit folgenden Inhalt befüllen (2x ''<domain>'' und 2x ''Passwort'' ersetzen): | |||
<pre> | |||
########################################################### | |||
# DEFAULT DATABASE MODIFICATION | |||
########################################################### | |||
# Modify directory database | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
delete: olcSuffix | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcSuffix | |||
olcSuffix: dc=<domain>,dc=<local> | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
delete: olcRootDN | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcRootDN | |||
olcRootDN: cn=admin,dc=<domain>,dc=<local> | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
delete: olcRootPW | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcRootPW | |||
olcRootPW: {SSHA}dx0sCgNBPlx98eRYnun1QBNfrWUR6qM1 | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
delete: olcDbIndex | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcDbIndex | |||
olcDbIndex: uid pres,eq | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcDbIndex | |||
olcDbIndex: cn,sn,mail pres,eq,approx,sub | |||
dn: olcDatabase={1}hdb,cn=config | |||
changeType: modify | |||
add: olcDbIndex | |||
olcDbIndex: objectClass eq | |||
########################################################### | |||
# REMOTE CONFIGURATION DEFAULTS | |||
########################################################### | |||
# Some defaults need to be added in order to allow remote | |||
# access by DN cn=admin,cn=config to the LDAP config | |||
# database. Otherwise only local root will | |||
# administrative access. | |||
dn: olcDatabase={0}config,cn=config | |||
changetype: modify | |||
add: olcRootDN | |||
olcRootDN: cn=admin,cn=config | |||
dn: olcDatabase={0}config,cn=config | |||
changetype: modify | |||
add: olcRootPW | |||
olcRootPW: {SSHA}dx0sCgNBPlx98eRYnun1QBNfrWUR6qM1 | |||
</pre> | </pre> | ||
Version vom 25. Juli 2016, 09:59 Uhr
Noch in Bearbeitung
Folgende Installationsanleitung erfordert in den meisten Fällen Rootrechte, daher wechseln wir fix zur root-Shell:
sudo -i
Installation
sudo apt-get install slapd ldap-utils
sudo apt-get install smbldap-tools
sudo nano /etc/ldap/schema/schema_convert.conf
include /etc/ldap/schema/core.schema include /etc/ldap/schema/collective.schema include /etc/ldap/schema/corba.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/duaconf.schema include /etc/ldap/schema/dyngroup.schema include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/java.schema include /etc/ldap/schema/misc.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/openldap.schema include /etc/ldap/schema/ppolicy.schema include /etc/ldap/schema/ldapns.schema include /etc/ldap/schema/pmi.schema include /etc/ldap/schema/samba.schema
Samba Schema kopieren
sudo cp /usr/share/doc/samba/examples/LDAP/samba.schema.gz /etc/ldap/schema sudo gzip -d /etc/ldap/schema/samba.schema.gz
Konvertieren ins LDIF-Format
sudo -i
Zuerst ein temporäres Verzeichnis erstellen:
mkdir /tmp/ldif_output
cd /etc/ldap/schema slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 cd /tmp/ldif_output/cn\=config/cn\=schema/ cp cn={11}ppolicy.ldif cn={12}ldapns.ldif cn={13}samba.ldif cn={2}corba.ldif cn={4}duaconf.ldif cn={5}dyngroup.ldif cn={7}java.ldif /etc/ldap/schema
sudo mv /etc/ldap/schema/*.ldif <backup dir> sudo cp <temp dir>/*.ldif /etc/ldap/schema/
Konfiguration
cd /etc/ldap/schema/
slappasswd
nano db.ldif
Die Datei /etc/ldap/schema/db.ldif mit folgenden Inhalt befüllen (2x <domain> und 2x Passwort ersetzen):
########################################################### # DEFAULT DATABASE MODIFICATION ########################################################### # Modify directory database dn: olcDatabase={1}hdb,cn=config changeType: modify delete: olcSuffix dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcSuffix olcSuffix: dc=<domain>,dc=<local> dn: olcDatabase={1}hdb,cn=config changeType: modify delete: olcRootDN dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcRootDN olcRootDN: cn=admin,dc=<domain>,dc=<local> dn: olcDatabase={1}hdb,cn=config changeType: modify delete: olcRootPW dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcRootPW olcRootPW: {SSHA}dx0sCgNBPlx98eRYnun1QBNfrWUR6qM1 dn: olcDatabase={1}hdb,cn=config changeType: modify delete: olcDbIndex dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcDbIndex olcDbIndex: uid pres,eq dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcDbIndex olcDbIndex: cn,sn,mail pres,eq,approx,sub dn: olcDatabase={1}hdb,cn=config changeType: modify add: olcDbIndex olcDbIndex: objectClass eq ########################################################### # REMOTE CONFIGURATION DEFAULTS ########################################################### # Some defaults need to be added in order to allow remote # access by DN cn=admin,cn=config to the LDAP config # database. Otherwise only local root will # administrative access. dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootDN olcRootDN: cn=admin,cn=config dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}dx0sCgNBPlx98eRYnun1QBNfrWUR6qM1
Links
https://wiki.ubuntuusers.de/OpenLDAP_ab_Precise/
http://phpldapadmin.sourceforge.net/wiki/index.php/Main_Page
Zurück zu Ubuntu