Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Bugfix "slapadd: (..) )attribute 'dc' cannot have multiple values"
Browse files Browse the repository at this point in the history
  • Loading branch information
danie1k committed Jan 28, 2021
1 parent 793b52a commit c5699c5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY ./docker/ /

# OpenLDAP
ENV DOMAIN_NAME="local"
ENV DOMAIN_NAME_DC="local"
ENV LDAPCONF=/etc/openldap/slapd.conf
ENV LDAP_CONF_DIR=/etc/openldap/slapd.d
ENV LDAP_INIT_DIR=/var/lib/openldap/openldap-init
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Based on:

## Environment Variables you should set

- `DOMAIN_NAME` -- Domain name for LDAP suffix
- `DOMAIN_NAME` -- Domain name for LDAP suffix (i.e.: `example.com`)
- `DOMAIN_NAME_DC` -- [DomainComponent] for LDAP database (single word, no dots, i.e.: `example`)
- `LDAP_ROOT_USERNAME` -- root/admin user name for [OpenLDAP]
- `LDAP_ROOT_PASSWORD` -- password for [OpenLDAP] root/admin user \*

Expand Down Expand Up @@ -75,6 +76,7 @@ Based on:
MIT


[DomainComponent]: https://ldapwiki.com/wiki/DomainComponent
[LDIF]: https://www.openldap.org/software//man.cgi?query=LDIF&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release
[OpenLDAP]: https://www.openldap.org/
[nginx]: https://www.nginx.com/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dn: ${LDAP_DN}
objectClass: dcObject
objectClass: organization
${LDAP_DC_VERTICAL}
dc: ${DOMAIN_NAME_DC}
o: ${DOMAIN_NAME}
description: Example directory
3 changes: 0 additions & 3 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ readonly LDAP_DN="dc=${DOMAIN_NAME//\./,dc=}"
readonly LDAP_ROOTDN="cn=${LDAP_ROOT_USERNAME},${LDAP_DN}"
# shellcheck disable=SC2154
readonly LDAP_ROOTPW="${LDAP_ROOT_PASSWORD}"
# shellcheck disable=SC2001
readonly LDAP_DC_VERTICAL=$(echo "${LDAP_DN//=/: }" | sed 's/,/\n/g')
export LDAP_DN
export LDAP_ROOTDN
export LDAP_ROOTPW
export LDAP_DC_VERTICAL

init_nginx
init_openldap
Expand Down

0 comments on commit c5699c5

Please sign in to comment.