diff --git a/config/yaml_config.go b/config/yaml_config.go index f30d77eb..eb131315 100644 --- a/config/yaml_config.go +++ b/config/yaml_config.go @@ -536,10 +536,10 @@ func (m *yamlManager) LdapConfig(ldapBindUser, ldapBindPassword, ldapServer stri config.BindDN = ldapBindUser } - if ldapBindPassword != "" { - config.BindPassword = ldapBindPassword - } else { + if len(config.BindPassword) > 0 { lo.G.Warning("Ldap bind password should be removed from ldap.yml as this will be deprecated in a future release. Use --ldap-password flag instead.") + } else { + config.BindPassword = ldapBindPassword } if ldapServer != "" {