473,416 Members | 1,628 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,416 software developers and data experts.

Adding 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 use vb.net as the programming language.

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

Thank yo so much!
Dec 23 '05 #1
5 3984
I think this is a bad idea. You're going to impersonate the web
application's running identity to by the "domain admins" to do this, and
this can lead to all kinds of trouble if your web site is being attacked.

"Rocky" <Ro***@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:26********************************* *@microsoft.com...
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.

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

Thank yo so much!

Dec 23 '05 #2
I don't want to add to the domain admins, i want to add to the LOCAL Admins
of a machine.

"Lau Lei Cheong" wrote:
I think this is a bad idea. You're going to impersonate the web
application's running identity to by the "domain admins" to do this, and
this can lead to all kinds of trouble if your web site is being attacked.

"Rocky" <Ro***@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:26*********************** ***********@microsoft.com...
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.

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

Thank yo so much!


Dec 23 '05 #3
But you need the Web Application to be run as "domain admins" to add a user
to administrators group of "Any computer in domain"

This is obvious. To add the user in "local administrators" group you'll also
need to be one of the members in the group, and the only AD entry
that is "local administrators" of all computers in the domain is the "domain
admin" group.

If you create other group/user that is the "local administrators" of all
computers in the domain, you're creating another "domain admin"
group/user anyway, and will have similar security risk.

"Rocky" <Ro***@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:85********************************* *@microsoft.com...
I don't want to add to the domain admins, i want to add to the LOCAL Admins
of a machine.

"Lau Lei Cheong" wrote:
I think this is a bad idea. You're going to impersonate the web
application's running identity to by the "domain admins" to do this, and
this can lead to all kinds of trouble if your web site is being attacked.

"Rocky" <Ro***@discussions.microsoft.com> ???gco?l¢Do¡Ps?D:26******************************* ***@microsoft.com...
> 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.
>
> can someone please give me some code examples on how i should do this?
>
> Thank yo so much!


Dec 23 '05 #4
I know i need to run it as a domain admin, i know i have to be one of the
members, i know all the security risks. MY QUESTION IS HOW DO I DO IT?????
WHAT IS THE ASP.NET AND VB.NET
CODE??????????????????????????????????????????????/

"Lau Lei Cheong" wrote:
But you need the Web Application to be run as "domain admins" to add a user
to administrators group of "Any computer in domain"

This is obvious. To add the user in "local administrators" group you'll also
need to be one of the members in the group, and the only AD entry
that is "local administrators" of all computers in the domain is the "domain
admin" group.

If you create other group/user that is the "local administrators" of all
computers in the domain, you're creating another "domain admin"
group/user anyway, and will have similar security risk.

"Rocky" <Ro***@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:85*********************** ***********@microsoft.com...
I don't want to add to the domain admins, i want to add to the LOCAL Admins
of a machine.

"Lau Lei Cheong" wrote:
I think this is a bad idea. You're going to impersonate the web
application's running identity to by the "domain admins" to do this, and
this can lead to all kinds of trouble if your web site is being attacked.

"Rocky" <Ro***@discussions.microsoft.com> ???gco?l¢Do¡Ps?D:26***************************** *****@microsoft.com...

> 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.
>
> can someone please give me some code examples on how i should do this?
>
> Thank yo so much!


Dec 27 '05 #5
Ok, having reminded you about the security risks, here are probably what you
want:

a VB script that will allow the chang of the local admin password from a
remote box
http://www.experts-exchange.com/Secu..._20946526.html

Add User to Group w/COM
http://www.adminscripteditor.com/scr...view.asp?id=44

Although the above 2 are not the direct anwser, but you should have no
problem combine both to get what you want.

"Rocky" <Ro***@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:DA********************************* *@microsoft.com...
I know i need to run it as a domain admin, i know i have to be one of the
members, i know all the security risks. MY QUESTION IS HOW DO I DO IT?????
WHAT IS THE ASP.NET AND VB.NET
CODE??????????????????????????????????????????????/

"Lau Lei Cheong" wrote:
But you need the Web Application to be run as "domain admins" to add a
user
to administrators group of "Any computer in domain"

This is obvious. To add the user in "local administrators" group you'll
also
need to be one of the members in the group, and the only AD entry
that is "local administrators" of all computers in the domain is the
"domain
admin" group.

If you create other group/user that is the "local administrators" of all
computers in the domain, you're creating another "domain admin"
group/user anyway, and will have similar security risk.

"Rocky" <Ro***@discussions.microsoft.com> ???gco?l¢Do¡Ps?D:85******************************* ***@microsoft.com...
>I don't want to add to the domain admins, i want to add to the LOCAL
>Admins
> of a machine.
>
> "Lau Lei Cheong" wrote:
>
>> I think this is a bad idea. You're going to impersonate the web
>> application's running identity to by the "domain admins" to do this,
>> and
>> this can lead to all kinds of trouble if your web site is being
>> attacked.
>>
>> "Rocky" <Ro***@discussions.microsoft.com> ???gco?l¢FDo!Ps?D:26****************************** ****@microsoft.com...
>>
>> > 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.
>> >
>> > can someone please give me some code examples on how i should do
>> > this?
>> >
>> > Thank yo so much!
>>
>>
>>


Dec 28 '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:...
0
by: James | last post by:
Hello All, I am working in a Windows NT domain environment, working with C#. What I want to be able to do is view all the groups a user belongs to, and also be able to add the users to groups. ...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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...

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.