diff --git a/src/deadline_worker_agent/installer/win_installer.py b/src/deadline_worker_agent/installer/win_installer.py index f9c36cc6..662b0387 100644 --- a/src/deadline_worker_agent/installer/win_installer.py +++ b/src/deadline_worker_agent/installer/win_installer.py @@ -200,7 +200,7 @@ def ensure_user_profile_exists(username: str, password: str): # https://timgolden.me.uk/pywin32-docs/win32security__LogonUser_meth.html logon_token = win32security.LogonUser( Username=username, - LogonType=win32security.LOGON32_LOGON_NETWORK_CLEARTEXT, + LogonType=win32security.LOGON32_LOGON_INTERACTIVE, LogonProvider=win32security.LOGON32_PROVIDER_DEFAULT, Password=password, Domain=None, diff --git a/src/deadline_worker_agent/windows/win_credentials_resolver.py b/src/deadline_worker_agent/windows/win_credentials_resolver.py index e71cfef8..7ef8d606 100644 --- a/src/deadline_worker_agent/windows/win_credentials_resolver.py +++ b/src/deadline_worker_agent/windows/win_credentials_resolver.py @@ -21,7 +21,7 @@ from pywintypes import HANDLE as PyHANDLE from win32security import ( LogonUser, - LOGON32_LOGON_NETWORK_CLEARTEXT, + LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ) from win32profile import LoadUserProfile, PI_NOUI, UnloadUserProfile @@ -214,7 +214,7 @@ def get_windows_session_user(self, user: str, passwordArn: str) -> WindowsSessio # https://timgolden.me.uk/pywin32-docs/win32profile__LoadUserProfile_meth.html logon_token = LogonUser( Username=user, - LogonType=LOGON32_LOGON_NETWORK_CLEARTEXT, + LogonType=LOGON32_LOGON_INTERACTIVE, LogonProvider=LOGON32_PROVIDER_DEFAULT, Password=password, Domain=None, diff --git a/test/unit/install/test_windows_installer.py b/test/unit/install/test_windows_installer.py index 919bf23a..fa578b53 100644 --- a/test/unit/install/test_windows_installer.py +++ b/test/unit/install/test_windows_installer.py @@ -238,7 +238,7 @@ def test_loads_user_profile( # THEN mock_LogonUser.assert_called_once_with( Username=username, - LogonType=win32security.LOGON32_LOGON_NETWORK_CLEARTEXT, + LogonType=win32security.LOGON32_LOGON_INTERACTIVE, LogonProvider=win32security.LOGON32_PROVIDER_DEFAULT, Password=password, Domain=None,