Re: Users login and logout details



On Wed, 19 Jul 2006 00:57:01 -0700, shiva wrote in microsoft.public.win2000.security:

We have windows 2k domain with 50 clients. We want details of users who
logged in and logged out at what time and which system and ip address of the
system.

Is there any inbuilt or other tools by which i get all the details.

Here is the part of our KiXtart user login/logout scripts which records those events:

; Create an empty file in the hidden share \\server\LOGONS$ ($theLogons) of the form
; <user>YYYYMMDDHHMMSSN.<computername>
$sNow = Substr(@DATE,1,4)+Substr(@DATE,6,2)+Substr(@Date,9,2)+Substr(@Time,1,2)+Substr(@TIME,4,2)+Substr(@TIME,7,2)
If Open(3, $theLogons + "\" + @USERID + $sNow + "N." + @WKSTA, 5) = 0
$RC = Close(3)
EndIf

; Create an empty file in the hidden share \\server\LOGONS$ ($theLogons)of the form
; <user>YYYYMMDDHHMMSSF.<computername>
$sNow = Substr(@DATE,1,4)+Substr(@DATE,6,2)+Substr(@Date,9,2)+Substr(@Time,1,2)+Substr(@TIME,4,2)+Substr(@TIME,7,2)
IF Open(3, $theLogons + "\" + @USERID + $sNow + "F." + @WKSTA, 5) = 0
$RC = Close(3)
EndIf

In KiXtart, the function ENUMIPINFO() returns the IP address; incorporating
it into the naming scheme above is left as an exercise for the reader.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
.