# track User log on and logoff in server



## acer_racer_2000 (Nov 3, 2007)

Hi Guys,

I just wanted to know if it is possible to know when some of the users are logging on and logging off their computers by accessing some function in the server?? 
I have a server 2003
I just want to keep track of who is logging on where and when?


----------



## Squashman (Apr 4, 2003)

Well you can setup a domain policy to Audit Logon events. I don't recall if that tells you what PC they are logging in from.

What we ended up doing when I worked for the school district was we had a logon script that executed for everyone. That logon script wrote to two files. One with their username and one with the computer name. It basically wrote their username, date, time, ip address, etc, etc to the log file.

I believe windows allows you to have logoff scripts as well so you could probably audit the logoff as well.


----------



## acer_racer_2000 (Nov 3, 2007)

Hey Thanks, it sounds like a good idea, can you tell me how to setup such a script. And please give me the script commands also.


----------



## Squashman (Apr 4, 2003)

It was just a batch file that echoed environmental variables.


----------

