Page 1 of 1 1
Topic Options
#117905 - 2004-04-14 11:11 PM Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Hey guys,
Below is an excerpt from my kixtart code, version 4.21.
I am trying to add a group to my landesk local group called "Crop_Business_Remote_Admins". The group won't add, but I can add a shorter one. Is there a limit to the # of characters, and if so, is there a way to get around it? Thanks!!
Code:
         If $Client = "Windows 2000 Workstation" OR $Client = "Windows XP Workstation"
$G2="rtp\Crop_Business_Remote_Admins"
$G1='runas /u:rtp\rtp_domain_service "net localgroup \"remote control operators\" $G2 /add" | sanur /i logon.txt'
Use Z: "$LOGONSRVR\NETLOGON\SANUR"
Go Z:
Shell "%COMSPEC% /C $G1"
Use Z: /DELETE
EndIf


Top
#117906 - 2004-04-14 11:28 PM Re: Character limit on group names?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the FAQ Forum under "Limits in NetBIOS, computer/printer names, share names/comments"
_________________________
There are two types of vessels, submarines and targets.

Top
#117907 - 2004-04-14 11:40 PM Re: Character limit on group names?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Should probably be able to do it with ADSI
Top
#117908 - 2004-04-14 11:54 PM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This is not a KiX limit so does not belong in this forum.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117909 - 2004-04-15 01:46 AM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Hmm... I don't know what ADSI is.
Sorry this is in the wrong forum. I just know you guys know the answer and figured it would be really quick for you. I don't know of a forum on "net localgroup" usage or the like.
I will read the FAQ... although it will probably be over my head as usual.

Top
#117910 - 2004-04-15 01:59 AM Re: Character limit on group names?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It would fit better into the 'General' forum as the 'Starters' forum is for beginners' questions about KiXtart itself. Your issue, however, is a limitation of certain Microsoft operating systems and thus not a Kixtart issue.
_________________________
There are two types of vessels, submarines and targets.

Top
#117911 - 2004-04-15 02:48 AM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Jens,
Thanks for the quick reply.
May I rephrase the question?

Given the 20 character group name limitation, is there a way I can better structure this script section so as to do what the script attempts without changing the group name? (the group is used by users who would all have to change their procedures).

Thanks again.

Top
#117912 - 2004-04-15 03:00 AM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Since you cannot spell ADSI, I'd say that option is out unless someone hands you code on a silver platter. Have you tried cusrmgr.exe instead?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117913 - 2004-04-15 03:11 AM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Wow man, pour on the charm why don't ya?
I spelled ADSI just like it was spelled earlier.
No I have not tried cusrmgr.exe.
Thanks for your suggestion.


Edited by jdogg (2004-04-15 05:52 PM)

Top
#117914 - 2004-04-15 03:13 AM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You may find that most of the board regulars (myself included) have a serious hate on for SU and RUNAS style permission elevation in a logon script, so it may limit the responses or even elicit negative responses.

I use cusrmgr in a central admin script to add global groups to local groups.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117915 - 2004-04-15 03:27 AM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Wow man, pour on the charm why don't ya?




LOL
Don't get your knickers in a twist. When someone does not know what an acronym stands for (the acronym ADSI is pronounced as it is spelled... AY-DEE-ES-EYE) it is often jokingly said that they cannot "spell" it. SHEESH!

BTW, it stands for Active Directory Services Interface. If you look in our UDF library, you will find several ADSI methods of adding to groups.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117916 - 2004-04-15 03:39 AM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Ah... I have never heard that expression.
May be a Canadian thing? Oh well, I guess it went as over my head as a lot of things do on this forum.

ADSI requires that I have Active Directory, right?
(which I do not)
Thanks...

Top
#117917 - 2004-04-15 03:44 AM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

ADSI requires that I have Active Directory, right?




Actually... no, a subset of it, the WinNT:// provider works on NT4. It does however require the DS Client on downlevel OS.

Not sure I understand why you cannot simply shorten the group name.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117918 - 2004-04-15 03:47 AM Re: Character limit on group names?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I usually pronounce it "ADD-SEE" ... and WMI is "WIMMY" .... eh
Top
#117919 - 2004-04-15 04:42 PM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
I am now trying to use cusrmgr with sanur and runas.
I think I am running into problems with the quotes again. Is there a way to tell the shell statement or a run statement to STAY running as a service account for an entire if statement? I am really tired of doing the ' " \" \" " ' thing on quotes.
Code:
  	; Add Remote Control groups to the Remote Control Operators group of all WIN2K or WINXP computers.
If $Client = "Windows 2000 Workstation" OR $Client = "Windows XP Workstation"
$G1='runas /u:rtp\rtp_domain_service "cusrmgr.exe -alg \"remote control operators\" Add user -u rtp\Crop_Business_Remote_Admins" | sanur /i logon.txt'
Use Z: "$LOGONSRVR\NETLOGON\SANUR"
Go Z:
Shell "%COMSPEC /C $G1"
Use Z: /DELETE
EndIf


Top
#117920 - 2004-04-15 05:07 PM Re: Character limit on group names?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Since I don't do RUNAS, I can only guess at this...

I notice you precede a quote with a backslash (\")... should you not do that for all of them?

Is the problem getting SHELL to wait for completion?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117921 - 2004-04-15 06:32 PM Re: Character limit on group names?
jdogg Offline
Getting the hang of it

Registered: 2003-09-11
Posts: 91
Loc: RTP, North Cakalaka, USA
Les,
Thanks for your frequent attention.
I tried \" for all of them, but that does not work.
When using THREE sets of quotes in a batch file, I have found that the most outer set of quotes is the single quote:
' '
The second most inward set is the double quote:
" "
The third (I can't get four to work) is the slash-quote:
\" \"

Anyway, I gave up on cusrmgr and decided to just bear the criticism and change the group name. I suppose I could have done it earlier, but I am really stubborn and hate to submit to a script that refuses to do what I want.

So now the working script is as follows:
Code:
                  If InGroup ("XXX_RTP_SalesAndMarketing")

$ADDREMOTE1='runas /u:rtp\rtp_domain_service "net localgroup \"Remote Control Operators\" rtp\CropBizRemoteAdmins /add" |sanur /i logon.txt'
Use Z: "$LOGONSRVR\NETLOGON\SANUR"
Go Z:
Shell "%COMSPEC% /C $ADDREMOTE1"
Use Z: /DELETE
EndIf


Thanks again for the help/suggestions.
Best Regards,
-Jeremy

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 1003 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.068 seconds in which 0.025 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