0

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 (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.

1 Answer 1

0

Try adding the AD account for the computer which is trying to run the command to the Administrators group on the computer with the service being modified.

If the computer running the scheduled task is SERVER1 and the other machine is SERVER2 then in SERVER2's local administrators group put YOURDOMAIN\SERVER1$. The $ is important.

1
  • thanks, we will try this out. the other server is administered by a different group so it might take a few days to get to it...
    – weiji
    Dec 1, 2010 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .