469,609 Members | 1,687 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to Add Domain user to local groups

Hi,

I have a webform, with 2 textboxs and a submit button. In the text box1, i
enter a username and in textbox2 I enter the computer name. Both the username
and computer name is in active directory.

When i click submit, I want to add the username from textbox1 into the local
administrators group on the computer name from textbox2.

I want to do this in asp.net using vb.net as the programming language.

can someone please give me some code examples on how i should do this?

Dec 28 '05 #1
5 3592
Do you mean you want a user to go to a web page (sitting on a server) and
access the local groups on the client machine? That creates a security issue
and you would be better served launching a ClickOnce type of app to do that
work rather than attempting to munge up the system.

Or, do you mean add a user to a local group on the server the web app is on.
If so, turn off anonymous access for this page and use Windows
Authentication. The person adding via the web app must have the right to add
local users.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Rocky" wrote:
Hi,

I have a webform, with 2 textboxs and a submit button. In the text box1, i
enter a username and in textbox2 I enter the computer name. Both the username
and computer name is in active directory.

When i click submit, I want to add the username from textbox1 into the local
administrators group on the computer name from textbox2.

I want to do this in asp.net using vb.net as the programming language.

can someone please give me some code examples on how i should do this?

Dec 28 '05 #2
Currently, I have to logon to the web page via my admin domain account. I
want to add a user that has an account on the domain, to a computers local
group. This computer is also in the domain. I don't want to add the user to
the domain groups but to the local groups of the computer.

"Cowboy (Gregory A. Beamer) - MVP" wrote:
Do you mean you want a user to go to a web page (sitting on a server) and
access the local groups on the client machine? That creates a security issue
and you would be better served launching a ClickOnce type of app to do that
work rather than attempting to munge up the system.

Or, do you mean add a user to a local group on the server the web app is on.
If so, turn off anonymous access for this page and use Windows
Authentication. The person adding via the web app must have the right to add
local users.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Rocky" wrote:
Hi,

I have a webform, with 2 textboxs and a submit button. In the text box1, i
enter a username and in textbox2 I enter the computer name. Both the username
and computer name is in active directory.

When i click submit, I want to add the username from textbox1 into the local
administrators group on the computer name from textbox2.

I want to do this in asp.net using vb.net as the programming language.

can someone please give me some code examples on how i should do this?

Dec 29 '05 #3
I've posted a reply to your last question.

Have a look if you want. It's in VBScript.

"Rocky" <Ro***@discussions.microsoft.com> 级糶秎ン穝籇:89********************************* *@microsoft.com...
Currently, I have to logon to the web page via my admin domain account. I
want to add a user that has an account on the domain, to a computers local
group. This computer is also in the domain. I don't want to add the user
to
the domain groups but to the local groups of the computer.

"Cowboy (Gregory A. Beamer) - MVP" wrote:
Do you mean you want a user to go to a web page (sitting on a server) and
access the local groups on the client machine? That creates a security
issue
and you would be better served launching a ClickOnce type of app to do
that
work rather than attempting to munge up the system.

Or, do you mean add a user to a local group on the server the web app is
on.
If so, turn off anonymous access for this page and use Windows
Authentication. The person adding via the web app must have the right to
add
local users.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Rocky" wrote:
> Hi,
>
> I have a webform, with 2 textboxs and a submit button. In the text
> box1, i
> enter a username and in textbox2 I enter the computer name. Both the
> username
> and computer name is in active directory.
>
> When i click submit, I want to add the username from textbox1 into the
> local
> administrators group on the computer name from textbox2.
>
> I want to do this in asp.net using vb.net as the programming language.
>
> can someone please give me some code examples on how i should do this?
>

Dec 29 '05 #4
VBScript is not the same as asp.net/vb.net

"Lau Lei Cheong" wrote:
I've posted a reply to your last question.

Have a look if you want. It's in VBScript.

"Rocky" <Ro***@discussions.microsoft.com> 录露录g漏贸露l楼贸路s禄D:89*********************** ***********@microsoft.com...
Currently, I have to logon to the web page via my admin domain account. I
want to add a user that has an account on the domain, to a computers local
group. This computer is also in the domain. I don't want to add the user
to
the domain groups but to the local groups of the computer.

"Cowboy (Gregory A. Beamer) - MVP" wrote:
Do you mean you want a user to go to a web page (sitting on a server) and
access the local groups on the client machine? That creates a security
issue
and you would be better served launching a ClickOnce type of app to do
that
work rather than attempting to munge up the system.

Or, do you mean add a user to a local group on the server the web app is
on.
If so, turn off anonymous access for this page and use Windows
Authentication. The person adding via the web app must have the right to
add
local users.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Rocky" wrote:

> Hi,
>
> I have a webform, with 2 textboxs and a submit button. In the text
> box1, i
> enter a username and in textbox2 I enter the computer name. Both the
> username
> and computer name is in active directory.
>
> When i click submit, I want to add the username from textbox1 into the
> local
> administrators group on the computer name from textbox2.
>
> I want to do this in asp.net using vb.net as the programming language.
>
> can someone please give me some code examples on how i should do this?
>


Dec 29 '05 #5
Language does not really matter as both scripts are using COM+ libraries.

..NET framework itself does not provide method for you to "remotely
administoring local group/user accounts in another computer in the domain",
your best bet is on COM+ components anyway. And as they're not 3rd party
libraries, you're not exposed to additional possible security risks of using
3rd party libraries.

Yet it's up to your choice to use it or not.

P.S.: I found that if you don't enter the "Expert Exchange" page from search
engines, you can't directly view the solution without subscribe first...

"Rocky" <Ro***@discussions.microsoft.com> 级糶秎ン穝籇:36********************************* *@microsoft.com...
VBScript is not the same as asp.net/vb.net

"Lau Lei Cheong" wrote:
I've posted a reply to your last question.

Have a look if you want. It's in VBScript.

"Rocky" <Ro***@discussions.microsoft.com> ???gco?los?D:89******************************* ***@microsoft.com...
> Currently, I have to logon to the web page via my admin domain account.
> I
> want to add a user that has an account on the domain, to a computers
> local
> group. This computer is also in the domain. I don't want to add the
> user
> to
> the domain groups but to the local groups of the computer.
>
> "Cowboy (Gregory A. Beamer) - MVP" wrote:
>
>> Do you mean you want a user to go to a web page (sitting on a server)
>> and
>> access the local groups on the client machine? That creates a security
>> issue
>> and you would be better served launching a ClickOnce type of app to do
>> that
>> work rather than attempting to munge up the system.
>>
>> Or, do you mean add a user to a local group on the server the web app
>> is
>> on.
>> If so, turn off anonymous access for this page and use Windows
>> Authentication. The person adding via the web app must have the right
>> to
>> add
>> local users.
>>
>> --
>> Gregory A. Beamer
>> MVP; MCP: +I, SE, SD, DBA
>>
>> ***************************
>> Think Outside the Box!
>> ***************************
>>
>>
>> "Rocky" wrote:
>>
>> > Hi,
>> >
>> > I have a webform, with 2 textboxs and a submit button. In the text
>> > box1, i
>> > enter a username and in textbox2 I enter the computer name. Both the
>> > username
>> > and computer name is in active directory.
>> >
>> > When i click submit, I want to add the username from textbox1 into
>> > the
>> > local
>> > administrators group on the computer name from textbox2.
>> >
>> > I want to do this in asp.net using vb.net as the programming
>> > language.
>> >
>> > can someone please give me some code examples on how i should do
>> > this?
>> >


Dec 29 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andy Clarkson | last post: by
6 posts views Thread by Gawel | last post: by
5 posts views Thread by henrycortezwu | last post: by
5 posts views Thread by Rocky | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.