|
View Full Version : Net user command to add group to local admin
martie 02-26-2004, 04:42 AM Hi everybody,
Im trying to create a batch file which will add a
Group into my computers "Administrators" local group.
The group is called "Domain Techs" & each belong to 3
different Domains which can access each other with no
problem.
I have gone through technet
article "http://support.microsoft.com/?kbid=251394"
however im not having much luck.
In the past I've being able to write a batch file which
created a local account & added that account into
the "administrators" local account but Im not having much
luck with this excercie......any help would be highly
appreciated.
thankyou in advance.
DavieC 02-26-2004, 09:11 AM What is error message/number do you receive?
DavieC
"martie" <anonymous@discussions.microsoft.com> wrote in message
news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
> Hi everybody,
>
> Im trying to create a batch file which will add a
> Group into my computers "Administrators" local group.
>
> The group is called "Domain Techs" & each belong to 3
> different Domains which can access each other with no
> problem.
>
> I have gone through technet
> article "http://support.microsoft.com/?kbid=251394"
> however im not having much luck.
>
>
> In the past I've being able to write a batch file which
> created a local account & added that account into
> the "administrators" local account but Im not having much
> luck with this excercie......any help would be highly
> appreciated.
>
> thankyou in advance.
>
DavieC 02-26-2004, 09:11 AM What is error message/number do you receive?
DavieC
"martie" <anonymous@discussions.microsoft.com> wrote in message
news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
> Hi everybody,
>
> Im trying to create a batch file which will add a
> Group into my computers "Administrators" local group.
>
> The group is called "Domain Techs" & each belong to 3
> different Domains which can access each other with no
> problem.
>
> I have gone through technet
> article "http://support.microsoft.com/?kbid=251394"
> however im not having much luck.
>
>
> In the past I've being able to write a batch file which
> created a local account & added that account into
> the "administrators" local account but Im not having much
> luck with this excercie......any help would be highly
> appreciated.
>
> thankyou in advance.
>
martie. 02-26-2004, 09:59 AM Hi Davie,
Ok well I've made some progress, basically i figured
that the command will be as follows
net localgroup "administrators" domain\groupname.
So on a workstation called "xp1" which is part of the
domain called "LabdomainA" i was able to add a group i
created in that domain called "TEST" into
the "Administrators" local built in group of "xp1" via the
net localgroup as,
net localgroup "administrators" LabdomainA\Test /add
& it worked ..the group called "Test" which was created in
the "LabDomainA" is now added into the
Local "administrators" group of workstation
called "XP1" ..sorry if i sound like im repeating myself..
the probleme im having is when i try to add the "Domain
Techs" group from the same domain i get the following error
"There is no such global user or group: LabdomainA\domain
There is no such global user or group: Techs
More help is available by typing Net Helpmsg3783"
however it's not providing me with the adequate info to
get it working ?
any idea were i may be going wrong ?
thank for your reply.
>-----Original Message-----
>What is error message/number do you receive?
>
>DavieC
>
>
>"martie" <anonymous@discussions.microsoft.com> wrote in
message
>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>> Hi everybody,
>>
>> Im trying to create a batch file which will add a
>> Group into my computers "Administrators" local group.
>>
>> The group is called "Domain Techs" & each belong to 3
>> different Domains which can access each other with no
>> problem.
>>
>> I have gone through technet
>> article "http://support.microsoft.com/?kbid=251394"
>> however im not having much luck.
>>
>>
>> In the past I've being able to write a batch file which
>> created a local account & added that account into
>> the "administrators" local account but Im not having
much
>> luck with this excercie......any help would be highly
>> appreciated.
>>
>> thankyou in advance.
>>
>
>
>.
>
martie. 02-26-2004, 09:59 AM Hi Davie,
Ok well I've made some progress, basically i figured
that the command will be as follows
net localgroup "administrators" domain\groupname.
So on a workstation called "xp1" which is part of the
domain called "LabdomainA" i was able to add a group i
created in that domain called "TEST" into
the "Administrators" local built in group of "xp1" via the
net localgroup as,
net localgroup "administrators" LabdomainA\Test /add
& it worked ..the group called "Test" which was created in
the "LabDomainA" is now added into the
Local "administrators" group of workstation
called "XP1" ..sorry if i sound like im repeating myself..
the probleme im having is when i try to add the "Domain
Techs" group from the same domain i get the following error
"There is no such global user or group: LabdomainA\domain
There is no such global user or group: Techs
More help is available by typing Net Helpmsg3783"
however it's not providing me with the adequate info to
get it working ?
any idea were i may be going wrong ?
thank for your reply.
>-----Original Message-----
>What is error message/number do you receive?
>
>DavieC
>
>
>"martie" <anonymous@discussions.microsoft.com> wrote in
message
>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>> Hi everybody,
>>
>> Im trying to create a batch file which will add a
>> Group into my computers "Administrators" local group.
>>
>> The group is called "Domain Techs" & each belong to 3
>> different Domains which can access each other with no
>> problem.
>>
>> I have gone through technet
>> article "http://support.microsoft.com/?kbid=251394"
>> however im not having much luck.
>>
>>
>> In the past I've being able to write a batch file which
>> created a local account & added that account into
>> the "administrators" local account but Im not having
much
>> luck with this excercie......any help would be highly
>> appreciated.
>>
>> thankyou in advance.
>>
>
>
>.
>
martie 02-26-2004, 10:07 AM Can you believe 1 minute after i finished replying to you
i found my answer "I hope" - basicall i used the following
net localgroup administrators "LabdomainA\Domain
Techs" /add
& it worked...so all along i just had to place
the "labdomainA\domain techs" in inverted comas & the
command worked...
sorry to have wasted any of your time....btw the url were
i found the solution was
http://cwashington.netreach.net/depo/view.asp?
Index=361&ScriptType=command
Im going to test it out @ work as i've tested it out in a
Vmware lab enviroment
I'll let you know how it goes
regards,
Martie.
>-----Original Message-----
>What is error message/number do you receive?
>
>DavieC
>
>
>"martie" <anonymous@discussions.microsoft.com> wrote in
message
>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>> Hi everybody,
>>
>> Im trying to create a batch file which will add a
>> Group into my computers "Administrators" local group.
>>
>> The group is called "Domain Techs" & each belong to 3
>> different Domains which can access each other with no
>> problem.
>>
>> I have gone through technet
>> article "http://support.microsoft.com/?kbid=251394"
>> however im not having much luck.
>>
>>
>> In the past I've being able to write a batch file which
>> created a local account & added that account into
>> the "administrators" local account but Im not having
much
>> luck with this excercie......any help would be highly
>> appreciated.
>>
>> thankyou in advance.
>>
>
>
>.
>
martie 02-26-2004, 10:07 AM Can you believe 1 minute after i finished replying to you
i found my answer "I hope" - basicall i used the following
net localgroup administrators "LabdomainA\Domain
Techs" /add
& it worked...so all along i just had to place
the "labdomainA\domain techs" in inverted comas & the
command worked...
sorry to have wasted any of your time....btw the url were
i found the solution was
http://cwashington.netreach.net/depo/view.asp?
Index=361&ScriptType=command
Im going to test it out @ work as i've tested it out in a
Vmware lab enviroment
I'll let you know how it goes
regards,
Martie.
>-----Original Message-----
>What is error message/number do you receive?
>
>DavieC
>
>
>"martie" <anonymous@discussions.microsoft.com> wrote in
message
>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>> Hi everybody,
>>
>> Im trying to create a batch file which will add a
>> Group into my computers "Administrators" local group.
>>
>> The group is called "Domain Techs" & each belong to 3
>> different Domains which can access each other with no
>> problem.
>>
>> I have gone through technet
>> article "http://support.microsoft.com/?kbid=251394"
>> however im not having much luck.
>>
>>
>> In the past I've being able to write a batch file which
>> created a local account & added that account into
>> the "administrators" local account but Im not having
much
>> luck with this excercie......any help would be highly
>> appreciated.
>>
>> thankyou in advance.
>>
>
>
>.
>
Jerold Schulman 02-26-2004, 11:26 AM Anytime a space exists in a name, it must be enclosed in quote marks.
You can also use quote marks all the time, so a batch with unknown group names
always works.
On Thu, 26 Feb 2004 02:07:01 -0800, "martie"
<anonymous@discussions.microsoft.com> wrote:
>Can you believe 1 minute after i finished replying to you
>i found my answer "I hope" - basicall i used the following
>
>net localgroup administrators "LabdomainA\Domain
>Techs" /add
>
>& it worked...so all along i just had to place
>the "labdomainA\domain techs" in inverted comas & the
>command worked...
>
>sorry to have wasted any of your time....btw the url were
>i found the solution was
>
>http://cwashington.netreach.net/depo/view.asp?
>Index=361&ScriptType=command
>
>Im going to test it out @ work as i've tested it out in a
>Vmware lab enviroment
>I'll let you know how it goes
>
>regards,
>
>Martie.
>>-----Original Message-----
>>What is error message/number do you receive?
>>
>>DavieC
>>
>>
>>"martie" <anonymous@discussions.microsoft.com> wrote in
>message
>>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>>> Hi everybody,
>>>
>>> Im trying to create a batch file which will add a
>>> Group into my computers "Administrators" local group.
>>>
>>> The group is called "Domain Techs" & each belong to 3
>>> different Domains which can access each other with no
>>> problem.
>>>
>>> I have gone through technet
>>> article "http://support.microsoft.com/?kbid=251394"
>>> however im not having much luck.
>>>
>>>
>>> In the past I've being able to write a batch file which
>>> created a local account & added that account into
>>> the "administrators" local account but Im not having
>much
>>> luck with this excercie......any help would be highly
>>> appreciated.
>>>
>>> thankyou in advance.
>>>
>>
>>
>>.
>>
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
Jerold Schulman 02-26-2004, 11:26 AM Anytime a space exists in a name, it must be enclosed in quote marks.
You can also use quote marks all the time, so a batch with unknown group names
always works.
On Thu, 26 Feb 2004 02:07:01 -0800, "martie"
<anonymous@discussions.microsoft.com> wrote:
>Can you believe 1 minute after i finished replying to you
>i found my answer "I hope" - basicall i used the following
>
>net localgroup administrators "LabdomainA\Domain
>Techs" /add
>
>& it worked...so all along i just had to place
>the "labdomainA\domain techs" in inverted comas & the
>command worked...
>
>sorry to have wasted any of your time....btw the url were
>i found the solution was
>
>http://cwashington.netreach.net/depo/view.asp?
>Index=361&ScriptType=command
>
>Im going to test it out @ work as i've tested it out in a
>Vmware lab enviroment
>I'll let you know how it goes
>
>regards,
>
>Martie.
>>-----Original Message-----
>>What is error message/number do you receive?
>>
>>DavieC
>>
>>
>>"martie" <anonymous@discussions.microsoft.com> wrote in
>message
>>news:1cee01c3fc22$e662fb40$a001280a@phx.gbl...
>>> Hi everybody,
>>>
>>> Im trying to create a batch file which will add a
>>> Group into my computers "Administrators" local group.
>>>
>>> The group is called "Domain Techs" & each belong to 3
>>> different Domains which can access each other with no
>>> problem.
>>>
>>> I have gone through technet
>>> article "http://support.microsoft.com/?kbid=251394"
>>> however im not having much luck.
>>>
>>>
>>> In the past I've being able to write a batch file which
>>> created a local account & added that account into
>>> the "administrators" local account but Im not having
>much
>>> luck with this excercie......any help would be highly
>>> appreciated.
>>>
>>> thankyou in advance.
>>>
>>
>>
>>.
>>
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
|
|
|