mirror of
https://github.com/vegardit/docker-openldap.git
synced 2026-05-21 12:14:16 +02:00
remove default value for LDAP_INIT_ROOT_USER_PW
This commit is contained in:
parent
a6f4270362
commit
453ab1ce43
|
|
@ -89,7 +89,7 @@ ENV \
|
||||||
LDAP_INIT_ORG_NAME='Example Corporation' \
|
LDAP_INIT_ORG_NAME='Example Corporation' \
|
||||||
LDAP_INIT_ADMIN_GROUP_DN='cn=ldapadmins,ou=Groups,${LDAP_INIT_ORG_DN}' \
|
LDAP_INIT_ADMIN_GROUP_DN='cn=ldapadmins,ou=Groups,${LDAP_INIT_ORG_DN}' \
|
||||||
LDAP_INIT_ROOT_USER_DN='uid=admin,${LDAP_INIT_ORG_DN}' \
|
LDAP_INIT_ROOT_USER_DN='uid=admin,${LDAP_INIT_ORG_DN}' \
|
||||||
LDAP_INIT_ROOT_USER_PW='changeit' \
|
LDAP_INIT_ROOT_USER_PW='' \
|
||||||
LDAP_INIT_PPOLICY_DEFAULT_DN='cn=DefaultPasswordPolicy,ou=Policies,${LDAP_INIT_ORG_DN}' \
|
LDAP_INIT_PPOLICY_DEFAULT_DN='cn=DefaultPasswordPolicy,ou=Policies,${LDAP_INIT_ORG_DN}' \
|
||||||
LDAP_INIT_PPOLICY_PW_MIN_LENGTH=8 \
|
LDAP_INIT_PPOLICY_PW_MIN_LENGTH=8 \
|
||||||
LDAP_INIT_PPOLICY_MAX_FAILURES=3 \
|
LDAP_INIT_PPOLICY_MAX_FAILURES=3 \
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,14 @@ if [ ! -e /etc/ldap/slapd.d/initialized ]; then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z "${LDAP_INIT_ROOT_USER_PW:-}" ]; then
|
||||||
|
log ERROR "LDAP_INIT_ROOT_USER_PW variable is not set!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# LDAP_INIT_ROOT_USER_PW_HASHED is used in /opt/ldifs/init_mdb_acls.ldif
|
||||||
LDAP_INIT_ROOT_USER_PW_HASHED=$(slappasswd -s "${LDAP_INIT_ROOT_USER_PW}")
|
LDAP_INIT_ROOT_USER_PW_HASHED=$(slappasswd -s "${LDAP_INIT_ROOT_USER_PW}")
|
||||||
|
|
||||||
/etc/init.d/slapd start
|
/etc/init.d/slapd start
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
|
|
@ -158,7 +165,7 @@ if [ -n "${LDAP_BACKUP_TIME:-}" ]; then
|
||||||
log INFO "--------------------------------------------"
|
log INFO "--------------------------------------------"
|
||||||
log INFO "Configuring LDAP backup task to run daily: time=[${LDAP_BACKUP_TIME}] file=[$LDAP_BACKUP_FILE]..."
|
log INFO "Configuring LDAP backup task to run daily: time=[${LDAP_BACKUP_TIME}] file=[$LDAP_BACKUP_FILE]..."
|
||||||
if [[ "$LDAP_BACKUP_TIME" != +([0-9][0-9]:[0-9][0-9]) ]]; then
|
if [[ "$LDAP_BACKUP_TIME" != +([0-9][0-9]:[0-9][0-9]) ]]; then
|
||||||
log INFO "The configured value [$LDAP_BACKUP_TIME] for LDAP_BACKUP_TIME is not in the expected 24-hour format [hh:mm]!"
|
log ERROR "The configured value [$LDAP_BACKUP_TIME] for LDAP_BACKUP_TIME is not in the expected 24-hour format [hh:mm]!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue