Subscribe to Windows IT Pro
September 28, 2004 12:00 AM

Windows Server 2003 Glitch

Windows IT Pro
InstantDoc ID #43812
Rating: (11)

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.

Related Content:

ARTICLE TOOLS

Comments
  • Phil
    6 years ago
    Mar 15, 2006

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

  • nicholas
    7 years ago
    Jul 01, 2005

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

  • Anonymous User
    7 years ago
    Feb 16, 2005

    Thanks a million. That solved my problem!

  • Anonymous User
    7 years ago
    Jan 28, 2005

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

  • mdarwish
    8 years ago
    Oct 25, 2004

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

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.