Saturday, June 25, 2016

How to run a Scheduled Task as NetworkService in Windows Server 2003?

How do i configure a scheduled task to run as NT AUTHORITY\NetworkService in Windows Server 2003?




Background



Even though the account is known as NetworkService, the full name is NT AUTHORITY\Network Service.



On Windows Server 2008 R2, when choosing the account to run the task as, you must specify:




  • NETWORK SERVICE (with a space)




That will then resolve to NT AUTHORITY\NetworkService (no space):



enter image description here



Note: You cannot try to specify NetworkService



enter image description here



Nor can you specify NT AUTHORITY\NetworkService.




In summary:




  • NETWORK SERVICE valid

  • NetworkService invalid

  • NT AUTHORITY\NetworkService invalid



The same is true on Windows 7. You must specify NETWORK SERVICE if you wish for a scheduled task to run as NetworkService (aka NT AUTHORITY\NetworkService)




What about Windows Server 2003?



In Windows Server 2003 it doesn't work:



enter image description here



i know that any password given for the Network Service (or Local Service) accounts are ignored, as the accounts have no password:





Note that this account does not have a password, so any password information that you provide in this call is ignored.




But i cannot specify that account:



enter image description here




  • NETWORK SERVICE invalid

  • NetworkService invalid


  • NT AUTHORITY\NetworkService invalid



NetworkService security



The NetworkService account, like LocalService, are limited rights accounts. The only difference between them is that:




  • NetworkService presents machine credentials (e.g. VADER$) when accessing the network

  • LocalService presents anonymous credentials when accessing the network




My question works just as well if i want to have a scheduled task run as LocalService (aka NT AUTHORITY\LocalService). i just happened to choose NetworkService when asking this question.



See the question:




How to grant network access to LocalSystem account?





How do i configure a scheduled task to run as NT AUTHORITY\Network Service in Windows Server 2003?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...