How to Add Domain user to local groups

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9ja3k=?=, Dec 28, 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 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?
    =?Utf-8?B?Um9ja3k=?=, Dec 28, 2005
    #1
    1. Advertising

  2. 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?
    >
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Dec 28, 2005
    #2
    1. Advertising

  3. 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?
    > >
    =?Utf-8?B?Um9ja3k=?=, Dec 28, 2005
    #3
  4. I've posted a reply to your last question.

    Have a look if you want. It's in VBScript.

    "Rocky" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > 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?
    >> >
    Lau Lei Cheong, Dec 29, 2005
    #4
  5. 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" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > > 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?
    > >> >

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

    >>
    >>
    >>
    Lau Lei Cheong, Dec 29, 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. Replies:
    5
    Views:
    548
    S. Justin Gengo
    Nov 11, 2005
  2. =?Utf-8?B?Um9ja3k=?=

    Adding domain user to local groups

    =?Utf-8?B?Um9ja3k=?=, Dec 23, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    1,286
    Lau Lei Cheong
    Dec 28, 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:
    596
    =?Utf-8?B?Um9ja3k=?=
    Dec 30, 2005
  4. Chad Dressler
    Replies:
    0
    Views:
    617
    Chad Dressler
    Dec 30, 2006
  5. Bill
    Replies:
    0
    Views:
    202
Loading...

Share This Page