mirror of
https://github.com/luzifer-docker/openldap.git
synced 2024-12-20 20:51:17 +00:00
Write hashed passwords into the templates
for security reasons Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b574af5b79
commit
53dd372dfd
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,10 @@ set -euxo pipefail
|
||||||
export SLAPD_CONFDIR=/etc/openldap/slapd.d
|
export SLAPD_CONFDIR=/etc/openldap/slapd.d
|
||||||
export SLAPD_DATADIR=/var/lib/openldap/openldap-data
|
export SLAPD_DATADIR=/var/lib/openldap/openldap-data
|
||||||
|
|
||||||
|
# Hash passwords
|
||||||
|
[ -n "${SLAPD_PASSWORD}" ] && export SLAPD_PASSWORD=$(slappasswd -h '{SSHA}' -s "${SLAPD_PASSWORD}" -n)
|
||||||
|
[ -n "${SLAPD_CONFIG_PASSWORD}" ] && export SLAPD_CONFIG_PASSWORD=$(slappasswd -h '{SSHA}' -s "${SLAPD_CONFIG_PASSWORD}" -n)
|
||||||
|
|
||||||
# Generate SLAPD_SUFFIX from given domain
|
# Generate SLAPD_SUFFIX from given domain
|
||||||
IFS="."
|
IFS="."
|
||||||
declare -a dc_parts=(${SLAPD_DOMAIN:-example.com})
|
declare -a dc_parts=(${SLAPD_DOMAIN:-example.com})
|
||||||
|
|
Loading…
Reference in a new issue