Page 1 of 1 1
Topic Options
#17511 - 2002-02-15 03:04 AM logoff script
ez4me2c3d Offline
Fresh Scripter

Registered: 2001-11-17
Posts: 9
Loc: SD
Hi all,
Any ideas on how to make a logoff script? kinda like the onUnload in JS. Hey, would also like to know if this is probable...sleeping a kix script for 12 hours then logging off the user. this way users cannot have a logon session longer than 12 hours. would that put a lot of stress on the domain controllers? or should i set up the kix files on local machine and call the local script that woul sleep for 12 hours from the logon script off the server?

on other question...im taking over the scripting for my domain and the guy before me has in his script a little trick to spread the processing of scripts. basically he takes the 8th character of @TIME and depending of this he sleeps for 1 to 3 seconds. is this effective and worth it? and what if we sync system time at logon to a time server? wouldn't that make everyone's time the same right down to the 8th character of @TIME, thus defeating the purpose of the trick he used to spread processing? Thanks fo your feedback in advanced.

_________________________
-anthony

Top
#17512 - 2002-02-15 04:01 AM Re: logoff script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
EZ,
I'm not a proponent of anything that kicks a user off at the risk of the user loosing unsaved work or seriously hindereing one's ability to do the job. Hell, why not just take the computer away from those pesky users any our jobs would be much lighter. Pardon my ascerbic tone.

Why not just monitor their on-line time and then spam them with reminders if they exceed their alloted time?

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#17513 - 2002-02-15 04:10 AM Re: logoff script
ez4me2c3d Offline
Fresh Scripter

Registered: 2001-11-17
Posts: 9
Loc: SD
The reason is this...our users need only to be logged in from 7am until 4pm to do their job, and we have a lot of users that just lock their workstations at the end of the day so they can bypass the logon scripts in the morning. so if we wait 12 hours i figure they login as early as 6am that would give them until 6pm to logoff.

ok well lets forget about logging them off...what about just detecting when they logoff?

_________________________
-anthony

Top
#17514 - 2002-02-15 04:29 AM Re: logoff script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, if you want to do it centrally from an admin script, here's a little KiX4 UDF.
LASTLOGDATE( $Username ) - Determine last Logged on or logged off

You could also log to file their logon time and then if it is over 32 hours, then obviously they either didn't show up for work or they are still logged in. There are other utils that can tell you who's logged in to a particular machine so you can query it. PSLoggedOn from www.sysinternals.com is one and NetUsers from www.systemtools.com is another.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#17515 - 2002-02-15 04:01 PM Re: logoff script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Force an automatic logoff by setting the allowed login times on the domain controller. This way you can restrict specific users to certain time periods. Check out eh t User Manager for Domain to set it up.
_________________________
There are two types of vessels, submarines and targets.

Top
#17516 - 2002-02-15 04:28 PM Re: logoff script
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
Why not just disable the lock workstation function?
_________________________
Austin Henderson

Top
#17517 - 2002-02-15 04:29 PM Re: logoff script
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
I may be wrong but the allowed hours will not kick the user off as I think was sugguested by a previous submitter. I think that if a user is on inside the allowed hours it will allow him/her on... very similar to expire account.. but it will not allow then back on after that period expires. I may be wrong though.. but I would test that idea first.

Thanks

_________________________
Austin Henderson

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.056 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org