user login and logout monitor

Home Forums Server Operating Systems Windows Server 2012 / 2012 R2 user login and logout monitor

This topic contains 9 replies, has 7 voices, and was last updated by Avatar agaspan 3 years, 12 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Avatar
    VMware
    Participant
    #165658

    Dear Sir’s,

    i want to gather the all user login and logout times (desktops/laptops) in the domain

    in windows server 2012 standard we have hosted AD.and all client systems with windows 8.1 OS

    Please help on this

    Avatar
    Ossian
    Moderator
    #190824

    Group policy to enable auditing of account logons, plus possibly event forwarding to a central location
    :google: will take you further

    Avatar
    danielp
    Participant
    #172631
    Ossian;n492292 wrote:
    Group policy to enable auditing of account logons, plus possibly event forwarding to a central location
    :google: will take you further

    It’s worth noting that you need to collect these events from all the DCs in the domain, as users/computers may logon to different DCs, and these events are stored locally on each DC.

    Avatar
    uk_network
    Member
    #307986

    I’ve always liked the logon/log off script method.
    Someone has written a guide here.
    https://community.spiceworks.com/how_to/82-monitor-user-log-in-and-log-off-without-software

    Microsoft has some extra variables to add to the above:
    https://support.microsoft.com/en-us/kb/556015
    2. Create a logon script on the required domain/OU/user account with the following content:
    echo %date%,%time%,%computername%,%username%,%sessionname%,%logonserver% >>

    3. Create a logoff script on the required domain/OU/user account with the following content:
    echo %date%,%time%,%computername%,%username%,%sessionname%,%logonserver% >>

    Avatar
    agaspan
    Member
    #389504
    uk_network;n492346 wrote:
    I’ve always liked the logon/log off script method.
    Someone has written a guide here.
    https://community.spiceworks.com/how…thout-software

    Microsoft has some extra variables to add to the above:
    https://support.microsoft.com/en-us/kb/556015
    2. Create a logon script on the required domain/OU/user account with the following content:
    echo %date%,%time%,%computername%,%username%,%sessionna me%,%logonserver% >>

    3. Create a logoff script on the required domain/OU/user account with the following content:
    echo %date%,%time%,%computername%,%username%,%sessionna me%,%logonserver% >>

    Sir,i added the script (https://community.spiceworks.com/how…thout-software) in GPO but no records are showing in computer,user folder

    updated GPO,restarted client machine,removed and added freshly the script in gpo but not worked

    Avatar
    wullieb1
    Moderator
    #245291

    Maybe you should post your script for us to have a look at.

    Avatar
    agaspan
    Member
    #389505

    Sir,

    Please find the scripts

    Avatar
    biggles77
    Spectator
    #213975
    VMware;n492533 wrote:
    Sir,

    Please find the scripts

    Logon

    rem The following line creates a rolling log file of usage by workstation
    echo Log In %Date% %TIME% %USERNAME% >> \172.16.30.5LogonsComputer%COMPUTERNAME%.log

    rem The following line creates a rolling log file of usage by user
    echo Log In %Date% %TIME% %COMPUTERNAME% >> \172.16.30.5LogonsUser%USERNAME%.log[/CODE]

    [SIZE=14px][FONT=times new roman][U][B]Logoff[/B][/U][/FONT][/SIZE] [CODE]

    rem The following line creates a rolling log file of usage by workstation
    echo Log Off %Date% %TIME% %USERNAME% >> \172.16.30.5LogonsComputer%COMPUTERNAME%.log

    rem The following line creates a rolling log file of usage by user
    echo Log Off %Date% %TIME% %COMPUTERNAME% >> \172.16.30.5LogonsUser%USERNAME%.log [/CODE]

    [FONT=times new roman][SIZE=14px]Posted from the above TXT files so readers do not feel uncomfortable opening attached files.[/SIZE][/FONT][CODE]
    rem The following line creates a rolling log file of usage by workstation
    echo Log In %Date% %TIME% %USERNAME% >> \172.16.30.5LogonsComputer%COMPUTERNAME%.log

    rem The following line creates a rolling log file of usage by user
    echo Log In %Date% %TIME% %COMPUTERNAME% >> \172.16.30.5LogonsUser%USERNAME%.log[/CODE]

    [SIZE=14px]Logoff[/SIZE]

    rem The following line creates a rolling log file of usage by workstation
    echo Log Off %Date% %TIME% %USERNAME% >> \172.16.30.5LogonsComputer%COMPUTERNAME%.log

    rem The following line creates a rolling log file of usage by user
    echo Log Off %Date% %TIME% %COMPUTERNAME% >> \172.16.30.5LogonsUser%USERNAME%.log [/CODE]

    [FONT=times new roman][SIZE=14px]Posted from the above TXT files so readers do not feel uncomfortable opening attached files.[/SIZE][/FONT][CODE]

    rem The following line creates a rolling log file of usage by workstation
    echo Log Off %Date% %TIME% %USERNAME% >> \172.16.30.5LogonsComputer%COMPUTERNAME%.log

    rem The following line creates a rolling log file of usage by user
    echo Log Off %Date% %TIME% %COMPUTERNAME% >> \172.16.30.5LogonsUser%USERNAME%.log [/CODE]

    [SIZE=14px]Posted from the above TXT files so readers do not feel uncomfortable opening attached files.[/SIZE]

    Avatar
    agaspan
    Member
    #389506

    Thanks Sir [USER=”347″]biggles77[/USER]

    Avatar
    uk_network
    Member
    #307987

    Hello. as long as you added the script correctly to the GPO then I’d look at the path. \172.16.30.5LogonsUser It may be worth sharing out the user directory and give then everyone group modify permissions to the share, in the sharing tab and also the security tabl So the new share may look like \172.16.30.5User$ The $ will make the share a hidden share. Then test again. I think (correct me if im wrong)this script will run under the computers local system account so that needs to be able to modify the above share.

    Having looked again. You could just share the folder \172.16.30.5Logons and everyone to permissions to modify, and after some testing you can lock it down further.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Register for this Petri Webinar!

Want to Make Your Backup Storage Unlimited & Ready for the Cloud? – Free Thurrott Premium Account with Webinar Registration!

Tuesday, August 27, 2019 @ 1:00 pm EDT

A Scale-Out Backup storage infrastructure is a must-have technology for your backups. In this webinar, join expert Rick Vanover for a look on what real-world problems are solved by the Scale-Out Backup Repository.

Register Now

Sponsored By