Adding domain user to local groups

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9ja3k=?=, Dec 23, 2005.

  1. 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!
     
    =?Utf-8?B?Um9ja3k=?=, Dec 23, 2005
    #1
    1. Advertising

  2. 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" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > 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!
     
    Lau Lei Cheong, Dec 23, 2005
    #2
    1. Advertising

  3. 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" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > > 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!

    >
    >
    >
     
    =?Utf-8?B?Um9ja3k=?=, Dec 23, 2005
    #3
  4. 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" <> ¼¶¼g©ó¶l¥ó·s»D:...
    >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" <> ???gco?l¢Do¡Ps?D:...
    >>
    >> > 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!

    >>
    >>
    >>
     
    Lau Lei Cheong, Dec 23, 2005
    #4
  5. 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" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > >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" <> ???gco?l¢Do¡Ps?D:...
    > >>
    > >> > 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!
    > >>
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?Um9ja3k=?=, Dec 27, 2005
    #5
  6. 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/Security/Win_Security/Q_20946526.html

    Add User to Group w/COM
    http://www.adminscripteditor.com/scriptlibrary/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" <> ¼¶¼g©ó¶l¥ó·s»D:D...
    >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" <> ???gco?l¢Do¡Ps?D:...
    >>
    >> >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" <> ???gco?l¢FDo!Ps?D:...
    >> >>
    >> >> > 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!
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Lau Lei Cheong, Dec 28, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Um9ja3k=?=

    Adding comain user to local groups

    =?Utf-8?B?Um9ja3k=?=, Dec 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    368
    =?Utf-8?B?Um9ja3k=?=
    Dec 27, 2005
  2. =?Utf-8?B?Um9ja3k=?=

    How to Add Domain user to local groups

    =?Utf-8?B?Um9ja3k=?=, Dec 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    1,057
    Lau Lei Cheong
    Dec 29, 2005
  3. =?Utf-8?B?Um9ja3k=?=

    How to Add a domain user to a local user group

    =?Utf-8?B?Um9ja3k=?=, Dec 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    625
    =?Utf-8?B?Um9ja3k=?=
    Dec 30, 2005
  4. Chad Dressler
    Replies:
    0
    Views:
    673
    Chad Dressler
    Dec 30, 2006
  5. Bill
    Replies:
    0
    Views:
    239
Loading...

Share This Page