473,785 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4011
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***@discussi ons.microsoft.c om> ¼¶¼g©ó¶l¥ó·s»D: 26************* *************** ******@microsof t.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***@discussi ons.microsoft.c om> ¼¶¼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***@discussi ons.microsoft.c om> ¼¶¼g©ó¶l¥ó·s»D: 85************* *************** ******@microsof t.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***@discussi ons.microsoft.c om> ???gco?l¢Do¡Ps? D:26*********** *************** ********@micros oft.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***@discussi ons.microsoft.c om> ¼¶¼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***@discussi ons.microsoft.c om> ???gco?l¢Do¡P s?D:26********* *************** **********@micr osoft.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***@discussi ons.microsoft.c om> ¼¶¼g©ó¶l¥ó·s»D: DA************* *************** ******@microsof t.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***@discussi ons.microsoft.c om> ???gco?l¢Do¡Ps? D:85*********** *************** ********@micros oft.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***@discussi ons.microsoft.c om> ???gco?l¢FDo!Ps ?D:26********** *************** *********@micro soft.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
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...
0
1531
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. I want to be able to enter a user name and then get it to diaplay all the groups this user belongs to. Are the groups a user belongs to stored as child entries under the user, or are users child entries under groups, or am I way off track.
1
2972
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
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
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10147
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
10085
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
9947
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...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
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
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.