How to configure permissions for win2008 task running as Network Service to stop/start a service on different system?
Posted
by
weiji
on Server Fault
See other posts from Server Fault
or by weiji
Published on 2010-11-30T23:31:41Z
Indexed on
2011/01/14
22:55 UTC
Read the original article
Hit count: 121
Well... title says it all, actually. We've got a Scheduled Task set up on a windows server 2003 box running as the Network Service, and the batch file it runs will invoke "sc" to stop and then start a service on another windows box, however sc reports:
[SC] OpenService FAILED 5:
Access is denied.
Running the same batch file via the windows explorer has no issues, and my user account is part of the Administrators group so I believe this is why there are no issues when I try it manually. Is this a permissions thing I enable for Network Service on the first server? Or do I enable permissions for Network Service somehow on the target server?
This question (http://serverfault.com/questions/19382/why-sc-query-fails-from-one-machine-but-works-from-another) touches on something similar, but I'm looking for enabling the Network Service to access the service via the scheduled task.
© Server Fault or respective owner