diff --git a/management/univention-management-console/src/univention/management/console/auth.py b/management/univention-management-console/src/univention/management/console/auth.py index ec6ee93..1f4843e 100644 --- a/management/univention-management-console/src/univention/management/console/auth.py +++ b/management/univention-management-console/src/univention/management/console/auth.py @@ -42,8 +42,8 @@ import notifier.signals as signals import notifier.threads as threads -from univention.uldap import getMachineConnection from univention.management.console.log import AUTH +from univention.management.console.ldap import get_machine_connection from univention.management.console.pam import PamAuth, AuthenticationError, AuthenticationFailed, AuthenticationInformationMissing, PasswordExpired, AccountExpired, PasswordChangeFailed @@ -127,7 +127,7 @@ def __authenticate_thread(self, username, password, new_password, **custom_promp def __canonicalize_username(self, username): try: - lo = getMachineConnection() + lo, po = get_machine_connection(write=False) attr = 'mailPrimaryAddress' if '@' in username else 'uid' result = lo.search('%s=%s' % (attr, escape_filter_chars(username)), attr=['uid'], unique=True) if result and result[0][1].get('uid'):