#126259 - 2004-09-08 11:07 AM
Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
Hi,
I'm using kixtart ver. 4.22 on W2K server and XP SP1/W2K Pro SP4. My problem is that Ingroup does not work on new domain groups. I have tried deleting the Tokencache entry in the registry on the client but it does not help.
My script looks like this:
IF INGROUP("KIXTEST") ? "test" sleep 3 ENDIF
Nothing happens even though the user is in the group Kixtest and the AD servers have had time to replicate. If I change the script to:
IF INGROUP("IT") ? "test" sleep 3 ENDIF
Where the user has been member of the IT group for a long time it is working.
In the Tokencache entry the DOMAIN\KIXTEST never appears.
Any suggestions?
Regards
Brian
|
|
Top
|
|
|
|
#126261 - 2004-09-08 11:42 AM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
I have tried that to - as I see it it is the same as deleting the Tokencache key directly from the registry from the client which also doesn't work.
|
|
Top
|
|
|
|
#126263 - 2004-09-08 11:56 AM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
Yes - when I run the command on one of my domain controllers I get the following output:
H:\>net group kixtest Group name kixtest Comment
Members
------------------------------------- bheilmann The command completed successfully.
Also if I run the net group without any parameters all the groups are listet also other groups that doesn't work with the ingroup command.
|
|
Top
|
|
|
|
#126265 - 2004-09-08 12:09 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
OK - I have run the command from a workstation instead (in fact all our workstations fails):
H:\>net group kixtest /domain Anmodningen behandles af en domænecontroller for domænet xxxxxx.dk.
Gruppenavn kixtest Kommentar
Medlemmer
---------------------------------------------------------------------- bheilmann Kommandoen blev udført.
|
|
Top
|
|
|
|
#126268 - 2004-09-08 01:32 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
I have made a add-on to the script:
@domain @lserver
sleep 3
IF INGROUP("kixtest") @error ? "test" sleep 3 ENDIF
The script shows the correct domain and domaincontroller but the @error doesn't give any message. I guess kixtart doesn't think that the user is member of the group kixtest.
|
|
Top
|
|
|
|
#126269 - 2004-09-08 01:44 PM
Re: Ingroup does not work on newly created groups
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Maybe try including the domain: Code:
If InGroup("MYDOMAIN\mygroup")...
|
|
Top
|
|
|
|
#126270 - 2004-09-08 01:48 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
Hi,
already tried that - doesn't work :-(
Thanx anyway.
|
|
Top
|
|
|
|
#126271 - 2004-09-08 01:49 PM
Re: Ingroup does not work on newly created groups
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
You could also try this as a sanity check to confirm group memberships: Code:
Break ON $=SetOption("Explicit","ON") $=SetOption("WrapAtEOL","ON") Dim $iIndex, $sGroup $iIndex=0 $sGroup=EnumGroup($iIndex) While Not @ERROR AND $sGroup "Member of group '"+$sGroup+"'"+@CRLF $iIndex=$iIndex+1 $sGroup=EnumGroup($iIndex) Loop
|
|
Top
|
|
|
|
#126274 - 2004-09-08 02:37 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
I have tried your code instead Jooel - and the result is:
Domain \\Domainserver ingroup kixtest: 0 error: 0 press any key to die.
Nothing in eventlog on the workstation nor on the Domainserver.
|
|
Top
|
|
|
|
#126275 - 2004-09-08 02:41 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
Your script Richard is showing the groups I am member of but according to the output I am not member of the group KIXTEST but when I run the NET GROUP KIXTEST /DOMAIN the output is that I am member of the group.
|
|
Top
|
|
|
|
#126276 - 2004-09-08 04:02 PM
Re: Ingroup does not work on newly created groups
|
Brian
Fresh Scripter
Registered: 2004-09-08
Posts: 14
Loc: Kolding, Denmark
|
Now I have tried to remove my user from a group called IT and then run Richards script - according to kixtart my user is still member of the group IT but according to NET GROUP my user is NOT member of the group. Why is kixtart reading the group memberships wrong?
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 978 anonymous users online.
|
|
|