Explicitly pass in SLAPPASS when setting up LDAP
Change-Id: Ibcceabf2c76aaeeb8902a670557cc0093943a3e4 Closes-Bug: #1373750
This commit is contained in:
parent
f4fed56e93
commit
a3d60c80d9
5
lib/ldap
5
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
|
||||
|
Loading…
Reference in New Issue
Block a user