Update entrypoint.sh
This commit is contained in:
parent
5916fe91e6
commit
db30192e9c
@ -72,6 +72,31 @@ EOF
|
|||||||
# enable the policies module
|
# enable the policies module
|
||||||
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f enable_ppolicy.ldif
|
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f enable_ppolicy.ldif
|
||||||
|
|
||||||
|
echo "Preparing the basic password overlay..."
|
||||||
|
|
||||||
|
# prepare the .ldif files to create a basic overlay of password policies
|
||||||
|
cat > passwd_ppolicy_overlay.ldif << EOF
|
||||||
|
dn: cn=default,ou=policies,dc=example,dc=com
|
||||||
|
objectClass: pwdPolicy
|
||||||
|
objectClass: organizationalRole
|
||||||
|
cn: default
|
||||||
|
pwdAttribute: userPassword
|
||||||
|
pwdMinLength: 8
|
||||||
|
pwdCheckQuality: 2
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > policies_ou.ldif << EOF
|
||||||
|
dn: ou=policies,dc=example,dc=com
|
||||||
|
objectClass: top
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: policies
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# enable the overlay
|
||||||
|
ldapadd -D "cn=admin,dc=example,dc=com" -w admin -H ldapi:/// -f policies_ou.ldif
|
||||||
|
|
||||||
|
ldapadd -x -D "cn=admin,dc=example,dc=com" -w admin -H ldapi:/// -f passwd_ppolicy_overlay.ldif
|
||||||
|
|
||||||
echo "openLDAP framework ready."
|
echo "openLDAP framework ready."
|
||||||
|
|
||||||
# execute the command passed to the container
|
# execute the command passed to the container
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user