Page 1 of 1 1
Topic Options
#147968 - 2005-09-16 02:33 PM Token cache unreliable?
Psari76 Offline
Lurker

Registered: 2005-09-16
Posts: 2
Loc: Switzerland
I use InGroup() to install printers, software, copy program shortcuts and word templates for a group of users. Since KiXtart 4.5 InGroup() has troubles to determine the group membership correctly.

When I add the logged-in user to a new group or rename a group then EnumGroup() doesn't show the changes. The only thing that helped was inserting "kix32 /f > nul" in the .BAT-File that launches our kix-loginscripts. This refreshes the token cache on each logon. I would better like to switch it entirely off in future releases.

Intelligently detect changes in Active Directory always worked bad, maybe you know Recipient Update Service in Exchange that tries the same.

Top
#147969 - 2005-09-16 02:46 PM Re: Token cache unreliable?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

rename a group then EnumGroup() doesn't show the changes.




This is a known limitation of the caching mechanism and is documented in the manual.

If you are likely to encounter this a lot you might be better off querying group membership using native AD mechanisms.

Alternatively, remove the group cache registry key as the first task in your script. This will slow it down a bit as it will always need to enumerate group membership once per script invocation, but it does guarantee that the cache is up-to-date.

Top
#147970 - 2005-09-16 02:48 PM Re: Token cache unreliable?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
AFAIK, there is no change in how it works in 4.5 (vs. prior 4.x versions) and renaming groups are known to affect what you call the "reliability" of the cache. The cache can be flushed with the -F switch as you already know or better still, by deleting the reg key. Basically it is the same as your request to switch it off.

You could of course, also change the frequency of the cache flush rather than flush it on every logon.


Edited by Les (2005-09-16 03:12 PM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#147971 - 2005-09-16 08:24 PM Re: Token cache unreliable?
Psari76 Offline
Lurker

Registered: 2005-09-16
Posts: 2
Loc: Switzerland
First I added a user to an existing group. Using EnumGroup() I learned that the script did not know about the group membership. Relog did not help. So it seems best to flush the cache every logon. (My clients don't have patience for a scheduled flush.)

We used KiXtart 4.2 for two years without problems. That's why I suspected version 4.5.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 874 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.187 seconds in which 0.164 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