The user login system becomes more and more important in the future web. The simple truth is that since the Web site is now very anxious to be managed and to collect money from members, this is a very normal magazine, and Taiwan's company law makes it clear that "companies aim for profit"
In the security authentication system of IIS 5.0, consolidated Windows Experience (Windows NT Challenge and Response in IIS 4.0) is an easy choice, a simple way to achieve a certain degree of water security, and can integrate Windows 2000 Users, but there is no good, the point is not a good line to change the password system, so today we will introduce how to change the NT user password through ASP
HTML section
When a user is logged into the security area of your site, you can use the Login_user in the ServerVariables collection to learn about the login's account, and of course remember to turn off the anonymous login option, and now let's look at the HTML section
<form action= "changepwd.asp" method= "POST" >
<!--use hidden--> to not allow users to enter their own accounts
<input type= "hidden" name= "UserName"
Value= "<%=request.servervariables (" Login_user ")%>" >
<br> input old password: <input name= "Oldpwd" >
<br> input New password: <input name= "NEWPWD1" >
<br> confirm Xinmi: <input name= "NEWPWD2" >
<input type= "Submit" value= "Change Password" >
</form>
Code
Next is the ASP section to see how to modify the WIndows 2000 user account through ADSI and save the bottom code as a changepwd.asp file name
<%
Oldpwd = Request.Form ("Oldpwd")
NEWPWD1 = Request.Form ("NewPwd1")
NEWPWD2 = Request.Form ("NewPwd2")
UserName = Request.Form ("UserName")
If NewPwd1 = NewPwd2 Then
Set ouser = GetObject ("winnt://computername/" & UserName)
Ouser.changepassword Oldpwd, NEWPWD1
Ouser.setinfo
Set ouser = Nothing
Else
Response.Write "Please confirm your password again."
End If
%>
Hopefully this article will help you!