Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


Return to article

Windows Server 2003 Glitch
 

I recently needed to design a backup strategy for a project on a Windows Server 2003, Standard Edition standalone server running Certificate Services. At first I used a batch file (i.e., .cmd file) that ran every hour to back up an essential database. For security reasons, I created an account with only backup operator privileges and used this account to start the batch job. After I finished testing the batch file, I added a new scheduled task to Windows Task Scheduler.

I was able to run the scheduled task as Administrator from the built-in system account (i.e., NT Authority\System). In addition, Task Scheduler could start the batch job while I was logged on interactively as the backup operator. But if I logged off or logged on as a different user, the job failed. Task Scheduler generated the error message could not start, and the log file reported the access violation that Figure 1 shows.

I checked the server's user rights assignment and granted the backup operator the log on as a batch job right, with no success. I also created an audit policy and enabled success and failure auditing for most events. However, the Security event log showed no error messages.

Finally, I tried using a Visual Basic (VB) script. Task Scheduler ran any VB script I executed as the backup operator but wouldn't run a batch file from within the script.

As a last resort, I installed Sysinternals' FileMon tool. FileMon reported an access violation on the cmd.exe file in the \WINDOWS\system32 directory. By default, Windows 2003's built-in Batch account can run scripts such as VB scripts but can't run batch files. To solve this problem, you need to reset the cmd.exe file's permissions. I added the built-in Batch security setting with the right to read and execute the cmd.exe program, and my scheduled task ran as expected.







Reader Comments

How do you assign that right?

pierreman -October 18, 2004

Check this KB article http://support.microsoft.com/?kbid=867466

mdarwish -October 25, 2004

Check this KB article http://support.microsoft.com/?kbid=867466

mdarwish -October 25, 2004

Check this KB article http://support.microsoft.com/?kbid=867466

mdarwish -October 25, 2004

It's a document that have resolved my urgent problem during deployment

Anonymous User -January 28, 2005

Thanks a million. That solved my problem!

Anonymous User -February 16, 2005

Awesome! thanks. This fixes the issue of non-admin running scripts on my 2003 member server.

BenJammin -July 01, 2005

Thank you very much. I've been trying to make an existing backup BAT file work for several days with no luck until now.

hoffmp -March 15, 2006
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement