Jump to content

Recommended Posts

Posted

Hi,

 

Looking for someway of loggin who's logged on where. I have tried the following logon script:

 

echo %DATE% %TIME% %USERNAME% %COMPUTERNAME% >> 2003server\netlogon\logs\%USERNAME%.txt

 

echo %DATE% %TIME% %USERNAME% %COMPUTERNAME% >> 2003server\netlogon\logs\%COMPUTERNAME%.txt

 

It doesn't seem to work at the moment. I have given staff and pupils full control over the "logs" folder.

 

Thanks

Posted

I use 2 bats:

 

First, fired from the login script:

call \\argus\whoswhere2\getinfo.bat >> \\argus\whoswhere2\loginlog.txt

 

Second, getinfo.bat fired from above:

@echo off

 

echo ******************************

 

echo %computername%

date /t

time /t

echo %username%

 

 

Works ok here, just remember to empty loginlog.txt each term!:D

Posted

I wouldn't use the netlogon folder, create your own shared folder for the purpose (maybe two one for users, one for computers). Bare in mind students will need write access to the folder (make it a hidden share using $ at the end of the sharename).

 

Also you're missing the \\ from the UNC path. It might even require a mapped drive, I'm not sure.

Posted

Tosh74, thanks for the scripts. Changed and updated for our server.

Can I just call them from the logon batch file directly to the .vbs? Is there a way for it to run in silent mode?

Posted
hold up, got it working for admins.................log on as a teacher or student and I get a lovely VB - Permission Denied error but it still logs the logon times etc
Posted

Quick question.

I have the logon one working fine by calling the script from the logon batch file.

How does the logoff one work? Do you have to add it to logoff script in GP ?

Posted (edited)

sorry for the late reply.

I run the logon / logoff tracker scripts via AD GPO for staff and students. USER CONFIG/WINDOWS SETTINGS/SCRIPTS (Logon/Logoff). Logontracker assigned to logon and logoftracker assigned to Logoff. I tend to run my scripts hiddden USER CONFIG/WINDOWS SETTINGS/ADMIN TEMPLATES/SYSTEM/SCRIPTS/RUN LEGACY LOGON SCRIPTS HIDDEN.

 

My log files are on a hidden share on a server. Users have Change and READ permissions to the share itself and have full permissions (with the exception of Full Control and Modify) to the shared folder. I have to create the COMPUTERS and USERS subfolders before the script runs correctly.

 

Hope this helps you out.

Edited by tosh74
  • Thanks 2
Posted
Just update the \\server\share$ part and assign logon and logoff trackers as logon / logoff users scripts

 

Been using this for a while its excellent.

Posted
Those scripts from Tosh look perfect for what we need but I cannot get them working. It says line 23, char2, error path not found, code 800A003C.
Posted
Those scripts from Tosh look perfect for what we need but I cannot get them working. It says line 23, char2, error path not found, code 800A003C.

 

Have you created a COMPUTERS and USERS folder under your server share ?

 

\\server\losg$\Computers

\\server\logs$\Users

Posted

Yes, currently have

 

strUserDirectory = "\\Hp-server\Log_Logs$\Users"

strCompDirectory = "\\Hp-server\Log_Logs$\Computers"

 

Just tripled checked the permissions and tried other folders. As usefull as they are I sometimes hate scripts.

Posted
Yes, currently have

 

strUserDirectory = "\\Hp-server\Log_Logs$\Users"

strCompDirectory = "\\Hp-server\Log_Logs$\Computers"

 

Just tripled checked the permissions and tried other folders. As usefull as they are I sometimes hate scripts.

 

I'm just checking that the above means that you have edited the script and you actually have that folder structure in place. If so then I would try (at first) assigning EVERYONE FULL ACCESS then tighten up your security permissions on both the share level and security (ntfs) level.

  • Thanks 1
Posted (edited)

Hrrm even more confused now, the script is working. It’s bringing up an error message but the folder is full of text log files.

 

EDIT: removed the $ from all four paths and its working perfectly. Thanks Tosh

Edited by Pottsey
Posted

I log to a mysql database, i find it to be a neat solution... then it's redisplayed via iis to a admin screen.

 

that way i can search and connect via vnc with 1 click when a user requires assistance

  • Thanks 1
Posted

Im getting:

 

Line 30

Char 2

Error: Permission Denied

Code: 800A0046

Source: Microsoft VBScript rutime error

 

The script still runs and logs though.

  • 3 weeks later...
Posted

Started using this properly on January 23rd.

 

Made some edits to the VBS scripts for a simple line input into the text files.

 

Set up the shares on our second DC and then watched the logging start ;)

 

Only additional thing I've done is set up a batch script which archives the log files into a daily folder at 23:59 each night (scheduled task) and then clears out the active folders.

 

i.e.

 

$:\$$$Tracker\Users

$:\$$$Tracker\Computers

 

to

 

$:\$$$Tracker\Archive\DD-MM-YYYY\Users

$:\$$$Tracker\Archive\DD-MM-YYYY\Computers

 

This will eliminate the need to ever do a tidy up or clear out.

 

Only thing I have noticed is some machines aren't logging... most likely because they're just wanting a rebuild back on to CC3.

  • Thanks 1
  • 1 month later...
Posted
I log to a mysql database, i find it to be a neat solution... then it's redisplayed via iis to a admin screen.

 

that way i can search and connect via vnc with 1 click when a user requires assistance

 

I do something similar logging to an MSSQL database. One of the advantages over a text file is that I only have to give access to add entries so the users can't delete all the records.

 

As you say it's also easier to build web based reports if you're looking at a SQL database. We have one-click access into the user's web logs for that day :) I think I can build a link in to our CCTV system too, but I've never had the time...

Posted

Just a quick one...

I stumbled accross this post and tested to see if it worked.

All I can say is WOW - thanks! Works like a dream (took 5 mins to set up and start logging!)

Posted
Started using this properly on January 23rd.

 

Made some edits to the VBS scripts for a simple line input into the text files.

 

Set up the shares on our second DC and then watched the logging start ;)

 

Only additional thing I've done is set up a batch script which archives the log files into a daily folder at 23:59 each night (scheduled task) and then clears out the active folders.

 

i.e.

 

$:\$$$Tracker\Users

$:\$$$Tracker\Computers

 

to

 

$:\$$$Tracker\Archive\DD-MM-YYYY\Users

$:\$$$Tracker\Archive\DD-MM-YYYY\Computers

 

This will eliminate the need to ever do a tidy up or clear out.

 

Only thing I have noticed is some machines aren't logging... most likely because they're just wanting a rebuild back on to CC3.

 

Neo - fancy putting that script up for us to use?

 

Gareth

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...