#189408 - 2008-09-03 11:04 PM
InGroup function not working consistently
|
Georges_K
Getting the hang of it
Registered: 2005-02-17
Posts: 83
Loc: Chino, CA
|
Hello experts,
I'm dealing with a problem with the InGroup function that popped out of nowhere.
I have users that essentially belong to 2 groups: 103-AllStudents and 103-Grade 9 (10, 11, 12)
I have a simple
Select
Case InGroup("103-AllStudents") AND InGroup("103-Grade 9")
....
EndSelect
The problem is that my case statement fails consistently when checking for 103-Grade 9 ... and is successful consistently on 103-AllStudents. (it also fails on 103-Grade 10, 103-Grade 11, 103-Grade 12. Mind you, it only fails on some accounts, but not others.
I have even tried it a simple script with just the If InGroup statement, so that it's isolated, and ran it manually from the console, and got the same result.
I have tried it the same thing with KIX32.exe version 4.52.0.0 and 4.60.0.0 and I got the same result. I have checked the Logon Server @LSERVER and set l to make sure that I'm querying the user in AD that has all these group memberships. for some reason, whatever I do, I can't seem to get it to read that group.
This used to work... but now, and for whatever reason, it stopped working. any ideas??
Thanks in advance for your help!
Update: I'm starting to think that this may have something to do with the tokencache. When I do an If InGroup , and query the group that the user USED to be a member of, I get a positive result. I have tried to clear the tokencache (kix32 /f) . but that didn't make a difference. Am I on the right track? is there something else that I need to be looking at?
Update: If I do InGroup("103-Grade 10") the group is found, but if I do InGroup('"' + $SchoolCode + '-Grade ' + $grade + '"') where I verified that the value of$SchoolCode is 103 and the value of grade is 10 , it doesn't work.
So it seems that at this point it's no longer a token cache issue, but something related to the way the variables are resolving (perhaps something to do with the space... since the following is working: InGroup($SchoolCode + "-All-Students")
I thought that by writing the group in the quotes (as above) should resolve the space issue... am I missing something?
Edited by Georges_K (2008-09-03 11:53 PM)
_________________________
Network Specialist Chino Unified School District
|
Top
|
|
|
|
#189539 - 2008-09-08 06:01 PM
Re: InGroup function not working consistently
[Re: Georges_K]
|
KSDadGuy
Just in Town
Registered: 2008-09-02
Posts: 4
Loc: Kansas
|
Hello, my name is Jim Malay and I am pretty new to Kixtart and am having a problem in mapping drives. We only have five groups to test through and and the code I am using seems to find each group properly, but it does not map one of the drives. The drive not being mapped is T for Teachers. This is for the Staff groups (EW, AD & MS) Here is the if-then-else-if construct I am using. If I'm am just being stupid and not doing something correctly in my code, please let me know. Thanks in advance. Jim
; The H drive mapping is for home shares
; The Q drive mapping is for shared application
; The T drive is for a shared Teacher area
; The main mapping for a printer will be SPSLAB
; EW_Staff printer mapping will be SPSEWP
; MS_Staff printer mapping will be SPSMSP
; AD_Staff printer mapping will be SPSADP
; Alternate printer mapping will be SPSTLP
;
CLS
IF INGROUP("IT_DEPT")
SETDEFAULTPRINTER (\\SPSFP1\SPSLAB)
USE H: "\\SPSFP1\@USERID$$"
USE N: "\\SPSFP1\NTADMINS$$"
USE Q: "\\SPSFP1\APPS"
ELSE
IF INGROUP("MS_Staff")
SETDEFAULTPRINTER (\\SPSFP1\SPSMSP)
USE LPT1: "\\SPSFP1\SPSMSP"
USE H: "\\SPSFP1\@USERID$$"
USE Q: "\\SPSFP1\APPS"
USE T: "\\SPSFP1\TEACHERS$$"
ELSE
IF INGROUP("EW_Staff")
SETDEFAULTPRINTER (\\SPSFP1\SPSEWP)
USE LPT1: "\\SPSFP1\SPSMSP"
USE H: "\\SPSFP1\@USERID$$"
USE Q: "\\SPSFP1\APPS"
USE T: "\\SPSFP1\TEACHERS$$"
ELSE
IF INGROUP("AD_Staff")
USE LPT1: "\\SPSFP1\SPSLAB"
USE H: "\\SPSFP1\@USERID$$"
USE Q: "\\SPSFP1\APPS"
USE T: "\\SPSFP1\TEACHERS$$"
ELSE
SETDEFAULTPRINTER (\\SPSFP1\SPSLAB)
USE H: "\\SPSFP1\@USERID$$"
USE Q: "\\SPSFP1\APPS"
ENDIF
ENDIF
ENDIF
ENDIF
EXIT
Edited by Glenn Barnas (2008-09-08 09:09 PM) Edit Reason: Code Tags & formatting
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|