Advertisement

09.12.2003 at 06:03PM PDT, ID: 20737543
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

ASP Change Windows Password

Asked by funkyfinger in Web Development Software

Tags: , , ,

Hello,
 I'm trying to create a ASP page that allows a user to changer her/his windows password online.  I found this code somewhere on the net (it is not mine). I am getting the following error:

  Active Directory (0x80070005)
  General access denied error
  /changePass.asp, line 85

 (same error occurs on both lines)
  PassAge = User.Get("PasswordAge")/86400
  Call User.ChangePassword(OldPassword, NewPassword)

I realize that this error is because the user who logs in is not an administrator.  Is there a security setting somewhere that I can change to allow this script to run, or is there a way to allow this asp page to act as an administrator without making the user an administrator, or could I create a dll file that somehow has admin privileges?

Thanks,
code is below
ff


'======================================================
Dim User
Dim UserName
Dim UserDomain
Dim Domain
Dim MaxAge
Dim MinLength 'password length
Dim MaxLength 'password length

MaxLength = 14

UserDomain = "myDomain"
Set Domain = GetObject("WinNT://" & UserDomain)

UserName = "username"
Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")


MinLength = Domain.MinPasswordLength

MaxAge = Domain.MaxPasswordAge / 86400
IF MaxAge < 0 THEN
    MaxAge = "Onbeperkt"
    Expire = "Verloopt niet"    
ELSE
    PassAge = User.Get("PasswordAge")/86400
    Expire = MaxAge - PassAge & " dagen"
    MaxAge = MaxAge & " dagen"
END IF

Dim NewPassword
Dim OldPassword

NewPassword = "newPass"
OldPassword = "oldPass"

Call User.ChangePassword(OldPassword, NewPassword)

If (Err.Number<>0) Then
   err_number = Hex(Err.Number)
   
     IF err_number = "8007005" THEN
         err_text = "Your Account is locked out."
    END IF
   
     IF err_number = "80070056" THEN
         err_text = "Invalid Old NT Password."
    END IF
   
     IF err_number = "800708AD" THEN
         err_text = "The specified NT Account does not exist."
    END IF
   
     IF err_number = "800708C5" THEN
         err_text =  "Your new password cannot be the same as any of your previous passwords."
    END IF
   
    %>
    "An error has occurred. " number = <%=err_number%><BR><%=err_text%><BR><%=Err.Number%>
    <%
End If
Start Free Trial
[+][-]09.13.2003 at 08:43PM PDT, ID: 9355670

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2003 at 02:47PM PDT, ID: 9358800

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 12:17PM PDT, ID: 9365320

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 02:00PM PDT, ID: 9366112

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 06:41PM PDT, ID: 9367527

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 06:54PM PDT, ID: 9367565

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 09:32PM PDT, ID: 9368096

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 10:29PM PDT, ID: 9368288

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.15.2003 at 11:21PM PDT, ID: 9368458

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.19.2003 at 03:08AM PDT, ID: 9392314

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Web Development Software
Tags: password, change, asp, windows
Sign Up Now!
Solution Provided By: SerCouWisMOD
Participating Experts: 3
Solution Grade: B
 
 
[+][-]03.21.2004 at 10:06PM PST, ID: 10646913

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.21.2004 at 10:06PM PST, ID: 10646914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32