#27931 - 2002-08-28 02:15 PM
IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Hi there,
I have a problem with Kix 2001 v4.1 and the INGROUP function. This is the situation:
I have a Windows 2000 mixed mode domain where users who are member of a domain local group need some configuration settings set. The users are not directly member of the domain local group, but members of global groups that reside in the domain local group. My script code:
code:
IF INGROUP ("DLOC_WMB_APP_mpm") = 1 IF EXIST ("H:\MPM\") = 0 MD H:\MPM ELSEIF IF EXIST ("H:\OFFICE\SJABLONEN\NCCWWRD97.INI") = 0 COPY "F:\MPM\NCCWWRD97.INI" "H:\OFFICE\SJABLONEN\NCCWWRD97.INI" ENDIF ENDIF
Kix doesn't recognize the user beeing member of the domain local group, because the user is member of one of many global groups that are member of the domain local group.
Could someone assist me in this issue?
TIA,
Arno
|
|
Top
|
|
|
|
#27935 - 2002-08-28 03:30 PM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
quote: You might need to define the domain in your group check
Will try that quote: There is also a 20-character limit on group anmes under Windows NT
Also with Windows 2000 AD
|
|
Top
|
|
|
|
#27936 - 2002-08-29 10:48 AM
Re: IF INGROUP and nested groups
|
Anonymous
Anonymous
Unregistered
|
Hi
Not sure this will help you too much, but the below is what I needed to do to figure out the way the revamped Ingroup works under 4.1x
code:
CLS BREAK ON
FUNCTION checkingroup ($grouplist) cls
AT(2,2) "Groups evaluated: "
FOR EACH $group IN $grouplist "'" + $group + "' " NEXT
at(5,2) $note ?
if INGROUP($grouplist,0) = 1 ? "In at least one of the groups" endif
if INGROUP($grouplist,0) = 0 ? "Not in any of the groups checked" endif
if INGROUP($grouplist,1) = 1 ? "in all groups checked" endif
if INGROUP($grouplist,1) = 0 ? "not in all groups checked" endif
? ? "Press any key to continue" get $x ENDFUNCTION
$grouplist = "domain admins","everyone" ; 2 groups I AM a member of $note = "Expected response: 'in at least one' and 'in all'" checkingroup($grouplist)
$grouplist = "domain admins2","everyone" ; I'm not in 'domain admins2' $note = "Expect response 'in at least one' and 'NOT in all'" checkingroup($grouplist)
$grouplist = "cricket fans","soccer fans" ; I'm not in either :-) $note = "Expect response 'not in any' and 'NOT in all'" checkingroup($grouplist)
:end
Hope it helps!
Regards Doug
|
|
Top
|
|
|
|
#27937 - 2002-08-30 10:25 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Adding the "domain\" before the group name didn't work. If I run the script in debugmode I can see thatcode:
IF INGROUP ("WONEN\DLOC_WMB_APP_mpm") = 1
is executed, and at that moment the parsing of the script terminates without an error. Lines of script after this IF INGROUP will therefor not run.
Anyone a suggestion ![[Confused]](images/icons/confused.gif) [ 30. August 2002, 10:40: Message edited by: Arno ]
|
|
Top
|
|
|
|
#27939 - 2002-08-30 11:27 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Patrick,
I've created a text.kix with your code in it and this is the result:
code:
C:\>\\10.118.15.210\netlogon\Update\Files\kix32.exe \\10.118.15.210\netlogon\KIX TART\test.kix
- 1-0The operation completed successfully.? If InGroup (Script error : unknown command ! ?"- 1-" @error @serror"? If InGroup ("WONEN\DLOC_WMB_APP_mpm") = 1
C:\>
And that "else" shoud be "endif". I've noticed that I copy/pasted the code with that in it when i posted my question. The script on my server is with "endif" though. [ 30. August 2002, 11:34: Message edited by: Arno ]
|
|
Top
|
|
|
|
#27941 - 2002-09-02 02:41 PM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Tnkx Patrick,
I'll test it tomorrow ![[Wink]](images/icons/wink.gif) [ 02. September 2002, 14:42: Message edited by: Arno ]
|
|
Top
|
|
|
|
#27942 - 2002-09-05 09:24 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Sorry for the late reply, but i've had internet connectivity problems.
This is the result:
code:
C:\>\\10.118.15.210\netlogon\Update\Files\kix32.exe \\10.118.15.210\netlogon\KIX TART\test.kix
- 0--1
C:\>
Does that help ![[Confused]](images/icons/confused.gif) [ 05. September 2002, 09:31: Message edited by: Arno ]
|
|
Top
|
|
|
|
#27944 - 2002-09-05 09:33 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
Patrick,
I'd forgotten to remove the /d in the copy/paste. The result of the error was when Kix32 was ran without /d
My version is 4.0.2
|
|
Top
|
|
|
|
#27946 - 2002-09-05 10:00 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
You're fast with replies
The updated result:
code:
C:\>\\10.118.15.210\netlogon\Update\Files\kix32.exe \\10.118.15.210\netlogon\KIXTART\test.kix
- 0 - err = 0 - 4.02 - 1 - err = 0 - - 2 - err = 0 - - 5 - err = 0 - - 8 - err = 0 - Done C:\>
|
|
Top
|
|
|
|
#27948 - 2002-09-05 10:08 AM
Re: IF INGROUP and nested groups
|
Arno
Fresh Scripter
Registered: 2002-08-28
Posts: 9
Loc: The Netherlands
|
I deleted the H:\MPM folder and the ini file. Then I ran the test.kix again and both the folder and ini file where put back. It does seem that it works now.
Now to find out why it didn't before.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 641 anonymous users online.
|
|
|