Windows Server - Networking

The Blog for Networking solution from Microsoft. By Richard Wu

Logging User logon event.

 If you want to keep track the user logon and logoff event to the domain, you can try this method:

Step 1: Create the following two files using Notepad or your favorite text editor:

------logon.cmd----
echo logon %username% %computername% %date% %time% >> \\dc1\share\logon.log

-----logoff.cmd-----
echo logoff %username% %computername% %date% %time% >> \\dc1\share\logoff.log

Step 2: Update Group Policy to run the appropriate batch file. In Group Policy, go to:
User Configuration-> Windows Settings-> Scripts (Logon/Logoff)-> Logon
User Configuration-> Windows Settings-> Scripts (Logon/Logoff)-> Logoff

Step 3:
As users log on and off, your log file should look something like this:

logon Richard WS01 Tue 22/02/2005 10:39:51.12
logon Peter WS02 Tue 22/02/2005 10:42:01.07

logoff Richard WS01 Tue 22/02/2005 10:41:08.45
logoff Peter WS02 Tue 22/02/2005 10:42:46.81

For paid solution and better reporting, you can use the software from:
http://manageengine.adventnet.com/products/desktop-central/

Comments

syed zaheer ahmed said:

where is this log file is saved so that we can check

about logins

my email id is

syedzaheer_ahmed@rediffmail.com

# June 6, 2007 10:49 AM

Richard said:

Hi, the log file will save to \\dc1\share\

I would suggested to use a hidden share to store it, so that other users cannot not see it.

# June 6, 2007 1:06 PM

Arghadeep said:

Thanks for great help. Now, I am able to track the user logon and logoff activity. However, here in my network i have two OS (Dual boot)windows xp and windows 98; I am not able to track the user who logged in or out with windows 98 system. Please anyone there to HELP me out of this situation.

Thanks....

# November 5, 2007 1:38 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)