Password Reset for Workstation Login

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

Hi

I know there are products out there that can do this like
http://www.psynch.com/technology/ska.html

What is the code that is used to Reset a Users password so the next time
they logon to the domain they are promoted for a new password?

I know the code will have to run under the Admin. That is fine I just need
to know what the API is and how to use it.

My preferred language is Visual Basic but VB.Net or C# would do as well.

I basically want to pass in the username and the code should do what ever is
needed to reset the password.

I know I can impersonate the Admin user like this

http://msdn.microsoft.com/library/d...ipalwindowsimpersonationcontextclasstopic.asp

But the code after to actually Reset the password I don't know.

Many Thanks,

Ian
 
Hi,

Take a look at the NetUserSetInfo api.

http://support.microsoft.com/default.aspx?scid=kb;en-us;187535

http://support.microsoft.com/default.aspx?scid=kb;en-us;151546


Ken
--------------------
Hi

I know there are products out there that can do this like
http://www.psynch.com/technology/ska.html

What is the code that is used to Reset a Users password so the next time
they logon to the domain they are promoted for a new password?

I know the code will have to run under the Admin. That is fine I just need
to know what the API is and how to use it.

My preferred language is Visual Basic but VB.Net or C# would do as well.

I basically want to pass in the username and the code should do what ever is
needed to reset the password.

I know I can impersonate the Admin user like this

http://msdn.microsoft.com/library/d...ipalwindowsimpersonationcontextclasstopic.asp

But the code after to actually Reset the password I don't know.

Many Thanks,

Ian
 
You need to change the password and then force the password to be expired by
setting pwdLastSet to 0.

joe
 

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