Change Password in ASP

Posted on 2004-10-27
Last Modified: 2007-12-19
Im trying to change my password with ASP with the code below.

Dim ChangeMe
Set ChangeMe = GetObject("WinNT://mydomain/"&Request.ServerVariables("LOGON_USER")&",user")

ChangeMe.ChangePassword (Request.Form("T1")), (Request.Form("T2"))

For some reason i get this error..

error '8007052f'

Any ideas.
Question by:jamesPeck
    LVL 12

    Expert Comment


    Is it maybe a syntax error?

    ChangeMe.ChangePassword (Request.Form("T1"), Request.Form("T2"))

    ChangeMe.ChangePassword ((Request.Form("T1")), (Request.Form("T2"))
    LVL 6

    Expert Comment

    This would change the users password on the local computer:

    Set objUser = GetObject("WinNT://" & strComputerName & "/" & strUserName, user")
    objUser.SetPassword newPassword
    set objUser = nothing

    Are you trying to change the users password at a domain level?
    LVL 12

    Expert Comment


    ChangeMe.ChangePassword ((Request.Form("T1")), (Request.Form("T2")))
    LVL 6

    Accepted Solution

    Try this - i assume T1=old password T2=new password

    Set ChangeMe = GetObject("WinNT://yourdoamin/" & Request.ServerVariables("LOGON_USER") & ", user")
    ChangeMe.ChangePassword Request.Form("T1"), Request.Form("T2")


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now