How to log users log-on-off time

Discussion in 'Scripting' started by Miha, Mar 11, 2008.

  1. Miha

    Miha Guest


    Is it possible in Win2003 domain environment to get infromations when users
    log-on and log-off into their computers?
    My boss wants that when a user log-on and log-off into his computers, he
    automatically gets an e-mail with the following data:
    - user that has logged on/off
    - the time of log-on/off
    Can this be arranged via GPO or do we need custom VBS script? If so, does
    anyone have it allready?
    Thank you all in advance.
    Miha, Mar 11, 2008
    1. Advertisements

  2. Corey Thomas - MCSE/MCSA/MCDBA, Mar 11, 2008
    1. Advertisements

  3. Miha

    Miha Guest

    Great, thank you all for help!
    "Corey Thomas - MCSE/MCSA/MCDBA"
    Miha, Mar 11, 2008
  4. Maybe it would be better when you configure your logon and logoff script to
    add a line with the desired data (username, time of logon/logoff,
    domain,action, ect ect) to a file on a server share and name the file after
    the computer.

    For instance you create a (hidden?)share and let every script report to a
    file in that share.

    You'd have something like this:


    Your boss will have a complete listing of all used computers, the frequency
    of use and which user logs on to that computer.
    This is a much easier way of checking and archiving this kind of data.

    Just my 2 cents. :)

    Albert Kikkert, Mar 11, 2008
  5. That's what we do. We log the user name, date, time, and computer name back
    to a file on a server share. Each file is named by the user's login. Each
    time the script runs, it opens the file and appends the info so we can keep a
    running record.

    I'm trying to get upper management to invest in a SQL server so we can save
    the info there for better SOX compliance and more robust features. :)

    Corey Thomas - MCSE/MCSA/MCDBA, Mar 11, 2008
  6. What's wrong with Auditing the logons on the domain controller? Simply
    define the domain GPO to audit user logon. It won't be sending any mail
    Paul Weterings, Mar 11, 2008
  7. 1) the boss doesn't get email
    2) the boss needs administrative priviliges
    3) the security log will have no history unless you make it very very big.
    4) there is a lot of overkill in the information. The boss most probably
    doesn't know jack from reading sec. logs. :)
    Albert Kikkert, Mar 13, 2008
  8. I'm new here, but I put together a couple of scripts just recently to add a
    record to an access database when a user logged on and then add the logoff
    time to that same record when they logoff again but they could, just as
    easily, put the info into a spreadsheet for statistical analysis, perhaps a
    better idea than emails or a basic text file.
    AndrewOfAzotus, Apr 14, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.