Stealth
(Fresh Scripter)
2005-08-17 03:07 PM
If In Group Maximum Characters?

Does anyone know what the maximum number of characters are alowed in the group name for If in Group in kix ver 4.22.0.0

Richard H.Administrator
(KiX Supporter)
2005-08-17 03:40 PM
Re: If In Group Maximum Characters?

There is no (practical) maximum AFAIK - what's the issue?

Stealth
(Fresh Scripter)
2005-08-17 04:06 PM
Re: If In Group Maximum Characters?

It seems to work on the security goup name in W2K3 the group that works is 23 characters in length inclusive of spaces but not on the group name that is 29 charcters long inclusive of the spaces which makes me think there is a maximum length of name it will read is this not the case then
Thanks for your reply


Howard Bullock
(KiX Supporter)
2005-08-17 04:45 PM
Re: If In Group Maximum Characters?

In NT4 the group name was limited to 20 characters. I wonder if Ruud has some limitation based on this in his code.

Richard H.Administrator
(KiX Supporter)
2005-08-17 05:08 PM
Re: If In Group Maximum Characters?

Quote:

In NT4 the group name was limited to 20 characters. I wonder if Ruud has some limitation based on this in his code.




The working group is 23 letters though.

Anyone else out there with long group names care to test / respond?


Howard Bullock
(KiX Supporter)
2005-08-17 05:58 PM
Re: If In Group Maximum Characters?

The 20 characters was a UserManager GUI limitation. Script-wise thought I could set and use names longer than that in NT4. I think we need to ask Ruud this specific question. Who knows what exactly he coded.


I would suggest that a series of group be created by the person posting the issue. Each group name should be one character longer then the previous. Then test ingroup to see if it works for names from 23-29 to see where it fails.


Richard H.Administrator
(KiX Supporter)
2005-08-17 06:49 PM
Re: If In Group Maximum Characters?

Test script:
Code:
Break ON
$=SetOption("Explicit","ON")
$=SetOption("WrapAtEOL","ON")

Dim $iIndex, $sGroup

$iIndex=0 $sGroup=EnumGroup($iIndex)
While $sGroup
"["+Len($sGroup)+"] '"+$sGroup+"' = "+IIF(InGroup($sGroup)+@CRLF," OK","**FAILED**")+@CRLF
$iIndex=$iIndex+1 $sGroup=EnumGroup($iIndex)
Loop



Result:
Quote:

[19] 'HXXXXX\Domain Users' = OK
[8] 'Everyone' = OK
[24] 'SXX999999\Administrators' = OK
[15] 'SXX999999\Users' = OK
[11] 'INTERACTIVE' = OK
[19] 'Authenticated Users' = OK
[5] 'LOCAL' = OK
[27] 'HXXXXX\XX_HSCXXXXX Everyone' = OK
[29] 'HXXXXX\XX_HSCXXXXX Webmasters' = OK
[22] 'HXXXXX\XX_HSCXXXXX GIS' = OK
[5] 'Users' = OK




Howard Bullock
(KiX Supporter)
2005-08-17 08:49 PM
Re: If In Group Maximum Characters?

The domain and "\" should not be included in the length of the group name IMHO.

We should be talking about the explicit name of the group itself.


NTDOCAdministrator
(KiX Master)
2005-08-17 08:53 PM
Re: If In Group Maximum Characters?

Well as I recall I had issues doing InGroup for long group names on my AD in the past, but that was long time ago so not 100% positive. Didn't do too many group checks in the first place.

Unable to check at the moment, but will see if I can confirm later on. It may be due to the legacy support that AD uses for older clients and Ruud is using that.

Anyone with a running AD should be able to easily confirm this. Don't forget to flush cache for testing or use a group that already exists for a while that has a LONG name.


Richard H.Administrator
(KiX Supporter)
2005-08-17 09:21 PM
Re: If In Group Maximum Characters?

Quote:

The domain and "\" should not be included in the length of the group name IMHO.




Yup. I posted the script and results not as a proof per se but so that the helpful board members can run it and report results where they have long group names.

Still waiting...


maciep
(Korg Regular)
2005-08-17 09:26 PM
Re: If In Group Maximum Characters?

no problems here...this works just fine

Code:

$group = 'SMS Universal Enterprise Administrators'
if ingroup($group)
? 'yes'
else
? 'no'
endif



WinXP SP 2
Windows 2003 domain


NTDOCAdministrator
(KiX Master)
2005-08-17 09:28 PM
Re: If In Group Maximum Characters?

Cool, thanks for checking. Maybe I was trying to do some other coding that would not allow the greater than 20 character limit. I know I ran into it, but was a long time ago.

Richard H.Administrator
(KiX Supporter)
2005-08-17 10:02 PM
Re: If In Group Maximum Characters?

Quote:

no problems here...this works just fine

Code:

$group = 'SMS Universal Enterprise Administrators'
if ingroup($group)
? 'yes'
else
? 'no'
endif



WinXP SP 2
Windows 2003 domain




Thanks M.


maciep
(Korg Regular)
2005-08-17 10:05 PM
Re: If In Group Maximum Characters?

no problem, everyone

Stealth
(Fresh Scripter)
2005-08-18 04:24 PM
Re: If In Group Maximum Characters?

This is strange and you are correct as I tried some other long group names and it worked no problem seemed to be a problem with that one specific group now resolved thanks for your time guys appreciated
Thanks again