How to Add Domain user to local groups

G

Guest

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?
 
G

Guest

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!
***************************
 
G

Guest

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.
 
L

Lau Lei Cheong

I've posted a reply to your last question.

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

Lau Lei Cheong

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top