FAQ: The Eventlog of Windows

Part 1 - General eventlog questions

Copyright © 1997-2007 Frank Heyne - All rights reserved - Last update:  05. February 2007

If you want to put this page on your own web server, please renounce and use a link instead. The reason is simple: I don't want old copies with old versions of the FAQ laying around on the web.


A 1: Everytime something is printed, an entry is written in the system log, stating that the printing went ok. But since this NT machine is a printer server. my system log fills up very fast and I have to clean it every day. Is there a way to disable this so that no entry is made in the eventviewer?

To HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers, add the following entry:

Name: EventLog
Type: DWORD
Value: 0

There is no need to reboot, but you will have to stop and restart the spooler from services in Control Panel.

A 2: Is there a problem with NT 3.51/4 recording of events? I am showing the next user loging in before the last user is logged out.

AFAIK, it is a known bug in all versions of NT. Have a look at Microsoft's KB article Q146880. Though they state the bug was removed with the latest 3.51 Service pack, in reality it still seems to be there.

A 3: When I change the maximum size of a log, how big will it grow? The log is in "Never overwrite" mode. The maximum log size was 256 KB. I changed it to 1024 KB. Later I decided 512 KB is enogh and changed it again. The current log size is only 128 KB.

I depends ;-)
If you don't reboot, the logfile will grow to 1024 KB. If you do reboot before the log is greater than 512 KB, it will grow to 512 KB. If you do reboot when the log is greater than 512 KB, it will fill until all space is used and not grow further. (The log always grows in chunks of 64 KB. If a chunk is full, the next chunk will be assigned for the log file.) Rebooting has the same effect as clearing the entries, by the way. If you want predictable results, the only way is to clear the log after changing some of it's settings! If you use Elwiz to change the log settings in your network, it can save and clean the log automatically, by the way.

Is there a difference if the log is in "Overwrite" mode?

Yes. If the log is in "Overwrite" mode and it is full (so overwriting really takes place), you can increase the size of the log as much as you want, it will not grow any more until the log is cleaned! If you want predictable results, the only way is to clear the log after changing some of it's settings!

A 4: I have a machine with all logs set to a maximum size of 512 KB. The application log is only 256 KB but every time I reboot, NT tells me it is full. Both Elwiz as well as the standard Eventviewer tell me it's maximum size is 512 KB. Both Elwiz as well as Explorer tell me the file size is 256 KB so why does the eventlog service refuse to log more application events? Instead it tells me the log is full?!?

Are you sure nobody changed the log settings after the log was cleared the last time? Your experience is reproducable:

  1. Put the log in overwrite mode.
  2. Set the maximum size to 256 KB.
  3. Clear it.
  4. Fill it, until overwrite takes place. (Elwiz will say "0 % empty")
  5. Change the settings to "Never overwrite"
  6. Increasing the maximum log size won't have any effect now! (until the log is cleared, even reboot won't help in this case)
The standard eventviewer will not warn you about this unexpected behaviour (though it does warn when you decrease the log size). If you want predictable results, the only way is to clear the log after changing some of it's settings!

A 5: The documents say if I set CrashOnAuditFail to 1, the machine will crash when the security log becomes full and only Admins are allowed to login after this has occurred. Does this setting has any influence if the system or application log is getting full?

No, CrashOnAuditFail does only have any effect on the security log.

A 6: Checking a security log I saw something odd: The end of a process was logged after it's begin but with an earlier timestamp. How is this possible?

Probably somebody did change the system time.

So the next question is: Why does Microsoft not care to log changes of the system clock?
I do not know why they missed it for so long. But in NT 5.1 (aka WXP) there is the new Security event 520, which does report changes of the system's time.

A 7: Where does security event 642 with user Anonymous come from?

NT uses the Anonymous account for some of its own activities, for instance changing machine passwords. If, for instance, Target Account Name looks like SERVER2$, the PDC probably did change the password of the machine account of SERVER2. By default it changes the password of every machine belonging to the domain once a week, generating such an event.
But even changing a password of a normal user account might occur under the Anonymous account - for instance when an expired password is changed during logon. More interesting details are available in answer 23.

A 8: I get a lot of event log IDs 528, 538 (users logging on and off). First comes a 528 (logon) followed later by 538 (logoff). I know the user is not logging off...

Check the logon type in the events.

I was wondering if you could tell me how to set the autodisconnect to a longer time for logon type 3?
The easiest way is to use the command
NET CONFIG SERVER /AUTODISCONNECT:Minutes
But I have another user (admin) who does not have any share open on a workstation but is generating lots of pairs of events 528/538 nevertheless.
Somebody reported this behaviour when perfmon.exe is run across the network. In some cases this program is reported to open and close a connection every time it collects data, which can be very often. I could not reproduce this behaviour, though.

A 9: Are there any known bugs with the Security event logging of NT?

Event logging as implemented in NT 4.0 is far away from beeing flawless. Some examples:

A 10: Are there any known bugs with the Print event logging of NT?

Some examples of known bugs are:

A 11: I recently experienced a significant slow down on my NT 4.0 workstation and discovered that my application event log was overflowing. I cleared it and noticed an almost immediate improvement with several applications. What caused my event log to get so big? (We had the log overwrite parameter set to 7 days and still had several months of log activity.)

Events were only overwritten if the log is full, they must be at least seven days old in your case, but if the log isn't full after 3 month, these old events still will reside in the logs until their disk space is needed for new events.

A 12: I'm trying to read the Security Event log and it seems that certain successful logons generate double entries in the log. These entries can have either the exact same time or very close -- a second or two apart.

Check the logon type in the events. One event 528 should have logon type 2, that is your interactive logon. If you connect to one or more shares during logon, there should be another event 528 with logon type 3 (network logon) on every machine you connect to. This type of event is always created when connecting to a share, even if the share is on your local machine - it looks like a double logon on a first glance.

A 13: All the sytem and the services work properly but only users that belong to Administrators Group can 'log on locally' or 'access this computer from network' although we have correct rights set in User Manager - Policies - Users Rights.

This one doesn't look like it has something to do with event logging, right? But the reason for your problem is probably:

The easiest way to check and reset this registry value is using Elwiz - it works via the network, too.

A 14: Who can access the Security log?

As so often in life - it depends ;-)
To be more specific, it depends on the version of the file %systemroot%\system32\eventlog.dll.

A 15: Who can access the other (System, Application) logs? Any ideas to stop domain users from viewing these other event logs on a server?

A 16: Is it possible to use the eventlog to log Security events to another server, in real time? From a security perspective, the ability to read eventlogs from remote machines is useless; they may have already been modified.

Currently this is not possible with NT. But you should have in mind the following:

BTW, the online watching of critical events is possible without the need to copy the complete Security log to another machine, I of course suggest the program Elwiz for this task ;-) If a network connection to a machine in the watchlist was broken, Elwiz will check all events which occurred in the meantime when the connection is up again.

A 17: Is it possible to have different Audit policies on BDCs and the PDC of a domain?

Yes, but it makes not much sense. You should be aware of the fact that any change of the audit policy of the PDC will become replicated to all BDCs of the domain. Early versions of Elwiz did allow to set different audit policies for every domain controller. But because of the replication issue, Elwiz 3.x does not allow to set the audit policy of a BDC directly.

A 18: Are there any books dedicated to Windows NT Event Logging?

Currently I do only know one book titeled Windows NT Event Logging ;-)

A 19: I'd like to use a Perl Script instead of EventSave. Where can I find one?

Charlie Bernstein published his Perl-Script. The script itself just cycles the log files. It was designed to be used in conjunction with a batch file to place them where you want them to go.

A 20: Is it possible to merge for instance all failed logon events of the domain into one eventlog file? Or do I really need to scan all logs of all workstations to get this info completely?

A 21: What can I do to shut off the log generation process? In many cases I don't need them anyway.

Disable the eventlog service. But I don't recommend it!
If you are running an NT machine at home, you do not need to bother about security events, but you should have in mind the following: Event logging still can be very useful, for instance, it will warn you if your hard disk will die soon! So I would prefer to only disable all security events in User manager | Policies | Audit and let the eventlog service still alive.

A 22: Some of my event logs show the time of the events with an offset of one hour

Probably you have enabled "Automatically adjust for Daylight Savings changes" in Control Panel? NT always uses GMT for the timestamps of eventlog events. This is the reason for the shift of the times reported in the eventlogs every spring and autumn. It works as documented in KB article 129574. If you don't like it, switch "Automatically adjust for Daylight Savings changes" off.

A 23: Event 627 shows that NT AUTHORITY\ANONYMOUS is trying to change an user's password. I got a Target Account Name but no Caller User Name.

This kind of event with no Caller User Name is logged when the password is expired and the user tries to change it during logon. Event 627 can be of type Success or Failure, depending on the result of the activities of the user. In case you are interested to know on which machine the user tried to change the password, the log on the server won't tell you much. You have to walk through all Security logs of all workstations and look for an event 537 created shortly before the 627 was logged on the server with the same user name.

A 24: I can't figure out why the occassional week shows a "hole" (no events recorded)

How full are your logs? Elwiz will tell you how many percent of the maximum size are used.
In case you have choosen "overwrite after 7 days", for instance, and the logs are becoming full after 3 days, the next 4 days no events can be logged.

A 25: I am accused of a license violation, but did nothing illegal! An event 26 in the System log claims I would have tampered with the product type, but this is not true!

Have you, by chance, switched on auditing for parts of your Registry? In case you activated auditing for
HKLM\System\CurrentControlSet\Control\ProductOptions\ProductType and/or
HKLM\System\Setup\SystemPrefix
you will get this stupid event. It appears Microsoft interprets auditing these keys as illegal for some reason.

A 26: Is there software that allows a person to access the event logs and make deletions to individual log entries?

The question is: Do you mean
(A) the active eventlog files used by the system or
(B) eventlog files already saved and no longer used by the system?

(A) - Because the eventlog service opens these files with exclusive access, you need do break the eventlog service first, in order to be able to access the log files. In September 2000 Arne Vidstrom posted a program called WinZapper. It did break the eventlog service without shutting it down. After this is done, there is no difference to case (B). BTW, you need to be admin to run WinZapper.

(B) - This is possible. You just copy the entire eventlog into another file, and skip the records you want to delete. It is possible to use MER, in case you want to remove for instance all entries with a certain Event ID.

A 27: Why should I rename the admin account? An attacker can find out the name of the real admin account anyway

If you rename the Administrator account and create a guest account called "Administrator", you might catch users or novice script kiddies attempting to access your system.  If you see attempted logins on your dummy Administrator account you immediately know that something is happening that shouldn't be.

A 28: How do I save an eventlog file into an ASCII file?

A 29: Does NT log remote interactive logons?

This depends from the application you are using:

A 30: Is there anyway that you can find out how full (percentage) an eventlog is using API calls?

No, you need to write your own function, like I did in Elwiz.

A 31: Where can I obtain a complete list of Windows Event Identifiers?

I am not sure whether it is complete, but under http://www.microsoft.com/WINDOWS2000/techinfo/messages/default.asp you can download a self extracting csv file for Windows 2000.
Q174074 lists the Security events for NT until version 4, the Windows 2000 FAQ has it formatted nicely.

A 32: I'm an administrator on a NT wan, with several users with admin rights. Is there a tool available that will log what changes are made to the user accounts, and to the servers themselves ?

The built in eventlog service allows you to watch changes on user accounts, Security policies, and so on.
But when there are lots of admins, you should not trust the logs too much, because every admin is able to change the audit policy. An admin could switch off some auditing, change something, and switch it on again, so you won't find much in the logs afterwards.

A 33: My secuity logs are filled with failed logon events 529 for account MACHINE$, one every few seconds.

Looks like the password of MACHINE is out of sync with the DC. Usuallay removing the machine MACHINE from the domain and rejoining it will help.

A 34: Why are no events 592 and 593 logged when a 16 bit application is run?

592 and 593 events will be logged only for 32 bit applications.
If you want to audit the execution of 16 bit applications, you have to audit object access. In the 560 Security events you than have to search for such events with Access: Execute

A 35: What do I need to audit when I want to log reliably only the changing of file permissions?

You need to audit
Change Permissions:  Success and Failure
preferably for everyone.

But you should know that, if someone turns off this auditing settings and changes the permissions afterwards, no events are logged.
The only way to detect changes over the auditing settings seems to be to enable the auditing of successful Write events. Only this way, you get an event when the auditing is turned. But obviously this configuration causes the log to get full in a short period of time.

The reason seems to be that audit settings are written together with the files. It would, of course, be nice to be able to audit only security related actions reliably.

A 36: Are there problems with auditing of the Registry root keys?

On important machines it might be useful to know when someone wants to connect to the file system or Registry of the machine. Connecting to the Registry of a computer over the network always involves connecting to one of the root keys HKEY_LOCAL_MACHINE or HKEY_USERS first. So you could enable the security policy auditing object access and you could add an audit entry in the properties of both root keys.

The problem is: After you reboot the computer, it has lost its audit settings for both root keys of the Registry. This is a problem of all current versions of Windows.

Workaround: Put a RegAudit command for recreating the audit entries into the startup script of the machine. 

A 37: Which events will be logged during local logon and logoff?

During logon event  528 wll be logged. Logon type 2 means it is an interactive logon.

After the end of the logout procedure event 538 wll be logged. But when the user shuts down his machine during logoff, the eventlog service will be shut down as well. Depending on what is faster, the eventlog service might not be available when the user finally is logged off, so event 538 can't be logged at all in this situation.

For this reason, starting with Windows XP and Windows 2003 event 551 was introduced. This event will be logged at the start of a logout procedure, and only for interactive sessions. In a modern version of Windows relevant events will be seen in the following order:

Logon: 528

Start of logoff: 551

End of logoff: 538 (probably only when the machine was not shut down)

 

A38: What does, for instance, the Logon ID (0x0,0x3E5) mean?

(0x0,0x3E5) is used by services which run under the account LOCAL SERVICE.
(0x0,0x3E4) is used by services which run under the account NETWORK SERVICE.
Other accounts use different Logon IDs each time thy log on. The numbers increase with the uptime of the machine, but there seems to be no clear relationship between both.

 

A39: Did, with the new event log from Windows Vista, all problems inherent to earlier versions go away?

Sure not. Even under Vista there are events whose construction is not ideal:

Welcomepage