2

I have a windows service. The logon user of this service is set to 'domain1\user1'. Its set to delayed start and it works fine. Now, due to regular housekeeping maintenance, we need to stop this service, perform maintenance and start it back again on a regular schedule. I've written a batch file for that. We are using BMC Control M and I've set 'domain1\user1' as the account under which this batch file executes. But when the bat file tries to execute 'net stop servicename' statement, I get error... System error 5 has occurred.Access is denied.

I though that the logon user will automatically get the the start/stop permissions. But that doesn't seems to be the case. And I may have to do something like this... https://social.technet.microsoft.com/wiki/contents/articles/5752.how-to-grant-users-rights-to-manage-services-start-stop-etc.aspx

Am I missing something here?

Paprika And Sur
  • 21
  • 1
  • 1
  • 3
  • _"I though that the logon user will automatically get the the start/stop permissions. But that doesn't seems to be the case."_ - Correct. See https://stackoverflow.com/questions/4436558/start-stop-a-windows-service-from-a-non-administrator-user-account. – CodeCaster Mar 07 '18 at 12:22
  • Tried the steps you have given @CodeCaster, Didn't work. when I do sc sdshow now, it shows the correct SID at the correct place as described in the answer. Tried restarting the machine as well, because why not? No luck. Any more ideas? – Paprika And Sur Mar 08 '18 at 10:21

0 Answers0