Page 1 of 1 1
Topic Options
#126053 - 2004-09-02 03:40 PM Time restrictions
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
I have added the following code to my login script to prevent users from running certain applications during system maintenance hours. If the requirements are not met I don’t map certain drives and also remove certain application icons from the user’s Desktop, so that they don’t accidentally run certain applications during database re-indexing.

Does the logic make sense? For some strange reason on EOM processing nights Operations doesn’t get the correct drive mappings or the application icon if they login after mid-night.

Code:

$Exempt = "No"
If InGroup("Administrators", “Domain Admins", "Operations", 0)
$Exempt = "Yes"
EndIf
;
$LogonTime = @TIME
If $LogonTime > 06:30:00 And $LogonTime < 20:00:00 Or $Exempt = "Yes"
; Map drives
Else
; Don't map drive and remove icons from Desktop
EndIf



Top
#126054 - 2004-09-02 03:45 PM Re: Time restrictions
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
try this instead :

Code:
If ($LogonTime > 06:30:00 And $LogonTime < 20:00:00) Or $Exempt = "Yes"  

_________________________



Top
#126055 - 2004-09-02 03:49 PM Re: Time restrictions
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
I'll have operations try it tonight, after mid-night.

Thanks.

Top
#126056 - 2004-09-02 03:51 PM Re: Time restrictions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
or even:
If ($LogonTime > "06:30:00" And $LogonTime < "20:00:00") Or $Exempt = "Yes"
_________________________
!

download KiXnet

Top
#126057 - 2004-09-02 03:55 PM Re: Time restrictions
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
What about users that stay logged in for days or weeks? Or users that create their own shortcuts? Should this not be handled inside the application instead?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126058 - 2004-09-02 03:56 PM Re: Time restrictions
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Oops, yeah!

that may be better
_________________________



Top
#126059 - 2004-09-02 04:12 PM Re: Time restrictions
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
The servers reboot at 20:00:00 to clear any connections to the database, before the nightly utilities start at 20:30:00. User can log back in after servers come back up and continue working with email, Word, Excel and the like until 22:00:00 then the system policy takes over and logs them out.

As for the application, we didn’t write it and the problem has been brought up to the vendor several times, but they have not come up with a solution.

Top
#126060 - 2004-09-02 04:25 PM Re: Time restrictions
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I still think messing with the clients is a half-baked idea. Why not just remove their permissions when the server reboots and restore it after the job is done?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126061 - 2004-09-02 05:05 PM Re: Time restrictions
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Les, you're right. This was a quick and dirty way of doing this until we moved to Active Directory. I will then try to manage this with a policy.
Top
#126062 - 2004-09-03 05:57 AM Re: Time restrictions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
server reboots?
uuh!
do you reboot a servers just to disconnect clients???
seeing red...
_________________________
!

download KiXnet

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 871 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 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