OpenSCManager API failed with AccessDenied for Remote Computer
While trying to establish a connection to the Service Control Manager on Remote Computer using OpenSCManagerA( ), it's failed with Access Denied.
This API succeeds when I execute this command with user session. When I run this command with SYSTEM session, it fails.
In the above document, the following is mentioned
"To connect to a service remotely, call the LogonUser function with LOGON32_LOGON_NEW_CREDENTIALS and then call ImpersonateLoggedOnUser before calling OpenSCManager."
As mentioned above, I tried impersonating as Domain Admin with LOGON32_LOGON_NEW_CREDENTIALS before calling OpenSCManagerA( ) API. But still it is failed with Access denied error.
Tried enabling and disabling UAC on Remote computer, uninstalled Anti Virus on source machine and remote machine, no software restriction policy configured.
But still no luck.
This issue occurs only on Windows 10 machines!
Is there anyway to execute OpenSCManager API in SYSTEM session? Could anyone help me?
Thanks and Regards,
the Domain Adminin the local Windows Admin group on the remote node?
It is the Active Directory Domain Admin account.
I believe, this Domain Admin user can able to perform all kind of operations on remote machine.
OK. Could you please show a minimal, reproducible sample without private information?
Sign in to comment