Set password from vb.net program

  • Thread starter Thread starter Thomas Cameron
  • Start date Start date
T

Thomas Cameron

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>drdabbles.us
http://drdabbles.us
 
Thomas Cameron said:
Hello all,
I have written an application in Visual Basic .Net 2003 which allows

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.public.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.
 
Thomas Cameron said:
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>drdabbles.us
http://drdabbles.us

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

<g>
-ralph
 
I would hopefully think that this can't be done.

<g>
-ralph

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 "Administrator" 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,

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
 
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

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.
 
¤ 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.DirectoryServices library.

http://msdn.microsoft.com/library/d...sds/sds/invoking_active_directory_methods.asp

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


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top