#138245 - 2005-04-20 10:52 AM
problem with ingroup
|
xkenx
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
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
|
|
Top
|
|
|
|
#138247 - 2005-04-20 03:22 PM
Re: problem with ingroup
|
maciep
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
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
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
|
|
Top
|
|
|
|
#138250 - 2005-04-22 09:17 AM
Re: problem with ingroup
|
xkenx
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
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
|
|
Top
|
|
|
|
#138253 - 2005-04-22 05:11 PM
Re: problem with ingroup
|
Kdyer
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
|
|
Top
|
|
|
|
#138256 - 2005-05-18 10:04 AM
Re: problem with ingroup
|
piotrb
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
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
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
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 978 anonymous users online.
|
|
|