From a3d60c80d9f39ee6a0410dcdd5c778d0b7511c9d Mon Sep 17 00:00:00 2001 From: Julie Pichon Date: Fri, 21 Nov 2014 14:57:16 +0000 Subject: [PATCH] Explicitly pass in SLAPPASS when setting up LDAP Change-Id: Ibcceabf2c76aaeeb8902a670557cc0093943a3e4 Closes-Bug: #1373750 --- lib/ldap | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ldap b/lib/ldap index a6fb82f6f2..2a3ba64efb 100644 --- a/lib/ldap +++ b/lib/ldap @@ -51,9 +51,10 @@ fi # _ldap_varsubst file function _ldap_varsubst { local infile=$1 + local slappass=$2 sed -e " s|\${LDAP_OLCDB_NUMBER}|$LDAP_OLCDB_NUMBER| - s|\${SLAPPASS}|$SLAPPASS| + s|\${SLAPPASS}|$slappass| s|\${LDAP_ROOTPW_COMMAND}|$LDAP_ROOTPW_COMMAND| s|\${BASE_DC}|$LDAP_BASE_DC| s|\${BASE_DN}|$LDAP_BASE_DN| @@ -130,7 +131,7 @@ function install_ldap { printf "LDAP secret is $slappass\n" # Create manager.ldif and add to olcdb - _ldap_varsubst $FILES/ldap/manager.ldif.in >$tmp_ldap_dir/manager.ldif + _ldap_varsubst $FILES/ldap/manager.ldif.in $slappass >$tmp_ldap_dir/manager.ldif sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f $tmp_ldap_dir/manager.ldif # On fedora we need to manually add cosine and inetorgperson schemas