![]() |
|
|||||||
| Petri.co.il is happy to award Cruachan the title of Most Valuable Member !!! |
| Register | Calendar |
Search |
Today's Posts | Mark Forums Read |
| Notices |
|
Login and Logoff reportthis thread has 4 replies and has been viewed 4942 times
|
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||||||||
|
|||||||||
|
I've been asked by my director to come up with a way to run a report for login and logoff times for our users.
Does anyone know of any tools for this? I'm sure the info would need to come from the security logs on the domain controllers. I have 3 domain controllers for our domain and I don't want to look at each individually to find this info. Does anyone have any ideas? |
|
#2
|
|||||||||
|
|||||||||
|
I wrote a little script to do the same thing... also gives IP address, Machine Name, User Name, Date, Time..
It uses KIX... are you familiar with it? (it's a VERY simple script program) Will post the script in a sec... KIX: http://www.kixtart.org/
__________________
1 + 1 = 11 ... honest! |
|
#3
|
|||||||||
|
|||||||||
|
KIX script for logging a users login:
Firstly, get Kixtart from the URL above. Save the required files to the NETLOGON folder on your DC (see the quick-start guide for KIX). Create a .BAT file which will call the LOGIN portition. In the .BAT file put: Code:
@echo off \\SERVER_NAME\netlogon\kix32 \\SERVER_NAME\netlogon\log_login.kix Create a new txt file, rename it LOG_LOGIN.KIX and open in notepad. Enter this: Code:
IF Open( 3 , "\\**PATH_TO_SAVE_TO**\LOG.TXT" , 5 ) = 0 $x = WriteLine( 3 , "Logged In:," + @MDayNo + "/" + @Month + "/" + @Year + " " + @TIME + "," + @UserID + "," + @WkSta + "," + @IPADDRESS0 + @CRLF ) ELSE BEEP ? "failed to open file, error code : [" + @ERROR + "]" ENDIF Next create a .BAT file for the log out and enter: Code:
@echo off \\SERVER_NAME\netlogon\kix32 \\SERVER_NAME\netlogon\log_logout.kix Code:
IF Open( 3 , "\\**PATH_TO_SAVE_TO**\LOG.TXT" , 5 ) = 0 $x = WriteLine( 3 , "Logged Out:," + @MDayNo + "/" + @Month + "/" + @Year + " " + @TIME + "," + @UserID + "," + @WkSta + "," + @IPADDRESS0 + @CRLF ) ELSE BEEP ? "failed to open file, error code : [" + @ERROR + "]" ENDIF Now, add the call to each .BAT file in AD via GPO's.... shout if you need help with adding login/logout GPO configurations. Stoo (adapt any paths/filenames to suit your network and needs)
__________________
1 + 1 = 11 ... honest! |
|
#4
|
|||||||||
|
|||||||||
|
Here's an example output (ignore the names :P )
Code:
Logged In:,23/June/2005 09:29:28,WHSGB,CDSERVER02,169.254.254.250 Logged In:,23/June/2005 09:45:29,bickersn,CDSERVER02,169.254.254.250 Logged In:,23/June/2005 09:50:38,jenningsa,CDSERVER02,169.254.254.250 Logged Out:,23/June/2005 17:26:36,townsendb,ELITE12,169.254.254. 54 Logged Out:,23/June/2005 17:27:16,evenettg,GELAPTOP,169.254.254. 25 Logged Out:,23/June/2005 17:29:03,jonesc,INDUSTRIAL4,169.254.254. 33
__________________
1 + 1 = 11 ... honest! |
|
#5
|
||||||||||
|
||||||||||
|
If you want some comercial software you can see here one example:
http://www.isdecisions.com/index.cfm...s-WinReporter# Another way to do this, audit you login/logon in windows and then extract from event log to one file or data base with scripting.
__________________
MCSE w2k MCSA w2k - MCSA w2k MESSAGING MCDBA SQL2k |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shutdown Login Script | Michael19ave | Forgot Administrator Password | 1 | 24th February 2006 00:12 |
| Deny Login after certain time of day | dfcrj | Active Directory | 7 | 17th June 2005 03:36 |
| Force a logoff or a restart after a set period of idle... | Goober | Windows 2000 Pro, XP Pro | 5 | 7th January 2005 00:22 |