Page 1 of 1 1
Topic Options
#138245 - 2005-04-20 10:52 AM problem with ingroup
xkenx Offline
Fresh Scripter

Registered: 2005-04-20
Posts: 5
Loc: italy
I have a problem:
i have a group "company" with inside other group (no user inside), i use this function:
--------
if ingroup ("group(Company)")
use x: /d
use x: "\\server\share"
endif
--------
but not disk map, why?? any solution please??
Grazie 1000 Tanks 1000
sorry for my english


Edited by xkenx (2005-04-20 11:18 AM)

Top
#138246 - 2005-04-20 03:08 PM Re: problem with ingroup
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Is the group actually called "group(company)"? That seems strange. Maybe try ENUMGROUP to see what your group listing is?

Also, if there is "no user inside" the group, then how do you expect the INGROUP to work? If we think about how INGROUP works, it does a comparison, that is JDOE a member of "Accounting" for example, then it does the necessary action.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138247 - 2005-04-20 03:22 PM Re: problem with ingroup
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
Quote:


i have a group "company" with inside other group (no user inside), i use this function





Have you tried this?

Code:

if ingroup ("Company")
use x: /del
use x: "\\server\share"
endif



Kent, I think he's just saying he has a group within another group. But i'm not sure which group he wants to do the membership check against...

Top
#138248 - 2005-04-20 04:26 PM Re: problem with ingroup
xkenx Offline
Fresh Scripter

Registered: 2005-04-20
Posts: 5
Loc: italy
I better explain:
Have a group "company" you contain the groups of the users who are dependent, I have others groups not dependent users contain. For all the groups which users contain I do not have problems.
For the "company" group containing only other groups have the problem that not map the disk.
The groups containing other groups are not recognized with the ENUMGROUP function.
The INGROUP function seems not to recognize the groups contain only other groups.
If you want you can try. I used this scheme:

if ingroup ("company") ;This only contains groups and does not work
use L: /d
use L: "\\server\shares"
endif

if ingroup ("GroupUsers") ;This contains users and works
use M: /d
use M: "\\server\shares"
endif

Hope to have been clear and thanks 1000 for the support


Edited by xkenx (2005-04-20 04:33 PM)

Top
#138249 - 2005-04-20 04:48 PM Re: problem with ingroup
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
see your post at SL
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#138250 - 2005-04-22 09:17 AM Re: problem with ingroup
xkenx Offline
Fresh Scripter

Registered: 2005-04-20
Posts: 5
Loc: italy
Quote:

see your post at SL




yes i have a problem and I am seeking solution
please help me for the problem

Top
#138251 - 2005-04-22 02:51 PM Re: problem with ingroup
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
So...

What seems to be the problem?

Maybe add some code to debug your script?
Code:

if ingroup ("company") ;This only contains groups and does not work
?'We Made it'
SLEEP 3
use L: /d
use L: "\\server\shares"
endif



OK, more questions:
  • Is the Group Name the Pre-2000 name from Active Directory?
  • Have to ask, But is this a Security Group and not a Distribution Group?
  • Are there any special characters in the Group name?
  • What happens when you try to do an ENUMGROUP?
  • If ENUMGROUP does not show this group, have you tried to use IFMEMBER /v /l > yourname.txt to see if you have the group in question there? IFMEMBER is from the Resource Kit.


You may want to do some debugging too:
Code:

if @userid='youruserid'
debug on
endif
; -- Then you can go step-by-step from here
if ingroup ("company") ;This only contains groups and does not work
?'We Made it'
SLEEP 3
use L: /d
use L: "\\server\shares"
endif



INGROUP should be pretty cut-and-dry or yes-or-no.

Please let us know what you find.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138252 - 2005-04-22 03:09 PM Re: problem with ingroup
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I see you posted it at SL as a beta bug. Are you running the 4.5x beta? Somehow I doubt it is a bug but rather a problem with your infrastructure. Have you tried deleting the group cache from the registry?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138253 - 2005-04-22 05:11 PM Re: problem with ingroup
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Or what Les is referring to is flushing the token cache using the following:

Kix32 yourscript.kix /f

You may want to check the docs on this or do a kix32 /? to see the available switches.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138254 - 2005-04-22 05:45 PM Re: problem with ingroup
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
No, not really... not exactly the same. In some cases it is better to delete the reg key.
HKEY_CURRENT_USER\Software\KiXtart\TokenCache
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138255 - 2005-04-22 06:58 PM Re: problem with ingroup
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
No Kix32 yourscript.kix /f is not the same as deleting the REG key, HOWEVER if the /f alone does not correct the issue then perhaps we should bring this up with Ruud as a feature that requires further enhancement.

I have not personally run into an issue that the /F did not correct, but there are so many different configurations out there that one never knows I suppose.

Top
#138256 - 2005-05-18 10:04 AM Re: problem with ingroup
piotrb Offline
Fresh Scripter

Registered: 2005-05-18
Posts: 11
Loc: Poland
Probably Your script not work because this group have no user inside. Try to add current user to group and try again.
Piotr

Top
#138257 - 2005-05-18 10:32 AM Re: problem with ingroup
xkenx Offline
Fresh Scripter

Registered: 2005-04-20
Posts: 5
Loc: italy
Quote:

Probably Your script not work because this group have no user inside. Try to add current user to group and try again.
Piotr




Yes, if add a user inside the group company it works, but the business needs of a group contain other groups. :-((

Top
#138258 - 2005-05-18 12:02 PM Re: problem with ingroup
piotrb Offline
Fresh Scripter

Registered: 2005-05-18
Posts: 11
Loc: Poland
OK.
Maybe You use local groups or local/global together?

Top
#138259 - 2005-07-27 03:34 PM Re: problem with ingroup
xkenx Offline
Fresh Scripter

Registered: 2005-04-20
Posts: 5
Loc: italy
Quote:

OK.
Maybe You use local groups or local/global together?




i use domain group

Top
#138260 - 2005-07-27 04:25 PM Re: problem with ingroup
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
haven't herd of such.
_________________________
!

download KiXnet

Top
#138261 - 2005-07-27 04:37 PM Re: problem with ingroup
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... as long as xkenx hides the true code and gives us garbage like:
if ingroup ("group(Company)")

and sketchy details about the types of groups used, and does not answer most of the questions, I doubt this will get resolved.

I don't see any mention of KiX version or client version or if this is NT4 domain or AD.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138262 - 2005-07-27 04:56 PM Re: problem with ingroup
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the question is, does he know himself either.
_________________________
!

download KiXnet

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 895 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.036 seconds in which 0.013 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