Page 1 of 1 1
Topic Options
#144656 - 2005-08-02 10:53 PM If InGroup - User does not show up in group??
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
I am hoping this will be an easy fix...
I have done many things in my company's logon script using:
Code:

If InGroup("Com_Div_GroupName")
?"Installing software..."
Else
?"User does not appear to be in group."
EndIf


I have recreated this one group twice, and removed/readded the members. I have also logged off/on the machines several times.
However, it still says "User does not appear to be in group." even though I KNOW I have added that user to the group. I tried renaming the function, renaming the group, etc... but it is not working for me.
My computers are on a Windows 2003 domain. I was able to get it to work succesfully on a test machine (user appeared to be in the group), but the users' (like four of them) own machines cannot seem to find them in the group.

I am pulling my hair out. Any suggestions?
Thanks!

Top
#144657 - 2005-08-02 10:55 PM Re: If InGroup - User does not show up in group??
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
flush the token cache for kix...

kix32 /f
or just wait... it will do it on its own... someday

Top
#144658 - 2005-08-02 10:55 PM Re: If InGroup - User does not show up in group??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
delete the kixtart cache, allow time for the new group to replicate thoughout your forest/domain

use the /f switch when launching kix

Add the domain in the lookup

InGroup('domain\goup')

Top
#144659 - 2005-08-02 10:56 PM Re: If InGroup - User does not show up in group??
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
doc! so close!
Top
#144660 - 2005-08-03 03:27 AM Re: If InGroup - User does not show up in group??
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Thanks Bryce and NTDOC!! I will try this tomorrow at work and let you know.
Hope all is well with you both!
-jdogg

Top
#144661 - 2005-08-03 07:01 PM Re: If InGroup - User does not show up in group??
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
You guys are the best. It is now finding the users in the group as it should.
So what I did is, in the batch file that calls the KiX executable, I put the following:
Code:
%SYSTEMDRIVE%\NWSUTIL\kix32 /f
START /MIN %LOGONSERVER%\NETLOGON\kixgui.exe


Now I guess I am calling kix32 twice, so should I modify the way I am encrypting my script using kixcrypt?
Here is the current syntax I use:
Code:

kixcrypt -e "%SYSTEMDRIVE%\NWSUTIL\kix32.exe %KIXCRYPTFILE%" kixgui.scr -m "Please wait..." -t C:\NWSUTIL


I guess this should be changed to:
Code:

kixcrypt -e "%SYSTEMDRIVE%\NWSUTIL\kix32.exe /f %KIXCRYPTFILE%" kixgui.scr -m "Please wait..." -t C:\NWSUTIL


Does this look right? I would like to include the /f in the encrypted executable if possible to avoid an extra call.

Thanks guys!

Top
#144662 - 2005-08-03 08:18 PM Re: If InGroup - User does not show up in group??
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Does this look right?



No.

First off, the whole point of the group cache is to cut down on network calls and speed up the script. There is no need to flush the cache on every logon, just when changes are made to the groups.

You can flush the cache simply by deleting the reg key.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#144663 - 2005-08-03 08:44 PM Re: If InGroup - User does not show up in group??
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
*n00b eaten*
Point taken. My main desire is to be able to rely on the script to accurately check members of groups. If the script is able to do this, then I would not need to flush the token cache.
So... I guess what I will have to do is, when a machine is found to not have the particular piece of software installed, I will manually flush the cache.
Or maybe I can put in a counter of some kind and flush the cache every Friday or something.

I cannot rely on flushing the cache when groups change, because groups by nature are ever changing.

Comments?
Thanks Les.

Top
#144664 - 2005-08-03 08:57 PM Re: If InGroup - User does not show up in group??
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
If you use Active Directory you could give fnInGroupAD() a go.
Top
#144665 - 2005-08-03 09:00 PM Re: If InGroup - User does not show up in group??
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Chris,
How do you think the performance of the lookups would be compared to the existing If InGroup?

Thanks for the suggestion.

Top
#144666 - 2005-08-03 09:08 PM Re: If InGroup - User does not show up in group??
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Or maybe I can put in a counter of some kind and flush the cache every Friday or something.




That is what the parms are for.
-f[:yyyy/mm/dd]

by default, they flush every 30 days.
Quote:

because groups by nature are ever changing



Ja, but not all groups have conditionals in the logon script. I would think the few changes that might affect one or two users could be managed manually rather than have every user suffer through longer logon times on every logon.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.065 seconds in which 0.027 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