From cf8d90b74db1496bef062f10a3e2dda83f54173d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 1 Apr 2020 14:31:48 +0200 Subject: [PATCH] admincn -> admindn --- moulinette/authenticators/ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moulinette/authenticators/ldap.py b/moulinette/authenticators/ldap.py index 6c48c534..312b75f0 100644 --- a/moulinette/authenticators/ldap.py +++ b/moulinette/authenticators/ldap.py @@ -41,7 +41,7 @@ class Authenticator(BaseAuthenticator): self.extra = extra self.sasldn = "cn=external,cn=auth" self.adminuser = "admin" - self.admincn = "cn=%s,dc=yunohost,dc=org" % self.adminuser + self.admindn = "cn=%s,dc=yunohost,dc=org" % self.adminuser logger.debug( "initialize authenticator '%s' with: uri='%s', " "base_dn='%s', user_rdn='%s'", @@ -111,7 +111,7 @@ class Authenticator(BaseAuthenticator): salt = "$6$" + salt + "$" return "{CRYPT}" + crypt.crypt(str(password), salt) - hashed_password = self.search(self.admincn, attrs=["userPassword"])[0] + hashed_password = self.search(self.admindn, attrs=["userPassword"])[0] # post-install situation, password is not already set if "userPassword" not in hashed_password or not hashed_password["userPassword"]: