#117905 - 2004-04-14 11:11 PM
Character limit on group names?
|
jdogg
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
|
|
|
|
#117909 - 2004-04-15 01:46 AM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
#117911 - 2004-04-15 02:48 AM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
#117913 - 2004-04-15 03:11 AM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
#117916 - 2004-04-15 03:39 AM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
#117919 - 2004-04-15 04:42 PM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
#117921 - 2004-04-15 06:32 PM
Re: Character limit on group names?
|
jdogg
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1003 anonymous users online.
|
|
|