Merge "Explicitly pass in SLAPPASS when setting up LDAP"
This commit is contained in:
commit
238f55f749
5
lib/ldap
5
lib/ldap
@ -51,9 +51,10 @@ fi
|
|||||||
# _ldap_varsubst file
|
# _ldap_varsubst file
|
||||||
function _ldap_varsubst {
|
function _ldap_varsubst {
|
||||||
local infile=$1
|
local infile=$1
|
||||||
|
local slappass=$2
|
||||||
sed -e "
|
sed -e "
|
||||||
s|\${LDAP_OLCDB_NUMBER}|$LDAP_OLCDB_NUMBER|
|
s|\${LDAP_OLCDB_NUMBER}|$LDAP_OLCDB_NUMBER|
|
||||||
s|\${SLAPPASS}|$SLAPPASS|
|
s|\${SLAPPASS}|$slappass|
|
||||||
s|\${LDAP_ROOTPW_COMMAND}|$LDAP_ROOTPW_COMMAND|
|
s|\${LDAP_ROOTPW_COMMAND}|$LDAP_ROOTPW_COMMAND|
|
||||||
s|\${BASE_DC}|$LDAP_BASE_DC|
|
s|\${BASE_DC}|$LDAP_BASE_DC|
|
||||||
s|\${BASE_DN}|$LDAP_BASE_DN|
|
s|\${BASE_DN}|$LDAP_BASE_DN|
|
||||||
@ -130,7 +131,7 @@ function install_ldap {
|
|||||||
printf "LDAP secret is $slappass\n"
|
printf "LDAP secret is $slappass\n"
|
||||||
|
|
||||||
# Create manager.ldif and add to olcdb
|
# 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
|
sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f $tmp_ldap_dir/manager.ldif
|
||||||
|
|
||||||
# On fedora we need to manually add cosine and inetorgperson schemas
|
# On fedora we need to manually add cosine and inetorgperson schemas
|
||||||
|
Loading…
Reference in New Issue
Block a user