473,769 Members | 5,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3788
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***@discussi ons.microsoft.c om> ¼¶¼g©ó¶l¥ó·s»D: 89************* *************** ******@microsof t.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***@discussi ons.microsoft.c om> ¼¶¼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***@discussi ons.microsoft.c om> ¼¶¼g©ó¶l¥ó·s»D: 36************* *************** ******@microsof t.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***@discussi ons.microsoft.c om> ???gco?l¢Do¡Ps? D:89*********** *************** ********@micros oft.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
4087
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 assistant would fail and I would end up with no listener. Furthermore, I couldn't run Net Config to create one. 2. I could not start the Network Configuration Assistant after a fresh install of the 10G client on a workstation.
0
2315
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, Procedure xp_logininfo, Line 38 Could not obtain information about Windows NT group/user 'DOMAIN\domain_local_groupname' when I try to retrieve from a domain local group.
0
1520
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: unknown user name or bad password.' when executing a copy command to send a file to a network printer or when trying to delete file(s)located on another machine also on the network with the del command. Machine 'B' executes both commands without a...
1
2971
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 Global scope and Domain local scope. Does anyone know I can modify the following code to this? DirectoryEntry entry = new DirectoryEntry("LDAP://" + Domain, CurrentUser, pwd, AuthenticationTypes.Secure); DirectorySearcher mySearcher = new...
6
10991
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 create user outside domain but I can not create mailbox. Below code throws following exception: The server is not operational. IMailboxStore mailBox = (IMailboxStore)user.NativeObject;
1
1511
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 roles="localmachinename\OOK_CDD" /> <deny users="*" /> </authorization>
5
1892
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 both local & domain groups), but in Windows Application. When I tried converting it to ASP.NET, it only gets the local groups.
5
4011
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 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 use vb.net as the programming language.
5
13210
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 Properties collection I can't get the properties on some users. For example, I get all the users that are part of my machines Administrators Group. I get get the properties of the built in local Administrator account and some local IT account,...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3964
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.