Access is denied error when accessing PSM server through RDP
Symptom
When a user attempts to RDP to a PSM server, they see the normal screen that shows the profile loading, then they get the error "Access Denied" with an OK button. Once clicked, the user is logged off and the session is closed. The user is able to access the PSM servers when using the command "mstsc /admin".
This can also affect the PSMConnect and PSMAdminConnect users if they have been moved to the domain, resulting in users not being able to connect to systems via CyberArk.
Environment
10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;12.4;12.3;12.6;13.0;14.2;14.3;14.5;14.6 Privileged Access Manager (PAM, self-hosted) PSM
PSM
Cause
From Windows 2016, Microsoft changed the way Remote Connection Manager to query the domain controller for user objects. The change caused Initial Program under PSMconnect user profile is not taken properly.
As part of the PSM server installation, the below registry entries are added to the PSM server to enable the legacy RCM behavior on a RD Session Host server.
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
Name: fQueryUserConfigFromDCHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-tcp
Name: fQueryUserConfigFromDC
As the result, RDS queries the Domain controllers during the login process. When this data cannot be retrieved, it will cause the Access is denied error.
The server may fail to query the domain controller if neither the server, nor the user logging on, have permissions to:
- Make remote calls to the Security Account Manager on domain controllers
- The "Network access: Restrict clients allowed to make remote calls to SAM" group policy controls this access.
- Read the properties of the PSMConnect user account in Active Directory
- This may be due to lacking permissions on the user object itself, or the Active Directory structure
Resolution
If PSM users have not been moved to the domain, and the requirement is just to allow administrators to log on without the /admin switch, RDS can be configured to ignore this error as follows:
- Create a new DWORD value in HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\ called “IgnoreRegUserConfigErrors” and gave it a decimal value of “1”
- When the IgnoreRegUserConfigErrors value is set to 1, Winlogon ignores errors reading the Terminal Services Configuration data, and instead reads the DefaultUserConfig data.
To resolve this issue if PSM domain users are to be used:
- On each domain controller that the PSM servers may be communicating with, verify that the policy "Network access: Restrict clients allowed to make remote calls to SAM" has the Remote Access permission set to Allow for the PSMConnect and PSMAdminConnect users and/or the PSM servers
- Verify that the domain PSMConnect and PSMAdminConnect users and/or the PSM servers have read permissions in Active Directory
- Verify that the domain PSMConnect and PSMAdminConnect users and/or the PSM servers have read access to the PSMConnect and PSMAdminConnect user properties
The “Access Denied” error isn’t directly a Idira issue, and the customer will likely need to work with their Windows team to resolve the "Access Denied" error.
Setting the "IgnoreRegUserConfigErrors" registry ignores whatever has caused the access denied error, which could be a corrupted registry, user profile, permissions, OS issue, AD sync issue, etc.
This, in turn, causes a problem with launching the PSMInitSession.exe from the AD user profile configuration.
If the issue is resolved and then returns after some time, it could originate from a Group Policy sync or Active Directory.