+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 48
Scripts Thread, Script to track user logins in Coding and Web Development; Hi all, I've been lurking on the site for a while now and have just picked up on this thread. ...
  1. #31

    Join Date
    Oct 2005
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Script to track user logins

    Hi all,
    I've been lurking on the site for a while now and have just picked up on this thread. There seems to be a lot of complicated code for what is a simple job.
    I log my users and computers (900 and 350) using a couple of batch files which are called from a login script. They are placed in a GPO in User Configuration-Window Settings-Scripts

    The logon script is as follows:
    @echo ON,%COMPUTERNAME%,%USERNAME%,%TIME%,%DATE% >> \\server\wherever\monitor.txt.
    The Logoff script is the same (replacing ON with OFF!)
    The text file is converted on a daily basis to a CSV file and then manipulated in a spreadsheet.
    I hope this helps someone

    Rob

  2. #32

    GrumbleDook's Avatar
    Join Date
    Jul 2005
    Location
    Gosport, Hampshire
    Posts
    9,921
    Thank Post
    1,332
    Thanked 1,773 Times in 1,100 Posts
    Blog Entries
    19
    Rep Power
    593

    Re: Script to track user logins

    Quote Originally Posted by Geoff
    I have a feeling though Geoff will no doubt examine my future posts / scripts and contributions and no doubt pick holes in them.
    No more or less than anyone else's, including my own.
    And there are plenty of people happy to pick Geoff's posts apart too ;-)

  3. #33
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,637
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22

    Re: Script to track user logins

    I don't know if this is any relevance to this topic but I use it to create reports on all sorts, and ait's free.

    AD Manager Pro, google it.

    Also I've just inplemented LimitLogin which is really causing a fuss round school hehe.

  4. #34

    Join Date
    Oct 2006
    Location
    uk
    Posts
    494
    Thank Post
    19
    Thanked 3 Times in 2 Posts
    Rep Power
    16

    Re: Script to track user logins

    deep breath....
    wow ok then where was i oh thats right any one feel like helping me out with this database thing then??
    all i want is to be able to set up some sort of query that will get all the info from this already existing very decent way of recording log on/log off etc, the problem that i'm faced with is that it natrually logs everyone that logs on but jsut keeps adding to the records so i need to search for todays records

    am i making any sense?

  5. #35

    Join Date
    Oct 2006
    Location
    uk
    Posts
    494
    Thank Post
    19
    Thanked 3 Times in 2 Posts
    Rep Power
    16

    Re: Script to track user logins

    robM yes that sort of helps and is almost the same as this script (except it writes to access) you still must face the same problem though how can you tell at any given time who is logged on where.
    for example
    " has anyone seen student1, yeah i say (having queryed my database for todays log on/log offs) he is sat at that machine in that room"

    or christ knows but hes not logged on anywhere..

  6. #36
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,637
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22

    Re: Script to track user logins

    I finds out is peoples are logged on already and where by opening an MMC that I have.

    It has the Sessions of each DC in my Domain listed which tells me who has an open session and, hence, who is logged on and where.

  7. #37

    Join Date
    Oct 2006
    Location
    uk
    Posts
    494
    Thank Post
    19
    Thanked 3 Times in 2 Posts
    Rep Power
    16

    Re: Script to track user logins

    sessions just don't work for us don't ask why cos i'm not sure but it our domain controlers just seem to hold onto them so it gives false feedback.

  8. #38

    Join Date
    Oct 2005
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Script to track user logins

    Uraken
    open up the script created by the batch file and save as a .CSV file. Then open up that file in the spreadsheet of your choice (mines OpenOffice) Select the data columns and then sort it on column C and column D. This gives a list of users and the times they logged in and out.

    I usually take the text file and cut and paste the previous days logging events into another file named as the date.CSV. This makes it easier to retrieve the info required.

    It has proved useful on more than a few occasions to find out last used a computer that had been vandalised. Also by finding out who had been sitting close by we have been able to get corroborating evidence, before confronting the culprit.!!
    Rob

  9. #39

    Join Date
    Oct 2006
    Location
    uk
    Posts
    494
    Thank Post
    19
    Thanked 3 Times in 2 Posts
    Rep Power
    16

    Re: Script to track user logins

    sorry for not getting back sooner been one of those weeks i will try and take a look at your suggestions next week robm thanks for time and efforts mate i'll keep you updated.

  10. #40
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    33

    Re: Script to track user logins

    Part of our kixtart login script logs this info to a sql server which we query from some very handy web pages. It allows us to view the information in all sorts of ways - from simple user + computer searches to more complex aggregated views showing trends etc. Once it's in a database it's easy to work with the data.

    On the security front you could at least make sure the database account used by the login script only had the ability to add records.

    Our database has logged over 400,000 logins and it's still pretty tiny.

  11. #41

    Join Date
    Oct 2006
    Location
    uk
    Posts
    494
    Thank Post
    19
    Thanked 3 Times in 2 Posts
    Rep Power
    16

    Re: Script to track user logins

    we have sql server here mate (are you offering to shhare the code?)

  12. #42
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    33

    Re: Script to track user logins

    Yeah, sure. I'll send you a PM cos it might be fiddly to set up.

    EDIT: Sent! If other people might find this useful I'll post it in a new thread. I'll try to knock up some easy-to-follow instructions first though.

  13. #43
    ozydave's Avatar
    Join Date
    Jun 2007
    Posts
    243
    Thank Post
    68
    Thanked 34 Times in 23 Posts
    Rep Power
    31

    Re: Script to track user logins

    Downloaded the 'logonrecorder.zip' file this morning.
    Works great. Easy to set up and use.

    Many thanks to the author

    Dave

  14. #44
    Nick_Parker's Avatar
    Join Date
    Jan 2008
    Location
    Dainfern, South Africa
    Posts
    435
    Thank Post
    95
    Thanked 18 Times in 13 Posts
    Rep Power
    17
    Quote Originally Posted by ashok View Post
    Hi Guys,

    Here's few scripts that were posted in the communities forum (RM). They have a logon and logoff script which basically records the user's logon and logoff information.

    You need to modify the location of the access database and have i believ write permission on the db.

    There is a help file (PDF) which tells you how to use and set it up. I found it it to be really useful and very easy to setup.


    Ashok.
    Is there anyway you could change the script to use a MySQL Database instead of an Access Database?

  15. #45

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,400
    Thank Post
    636
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    If you want to access MySQL in VBScripts I think you will need to have the ODBC driver installed on the machines.

SHARE:
+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Make a script run for SINGLE domain user
    By philtomo-25 in forum How do you do....it?
    Replies: 5
    Last Post: 15th November 2007, 09:21 PM
  2. Concurrent user logins on 2k3 domain
    By doco in forum Windows
    Replies: 4
    Last Post: 26th June 2007, 11:33 AM
  3. Track user logons?
    By Jon1 in forum Windows
    Replies: 33
    Last Post: 22nd June 2007, 02:44 PM
  4. Script to change user email in AD (or Exchange)
    By SpuffMonkey in forum Scripts
    Replies: 16
    Last Post: 8th November 2005, 10:31 PM
  5. Script to create a local user on a XP box.
    By tosca925 in forum Scripts
    Replies: 3
    Last Post: 12th October 2005, 12:04 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •