Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Logging Login's

  • 18-04-2007 8:21am
    #1
    Registered Users, Registered Users 2 Posts: 7,020 ✭✭✭


    Anybody know of any utility that can log login's and time on an XP machine ?, I have to run a usage report on 21 PC's. Any help much appreciated

    21/25



Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    You can use group policy to add an event to the security log in the event viewer, every time someone logs on. The only issue is that this logs more than just the login at the screen, it logs when people access the machine remotely, and when it logs onto itself.

    What I've done numerous times is add an item to the logon script that opens a file in a network directory, with the details of the logon. So if the name of the machine is "JOESMACHINE", then it opens a file in a specified directory called "JOESMACHINE.log". Every time someone logs onto that machine, it adds a line to the log, with the relevant details.

    I actually usually do this for logins - so it opens a file called "<username>.log", and inserts a line containing the date and time of the login, and the name of the machine they logged onto. Very handy for finding out the name of someone's machine.

    Assuming you're on a domain, this is simple. Even off a domain, it should be easy for only 21 machines. I wrote it in VBScript, it should only need a few lines.


  • Closed Accounts Posts: 2,460 ✭✭✭workaccount


    seamus wrote:
    You can use group policy to add an event to the security log in the event viewer, every time someone logs on. The only issue is that this logs more than just the login at the screen, it logs when people access the machine remotely, and when it logs onto itself.

    What I've done numerous times is add an item to the logon script that opens a file in a network directory, with the details of the logon. So if the name of the machine is "JOESMACHINE", then it opens a file in a specified directory called "JOESMACHINE.log". Every time someone logs onto that machine, it adds a line to the log, with the relevant details.

    I actually usually do this for logins - so it opens a file called "<username>.log", and inserts a line containing the date and time of the login, and the name of the machine they logged onto. Very handy for finding out the name of someone's machine.

    Assuming you're on a domain, this is simple. Even off a domain, it should be easy for only 21 machines. I wrote it in VBScript, it should only need a few lines.


    Any chance you could post that logon script Seamus?


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Don't have it to hand I'm afraid.
    Check out the Windows Scripting Host. It's simple VBScript that you can hack together in a matter of minutes.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,591 Mod ✭✭✭✭Capt'n Midnight


    echo %date% %time% %username%>> \\server\share\%computername%.log


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Heh, that would work too :)


  • Advertisement
  • Closed Accounts Posts: 2,460 ✭✭✭workaccount


    echo %date% %time% %username%>> \\server\share\%computername%.log


    Im having trouble implementing this. I have created this the above quoted in a .bat file.
    On the domain controller I have assigned a group policy on the OU im in as a test.

    I changed settings in User Configuration > Windows settings > Scripts (Login/logoff). I added my script templogon.bat and its in the correct folder. Then a group policy update and it didn't run the script when I logged back in. I tried running the group policy on the domain level but that didn't work either.


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Can you run the batch file directly to confirm that it does actually run, and doesn't generate errors, such as permissions, etc?

    I've always found that a reboot of the client PC tends to sort out these kind of group policy issues, although you shouldn't have to.


  • Closed Accounts Posts: 2,460 ✭✭✭workaccount


    seamus wrote:
    Can you run the batch file directly to confirm that it does actually run, and doesn't generate errors, such as permissions, etc?

    I've always found that a reboot of the client PC tends to sort out these kind of group policy issues, although you shouldn't have to.

    The problem was that there was a mistake in the path to where I wanted to save the log. Running it directly from start run as you suggested showed me this as there was a pause in the script so I could see what had been done.

    I thought though that the script was not running at all as when I log in the cmd window doesn't show up and pause as specified in the script!

    Anyways sorted now. Cheers. :)


  • Closed Accounts Posts: 2,460 ✭✭✭workaccount


    Is there a better way to report back what os im using rather than %OS% as this reports back just "Windows NT" which is useless for distinguishing between 2000 and XP machines.


    Seamus: Do you know how to get the "Everyone" distribution list on Exchange? Shouldn't it be just there?


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    This page gives a good example on using the ver command to get it:
    http://malektips.com/xp_dos_0025.html

    For Exchange;
    You would think that such a list would be there, but no :)
    If you think about it logically, if there was a default distribution list set up for everyone when you installed Exchange, then so many viruses and spammers would target that address. So it's probably a good idea that such a thing doesn't exist by default.

    What you can do is set up a Query-based distribution list that just pulls in every mailbox/user in the organistion. This means that you don't need to add in every user when you create them.

    Another solution are nested lists. That is, the "Everyone" list, only consists of department distribution lists, and no individual mailboxes. Thus when you add a new user to their distribution list, they automatically get added to the "Everyone" list too (and any other nested lists).


  • Advertisement
Advertisement