Set password from vb.net program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas Cameron

    #1

    Set password from vb.net program

    Hello all,
    I have written an application in Visual Basic .Net 2003 which allows
    staff members to enable user accounts within a specific group in our
    Active Directory. However, as an added piece I would like to set a new
    password for the accounts as they are enabled. How can I do this in VB?
    Please also consider the fact that I do not know what the password was
    previously set to.

    Thanks in advance!
    Thomas Cameron
    tom<at>drdabble s.us


  • Ken Halter

    #2
    Re: Set password from vb.net program

    "Thomas Cameron" <tom@drdabbles. us> wrote in message
    news:pan.2005.1 0.04.20.55.51.7 8078@drdabbles. us...[color=blue]
    > Hello all,
    > I have written an application in Visual Basic .Net 2003 which allows[/color]

    You'll want to post that question in a .Net group (which is already in the
    crosspost list).

    They all contain "dotnet" or "vsnet" in their names.

    This and all other groups on the MS server that start with
    "microsoft.publ ic.vb" are for VB Classic (VB versions 1-6) and were in
    existance long before any .Net products were released. While some of the
    code looks the same, they are very different products and require a
    different set of groups.

    Try one of these:
    news://microsoft.public.dotnet.general
    news://microsoft.public.dotnet.languages.vb

    Just because it's "VB" doesn't mean it'll run VB code.

    --
    Ken Halter - MS-MVP-VB - http://www.vbsight.com
    DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
    Please keep all discussions in the groups..


    Comment

    • Ralph

      #3
      Re: Set password from vb.net program


      "Thomas Cameron" <tom@drdabbles. us> wrote in message
      news:pan.2005.1 0.04.20.55.51.7 8078@drdabbles. us...[color=blue]
      > Hello all,
      > I have written an application in Visual Basic .Net 2003 which allows
      > staff members to enable user accounts within a specific group in our
      > Active Directory. However, as an added piece I would like to set a new
      > password for the accounts as they are enabled. How can I do this in VB?
      > Please also consider the fact that I do not know what the password was
      > previously set to.
      >
      > Thanks in advance!
      > Thomas Cameron
      > tom<at>drdabble s.us
      > http://drdabbles.us
      >[/color]

      I would hopefully think that this can't be done.

      <g>
      -ralph


      Comment

      • Thomas Cameron

        #4
        Re: Set password from vb.net program

        On Tue, 04 Oct 2005 17:27:06 -0500, Ralph wrote:
        [color=blue]
        >
        > "Thomas Cameron" <tom@drdabbles. us> wrote in message
        > news:pan.2005.1 0.04.20.55.51.7 8078@drdabbles. us...[color=green]
        >> Hello all,
        >> I have written an application in Visual Basic .Net 2003 which allows
        >> staff members to enable user accounts within a specific group in our
        >> Active Directory. However, as an added piece I would like to set a new
        >> password for the accounts as they are enabled. How can I do this in VB?
        >> Please also consider the fact that I do not know what the password was
        >> previously set to.
        >>
        >> Thanks in advance!
        >> Thomas Cameron
        >> tom<at>drdabble s.us
        >> http://drdabbles.us
        >>[/color]
        >
        > I would hopefully think that this can't be done.
        >
        > <g>
        > -ralph[/color]

        In fact, it is possible. There is even an ADSI function to force a new
        password. This is all possible because of security within the .Net
        framework. Basically, if I am "Administra tor" or have the proper rights, I
        can force your password. I just need to know how to use this feature when
        not utilizing ADSI.

        --
        Thomas Cameron
        tom<at>drdabble s.us


        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Set password from vb.net program

          Thomas,

          You mean that you want to change a password unintended from a user in a way
          that he does not know it anymore. This sound for me to a weird solution.

          Can you enlighten us what will be the purpose of such a function?

          (In my opinion interesting for all programmers)

          Cor


          Comment

          • Thomas Cameron

            #6
            Re: Set password from vb.net program

            On Wed, 05 Oct 2005 09:49:19 +0200, Cor Ligthert [MVP] wrote:
            [color=blue]
            > Thomas,
            >
            > You mean that you want to change a password unintended from a user in a way
            > that he does not know it anymore. This sound for me to a weird solution.
            >
            > Can you enlighten us what will be the purpose of such a function?
            >
            > (In my opinion interesting for all programmers)
            >
            > Cor[/color]

            Certainly! I have created an application to keep my employer Sarbanes
            Oxley compliant. The program enables administrative users on our network
            by setting the proper flag in Active Directory. It logs an entry to a
            database with a helpdesk ticket number for auditing purposes, then emails
            the account holder's address listed in Active Directory. The final
            component to this program that I need to add in is the generation of
            random passwords.

            If people would like, I will post sources as well. I'm a fan of open
            source, and as I'm a contractor for the company there isn't much they can
            do to prevent me from posting it. Just let me know.

            --
            Thomas Cameron
            tom<at>drdabble s.us


            Comment

            • Paul Clement

              #7
              Re: Set password from vb.net program

              On Tue, 04 Oct 2005 16:55:51 -0400, Thomas Cameron <tom@drdabbles. us> wrote:

              ¤ Hello all,
              ¤ I have written an application in Visual Basic .Net 2003 which allows
              ¤ staff members to enable user accounts within a specific group in our
              ¤ Active Directory. However, as an added piece I would like to set a new
              ¤ password for the accounts as they are enabled. How can I do this in VB?
              ¤ Please also consider the fact that I do not know what the password was
              ¤ previously set to.
              ¤

              You can use the System.Director yServices library.

              http://msdn.microsoft.com/library/de...ry_methods.asp

              Remember that *setting* a password will require certain security privileges.


              Paul
              ~~~~
              Microsoft MVP (Visual Basic)

              Comment

              Working...