From 0999626f21e4e25651494ce8443fa71a21007d94 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Thu, 7 Mar 2024 09:51:35 +0100 Subject: [PATCH] Add bind password and service user for LDAP provider in join-domain --- imageroot/actions/configure-module/50start_provisioning | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/imageroot/actions/configure-module/50start_provisioning b/imageroot/actions/configure-module/50start_provisioning index c072e1e..9fa0d98 100755 --- a/imageroot/actions/configure-module/50start_provisioning +++ b/imageroot/actions/configure-module/50start_provisioning @@ -60,6 +60,12 @@ if provision_type == 'join-domain': endpoints.append(f"ldap://{provider['host']}:{provider['port']}") podman_cmd.append("join-domain") podman_cmd.append(','.join(endpoints)) + # Set the bind password for the provider + if domains[domain]["bind_password"]: + os.environ['LDAP_SVCPASS'] = domains[domain]["bind_password"] + agent.set_env('LDAP_SVCPASS', os.environ['LDAP_BINDPASS']) + os.environ['LDAP_SVCUSER'] = 'ldapservice' + agent.set_env('LDAP_SVCUSER', os.environ['LDAP_SVCUSER']) elif provision_type == 'new-domain': podman_cmd.append("new-domain")