Page 1 of 1 1
Topic Options
#145835 - 2005-08-17 03:07 PM If In Group Maximum Characters?
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
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
Top
#145836 - 2005-08-17 03:40 PM Re: If In Group Maximum Characters?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
There is no (practical) maximum AFAIK - what's the issue?
Top
#145837 - 2005-08-17 04:06 PM Re: If In Group Maximum Characters?
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
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

Top
#145838 - 2005-08-17 04:45 PM Re: If In Group Maximum Characters?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
In NT4 the group name was limited to 20 characters. I wonder if Ruud has some limitation based on this in his code.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#145839 - 2005-08-17 05:08 PM Re: If In Group Maximum Characters?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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?

Top
#145840 - 2005-08-17 05:58 PM Re: If In Group Maximum Characters?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#145841 - 2005-08-17 06:49 PM Re: If In Group Maximum Characters?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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



Top
#145842 - 2005-08-17 08:49 PM Re: If In Group Maximum Characters?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#145843 - 2005-08-17 08:53 PM Re: If In Group Maximum Characters?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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.

Top
#145844 - 2005-08-17 09:21 PM Re: If In Group Maximum Characters?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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...

Top
#145845 - 2005-08-17 09:26 PM Re: If In Group Maximum Characters?
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
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

Top
#145846 - 2005-08-17 09:28 PM Re: If In Group Maximum Characters?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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.
Top
#145847 - 2005-08-17 10:02 PM Re: If In Group Maximum Characters?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
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.

Top
#145848 - 2005-08-17 10:05 PM Re: If In Group Maximum Characters?
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
no problem, everyone
Top
#145849 - 2005-08-18 04:24 PM Re: If In Group Maximum Characters?
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
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

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 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.12 seconds in which 0.082 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