Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tutorial:ldap:installopenldap [2016-04-03 22:19] – [Add Some Data] weichbr | tutorial:ldap:installopenldap [2025-06-16 14:43] (current) – removed weichbr | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{tag> | ||
| - | ====== Install and configure OpenLDAP on Debian 8 (Jessie) ====== | ||
| - | |||
| - | ===== Requirements ===== | ||
| - | * Debian 8 installation | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Installation ===== | ||
| - | * < | ||
| - | * During installation, | ||
| - | * Open '' | ||
| - | * < | ||
| - | # | ||
| - | # LDAP Defaults | ||
| - | # | ||
| - | |||
| - | # See ldap.conf(5) for details | ||
| - | # This file should be world readable but not world writable. | ||
| - | |||
| - | BASE dc=my, | ||
| - | URI | ||
| - | |||
| - | # | ||
| - | # | ||
| - | # | ||
| - | |||
| - | # TLS certificates (needed for GnuTLS) | ||
| - | TLS_CACERT | ||
| - | |||
| - | TLS_REQCERT ALLOW | ||
| - | </ | ||
| - | * Run '' | ||
| - | * Answer the following prompts this way: | ||
| - | |||
| - | | Omit OpenLDAP server configuration? | ||
| - | | Organization name: | <pick something> | ||
| - | | Administrator password: | ||
| - | | Confirm password: | ||
| - | | Database backend to use: | MDB | | ||
| - | | Do you want the database to be removed when slapd is purged? | ||
| - | | Move old database? | ||
| - | | Allow LDAPv2 protocol? | ||
| - | |||
| - | * Test connection: | ||
| - | * < | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Add Some Data ===== | ||
| - | * We want to create some basic organizational units (OUs), e.g. for people and groups | ||
| - | * Create '' | ||
| - | * < | ||
| - | dn: ou=people, | ||
| - | objectClass: | ||
| - | ou: people | ||
| - | |||
| - | dn: ou=groups, | ||
| - | objectClass: | ||
| - | ou: groups | ||
| - | </ | ||
| - | * Add it with '' | ||
| - | * < | ||
| - | |||
| - | ---- | ||
| - | ===== Enforce Authorization ===== | ||
| - | * We do not want our directory to be world readable, so we need to setup some ACLs | ||
| - | * | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ===== Enabling TLS ===== | ||
| - | * Make sure you have the following files: | ||
| - | * cert.crt - Your certificate (without any other intermediate certs) | ||
| - | * cert.key - Your private key | ||
| - | * chain.pem - The intermediate certs | ||
| - | * I assume the files are located at '' | ||
| - | * Add the openldap user to the ssl-cert group: | ||
| - | * < | ||
| - | * chown your files and set permissions: | ||
| - | * < | ||
| - | $> chown root: | ||
| - | $> chmod 640 cert.crt cert.key chain.pem | ||
| - | </ | ||
| - | * Create the tls.ldif file: | ||
| - | * < | ||
| - | dn: cn=config | ||
| - | changetype: modify | ||
| - | add: olcTLSCipherSuite | ||
| - | olcTLSCipherSuite: | ||
| - | - | ||
| - | add: olcTLSCRLCheck | ||
| - | olcTLSCRLCheck: | ||
| - | - | ||
| - | add: olcTLSVerifyClient | ||
| - | olcTLSVerifyClient: | ||
| - | - | ||
| - | add: olcTLSCACertificateFile | ||
| - | olcTLSCACertificateFile: | ||
| - | - | ||
| - | add: olcTLSCertificateFile | ||
| - | olcTLSCertificateFile: | ||
| - | - | ||
| - | add: olcTLSCertificateKeyFile | ||
| - | olcTLSCertificateKeyFile: | ||
| - | - | ||
| - | add: olcTLSProtocolMin | ||
| - | olcTLSProtocolMin: | ||
| - | </ | ||
| - | * And apply it | ||
| - | * < | ||
| - | * To enforce TLS create the following ldif file and apply it: | ||
| - | * < | ||
| - | dn: olcDatabase={1}mdb, | ||
| - | changetype: modify | ||
| - | add: olcSecurity | ||
| - | olcSecurity: | ||
| - | </ | ||