473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 3772
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> ¼¶¼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 #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> ¼¶¼g©ó¶l¥ó·s»D: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¢Do¡Ps?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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Captain Obvious | last post by:
I'm posting this in hopes that it will help a few folks out when the search Google Groups. I was having the following problems with Oracle 10G: 1. When installing the database, the net config...
0
by: Andy Clarkson | last post by:
Is there a limitation with xp_logininfo and retreiving membership info from Domain Local groups? I can retrieve memeber info from Global groups but get:- Server: Msg 8198, Level 16, State 12,...
0
by: R. Clausen | last post by:
Have two machines with Win 2K 5.00.2195 (Machine 'A' has SP4, Machine 'B' has SP3) and both have DB2 UDB v8.1 FP4 all loaded fresh (not an upgrade). Machine 'A' gives the error 'Logon failure:...
1
by: Maziar Aflatoun | last post by:
Hi everyone, I'm having a problem with reading user groups on Active Directory using C#. It returns all the groups in the Universal scope for a specific user. However, I only need the groups in...
6
by: Gawel | last post by:
Hajo, I am searching solution for this proble over 2 days. I need to be able to create mailboxes on exchange server that is in domain. I need to do it outside of domain. What is more I can...
1
by: howard dierking | last post by:
Hi, I am using local windows groups as roles in an asp.net application. In my web.config file, I have the following: <authentication mode="Windows" /> <authorization> <allow...
5
by: henrycortezwu | last post by:
Hi All, I'm trying to get the "groups" of a user that belongs to a domain by just passing the user's userID & domain. Is this possible? What I tried, and is working is the ff code ( i can get...
5
by: Rocky | last post by:
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...
5
by: Michael Howes | last post by:
I'm writing a utility to manage a machines *local* accounts in c# I am getting all the users in a specific Group just fine but when I want to get some of the information on each user from their...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.