Merge "Quote password in ldap command"

This commit is contained in:
Zuul 2020-11-02 14:48:31 +00:00 committed by Gerrit Code Review
commit 1ff36f9807

View File

@ -126,7 +126,7 @@ class platform::ldap::bootstrap
$dn = 'cn=ldapadmin,dc=cgcs,dc=local'
exec { 'populate initial ldap configuration':
command => "ldapadd -D ${dn} -w ${admin_pw} -f /etc/openldap/initial_config.ldif"
command => "ldapadd -D ${dn} -w \"${admin_pw}\" -f /etc/openldap/initial_config.ldif"
}
-> exec { 'create ldap admin user':
command => 'ldapadduser admin root'
@ -152,6 +152,6 @@ class platform::ldap::bootstrap
}
-> exec { 'ldap cgcs-cli shell update':
command =>
"ldapmodify -D ${dn} -w ${admin_pw} -f /tmp/ldap.cgcs-shell.ldif"
"ldapmodify -D ${dn} -w \"${admin_pw}\" -f /tmp/ldap.cgcs-shell.ldif"
}
}