Solved

log in log

Posted on 2013-01-18
7
550 Views
Last Modified: 2013-04-03
Is there a log that shows when an employee logged into the network and when they logged out each day, for any sort of timeframe?
0
Comment
Question by:geriatricgeek
7 Comments
 
LVL 11

Expert Comment

by:itguy565
ID: 38795005
Here is one way to do it.

http://msmvps.com/blogs/kwsupport/archive/2005/02/24/36942.aspx then import the data to excel and sort using the cells.
0
 
LVL 11

Assisted Solution

by:itguy565
itguy565 earned 333 total points
ID: 38795011
You could also use something like this :   (REFERENCE: http://community.spiceworks.com/scripts/show/70-track-login-and-logout)

REM Login Script:
for /f "Tokens=2 Delims=[]" %%i in ('ping -n 1 "%computername%"') do set IP=%%i

echo %username% logged ON %computername%, IP=%IP% @ %time% %date% >> \\servername\sharename$\%username%.txt


REM Logoff Script:
echo %username% logged OFF %computername% @ %time% %date% >> \\servername\sharename$\%username%.txt 


REM Startup Script:
for /f "Tokens=2 Delims=[]" %%i in ('ping -n 1 "%computername%"') do set IP=%%i
echo Started up, IP=%IP% @ %time% %date% >> \\servername\computers$\%computername%.txt

REM Shutdown Script:
echo Shutdown @ %time% %date% >> \\servername\computers$\%computername%.txt

Open in new window

0
 
LVL 11

Assisted Solution

by:itguy565
itguy565 earned 333 total points
ID: 38795015
This is what microsoft recommends on tech net : http://gallery.technet.microsoft.com/scriptcenter/Log-Parser-to-Identify-8aac36bd

# Authors: Ryan DeVries, Drew Bonasera, Scott Smith              
# Rochester Institute of Technology - Computer System Forensics 
 
# Variables 
# Reads the hostname, sets to the local hostname if left blank 
$hostname = read-host "Enter the IP or hostname of the computer you wish to scan (Leave blank for local)" 
if ($hostname.length -eq 0){$hostname = $env:computername} 
 
# Reads the start date, sets to 1/1/2000 if left blank 
$startTmp = read-host "Enter the start date to scan from (MM/DD/YYYY, default 1/1/2000)" 
if ($startTmp.length -eq 0){$startTmp = "1/1/2000"} 
$startDate = get-date $startTmp 
 
# Reads the end date, sets to the current date and time if left blank 
$endTmp = read-host "Enter the end date to scan to (MM/DD/YYYY, default current time)" 
if ($endTmp.length -eq 0){$endTmp = get-date} 
$endDate = get-date $endTmp 
 
# Reads a Yes or No response to print only the failed login attempts, defaults to No 
$scope = read-host "Print only failed logins (Y/N, default N)" 
if ($scope.length -eq 0){$scope = "N"} 
 
# Writes a line with all the parameters selected for report 
write-host "Hostname: "$hostname "`tStart: "$startDate "`tEnd: "$endDate "`tOnly Failed Logins: "$scope "`n" 
 
# Store each event from the Security Log with the specificed dates and computer in an array 
$log = Get-Eventlog -LogName Security -ComputerName $hostname -after $startDate -before $endDate 
 
# Loop through each security event, print only failed login attempts 
if ($scope -match "Y"){ 
    foreach ($i in $log){ 
        # Logon Failure Events, marked red 
        # Local 
        if (($i.EventID -eq 4625 ) -and ($i.ReplacementStrings[10] -eq 2)){ 
            write-host "Type:  Local Logon`tDate:  "$i.TimeGenerated "`tStatus:  Failure`tUser:  "$i.ReplacementStrings[5] -foregroundcolor "red" 
        } 
        # Remote 
        if (($i.EventID -eq 4625 ) -and ($i.ReplacementStrings[10] -eq 10)){ 
            write-host "Type: Remote Logon`tDate: "$i.TimeGenerated "`tStatus: Failure`tUser: "$i.ReplacementStrings[5] "`tIP Address: "$i.ReplacementStrings[19] -foregroundcolor "red" 
        } 
    }         
} 
# Loop through each security event, print all login/logoffs with type, date/time, status, account name, and IP address if remote 
else{ 
    foreach ($i in $log){ 
        # Logon Successful Events 
        # Local (Logon Type 2) 
        if (($i.EventID -eq 4624 ) -and ($i.ReplacementStrings[8] -eq 2)){ 
            write-host "Type: Local Logon`tDate: "$i.TimeGenerated "`tStatus: Success`tUser: "$i.ReplacementStrings[5] 
        } 
        # Remote (Logon Type 10) 
        if (($i.EventID -eq 4624 ) -and ($i.ReplacementStrings[8] -eq 10)){ 
            write-host "Type: Remote Logon`tDate: "$i.TimeGenerated "`tStatus: Success`tUser: "$i.ReplacementStrings[5] "`tIP Address: "$i.ReplacementStrings[18] 
        } 
         
        # Logon Failure Events, marked red 
        # Local 
        if (($i.EventID -eq 4625 ) -and ($i.ReplacementStrings[10] -eq 2)){ 
            write-host "Type: Local Logon`tDate: "$i.TimeGenerated "`tStatus: Failure`tUser: "$i.ReplacementStrings[5] -foregroundcolor "red" 
        } 
        # Remote 
        if (($i.EventID -eq 4625 ) -and ($i.ReplacementStrings[10] -eq 10)){ 
            write-host "Type: Remote Logon`tDate: "$i.TimeGenerated "`tStatus: Failure`tUser: "$i.ReplacementStrings[5] "`tIP Address: "$i.ReplacementStrings[19] -foregroundcolor "red" 
        } 
         
        # Logoff Events 
        if ($i.EventID -eq 4647 ){ 
            write-host "Type: Logoff`t`tDate: "$i.TimeGenerated "`tStatus: Success`tUser: "$i.ReplacementStrings[1] 
        }  
    } 
}

Open in new window



You must use powershell to run this script however.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 8

Expert Comment

by:bchallis
ID: 38799757
Where do you want to store the information? A text file on the machine, a network share, in in a SQL Server database?
0
 
LVL 19

Expert Comment

by:deroode
ID: 38801010
Short answer: No;

Netware doesn't keep a log when users are logged in and logged out. If you want such a log you'll have to create it yourself, using any of the above suggestions.

It may be possible to get some info from the eventlogs of your workstations, but you'll only be able to search the eventlogs of your own managed workstations (you won't find laptop logins if the laptop isn't present anymore)
0
 
LVL 2

Accepted Solution

by:
RRobinho earned 167 total points
ID: 38804208
You can find such log via some other utilities also
Like some Event Log Monitoring tool will help you out to find event log of user's log in & log out detail
In case you can try this to find such information
0
 
LVL 1

Author Closing Comment

by:geriatricgeek
ID: 38805406
I now have an event logger analyzer. writing a lot of scripts would take more time than i can allocate to it and troubleshoot the script. thanks for the input.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about achieving the basic levels of HRIS security in the workplace.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now