karldenton Posted January 19, 2009 Posted January 19, 2009 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
BatchFile Posted January 19, 2009 Posted January 19, 2009 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!
K.C.Leblanc Posted January 19, 2009 Posted January 19, 2009 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.
Popular Post tosh74 Posted January 19, 2009 Popular Post Posted January 19, 2009 Just update the \\server\share$ part and assign logon and logoff trackers as logon / logoff users scriptslogontracker.vbslogoftracker.vbs 11
karldenton Posted January 19, 2009 Author Posted January 19, 2009 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?
IanT Posted January 19, 2009 Posted January 19, 2009 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
karldenton Posted January 19, 2009 Author Posted January 19, 2009 Give staff and pupils full control over the particular share
karldenton Posted January 19, 2009 Author Posted January 19, 2009 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 ?
tosh74 Posted January 20, 2009 Posted January 20, 2009 (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 January 20, 2009 by tosh74 2
FN-GM Posted January 20, 2009 Posted January 20, 2009 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.
Pottsey Posted January 20, 2009 Posted January 20, 2009 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.
tosh74 Posted January 20, 2009 Posted January 20, 2009 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
Pottsey Posted January 20, 2009 Posted January 20, 2009 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.
tosh74 Posted January 20, 2009 Posted January 20, 2009 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. 1
Pottsey Posted January 20, 2009 Posted January 20, 2009 (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 January 20, 2009 by Pottsey
ChrisP Posted January 20, 2009 Posted January 20, 2009 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 1
IanT Posted January 20, 2009 Posted January 20, 2009 Im getting: Line 30 Char 2 Error: Permission Denied Code: 800A0046 Source: Microsoft VBScript rutime error The script still runs and logs though.
NeoPlosive Posted February 8, 2009 Posted February 8, 2009 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. 1
TwoZeroAlpha Posted March 23, 2009 Posted March 23, 2009 Just update the \\server\share$ part and assign logon and logoff trackers as logon / logoff users scripts Mega, just got this working, very happy here.
sahmeepee Posted March 23, 2009 Posted March 23, 2009 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...
mb2k01 Posted March 23, 2009 Posted March 23, 2009 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!)
garethEds Posted March 23, 2009 Posted March 23, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now