Granting remote user (non admin) the ability to enumerate services in Win32_Service in namespace cimv2 using WMI & C#

时光怂恿深爱的人放手 提交于 2019-11-29 07:51:41

Trying to find the same answer myself today, I've been doing a lot of googling. After a good half hour of incantations, I found this MSDN article (907460) which uses sc sdet. It seems to work so far, even though the security descriptor is for Windows Server 2003. I've found you can do sc sdshow SCMANAGER to get the current value so when back in the office tomorrow I'll be comparing an contrasting to make sure I've not locked something out I shouldn't have :-)

For completeness, the notes in KB907460 (in case it moves/goes away):

Symptoms: After you install Microsoft Windows Server 2003 Service Pack 1 (SP1), non-administrators cannot remotely access the Service Control Manager.

Cause: Windows Server 2003 SP1 changes the Service Control Manager default security settings.

Resolution: To resolve this issue, use version 5.2.3790.1830 of the Sc.exe tool. This tool is located in the %windir%\System32 folder. To do this, follow these steps:

  • Click Start, click Run, type cmd, and then click OK.
  • Type the following command at the command prompt, and then press ENTER:

    sc sdset SCMANAGER D:(A;;CCLCRPRC;;;AU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)
    

I found myself stuck into a similar problem. In my case it had nothing to do with permissions, which I did set by following this link: http://www.poweradmin.com/help/enableWMI.aspx

So, After hours of wondering lost I found this article that tells how UAC interfere with your set of permissions and how can you fix that: http://www.solarwinds.com/documentation/apm/docs/APMWMITroubleshooting.pdf

In my case, the registry key didn't existed, so I created it.

Hope this helps also, cheers!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!