From 2aa5c073c94115405536519e05ba71df494e93bf Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Wed, 4 Dec 2024 10:24:16 +0100 Subject: [PATCH] fix(ldap-discovery): use mail domain for user auth Like it in NS7, the user should use the mail domain for authentication. Example: - mail domain: nethserver.org - user domain associated to mail server: ad.nethserver.org The user should be able to authenticate using user@nethserver.org --- imageroot/bin/discover-ldap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageroot/bin/discover-ldap b/imageroot/bin/discover-ldap index 34fecf4..5461ba5 100755 --- a/imageroot/bin/discover-ldap +++ b/imageroot/bin/discover-ldap @@ -71,7 +71,7 @@ user_domain = agent.ldapproxy.Ldapproxy().get_domain(user_domain_name) or { 'bind_password': 'invalid', } -domain_setup(user_domain_name, user_domain) +domain_setup(os.getenv("MAIL_DOMAIN"), user_domain) if user_domain_name and user_domain['bind_password'] != 'invalid': agent.bind_user_domains([user_domain_name])