Skip to content

Commit 67f3ada

Browse files
maximthomasvharseko
authored andcommitted
allow pre encoded passwords (#54)
1 parent 9b5a286 commit 67f3ada

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • opendj-packages/opendj-docker/bootstrap

opendj-packages/opendj-docker/bootstrap/setup.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ echo "Setting up default OpenDJ instance"
99
--baseDN $BASE_DN -h localhost --rootUserPassword "$ROOT_PASSWORD" \
1010
--acceptLicense --no-prompt $ADD_BASE_ENTRY #--sampleData 1
1111

12-
1312
if [ -d /opt/opendj/bootstrap/schema/ ]; then
1413
echo "Loading initial schema:"
1514
for file in /opt/opendj/bootstrap/schema/*; do
@@ -19,7 +18,16 @@ if [ -d /opt/opendj/bootstrap/schema/ ]; then
1918
fi
2019

2120
if [ -d /opt/opendj/bootstrap/data/ ]; then
22-
echo "Loading initial data:"
21+
#allow pre encoded passwords
22+
/opt/opendj/bin/dsconfig \
23+
set-password-policy-prop \
24+
--bindDN "cn=Directory Manager" \
25+
--bindPassword "$ROOT_PASSWORD" \
26+
--policy-name "Default Password Policy" \
27+
--set allow-pre-encoded-passwords:true \
28+
--trustAll \
29+
--no-prompt
30+
2331
for file in /opt/opendj/bootstrap/data/*; do
2432
echo "Loading $file ..."
2533
/opt/opendj/bin/ldapmodify -D "$ROOT_USER_DN" -h localhost -p $PORT -w $ROOT_PASSWORD -f $file

0 commit comments

Comments
 (0)