CJSmith dot me

I dump stuff I find useful here

Windows 2008: Task Scheduler causes account lockout when policy locks account after one attempt

Published / by Chris Smith / Leave a Comment

I encountered a very odd issue where I was attempting to amend a scheduled task on a Windows 2008 R2 server. When attempting to amend to a “service” account it locked out immediately. This account has a policy where it is locked out if the password is incorrect once. After several attempts and having to unlock the account every time, we spotted that every time a task was changed two event log entries were added instead of one.
It turns out the Task Scheduler in Windows 2008/2008 R2 was causing this, it first attempts to login with a blank password and then a second attempt is made with the valid password.
This causes the below (An error has occured for task . Error message: The following error was reported: 2147944309.) as the first attempt locks the account out.

The Event Log also has the following entries

An error has occured for task <SCHEDULEDTASKNAME>.  Error message: The following error was reported: 2147944309.
Audit Failure      26/11/2018 13:48:39       Microsoft Windows security auditing.     4625       Logon
 
An account failed to log on.
 
Subject:
                Security ID:                         SYSTEM
                Account Name:                 <MACHINENAME$>
                Account Domain:                              <DOMAIN>
                Logon ID:                             0x3e7
 
Logon Type:                                       4
 
Account For Which Logon Failed:
                Security ID:                         NULL SID
                Account Name:                 <USERNAME>
                Account Domain:                              <DOMAIN>
 
Failure Information:
                Failure Reason:                 Unknown user name or bad password.
                Status:                                  0xc000006d
                Sub Status:                         0xc000006a
 
Process Information:
                Caller Process ID:              0x14c
                Caller Process Name:      C:\Windows\System32\svchost.exe
 
Network Information:
                Workstation Name:         <MACHINENAME>
                Source Network Address:             -
                Source Port:                       -
 
Detailed Authentication Information:
                Logon Process:                  Advapi  
                Authentication Package:               Negotiate
                Transited Services:          -
                Package Name (NTLM only):        -
                Key Length:                        0
 
This event is generated when a logon request fails. It is generated on the computer where access was attempted.
 
The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
 
The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
 
The Process Information fields indicate which account and process on the system requested the logon.
 
The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
 
The authentication information fields provide detailed information about this specific logon request.
                - Transited services indicate which intermediate services have participated in this logon request.
                - Package name indicates which sub-protocol was used among the NTLM protocols.
                - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.
 
 
 
An account failed to log on.
 
Subject:
                Security ID:                         SYSTEM
                Account Name:                 <MACHINENAME$>
                Account Domain:                              <DOMAIN>
                Logon ID:                             0x3e7
 
Logon Type:                                       4
 
Account For Which Logon Failed:
                Security ID:                         NULL SID
                Account Name:                 <USERNAME>
                Account Domain:                              <DOMAIN>
 
Failure Information:
                Failure Reason:                 Account locked out.
                Status:                                  0xc0000234
                Sub Status:                         0x0
 
Process Information:
                Caller Process ID:              0x14c
                Caller Process Name:      C:\Windows\System32\svchost.exe
 
Network Information:
                Workstation Name:         <MACHINENAME>
                Source Network Address:             -
                Source Port:                       -
 
Detailed Authentication Information:
                Logon Process:                  Advapi  
                Authentication Package:               Negotiate
                Transited Services:          -
                Package Name (NTLM only):        -
                Key Length:                        0
 
This event is generated when a logon request fails. It is generated on the computer where access was attempted.
 
The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.
 
The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).
 
The Process Information fields indicate which account and process on the system requested the logon.
 
The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.
 
The authentication information fields provide detailed information about this specific logon request.
                - Transited services indicate which intermediate services have participated in this logon request.
                - Package name indicates which sub-protocol was used among the NTLM protocols.
                - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

Rather annoyingly the fix is no longer available, it is now included in a Convenience Rollup available from Microsoft Support. I can’t however see any mention of it in this. Thanks to Andrew Bainger from ABF for pointing me towards this.

Leave a Reply