Use ASP's security validation to make online changes to the Windows 2000 Manager password

Source: Internet
Author: User
Tags iis servervariables
window| Security | Online IIS security Verification mechanism is done very well, we can use ASP security authentication to the Windows 2000 Manager password online modification.
When someone logs on to the site, use the Login_user in the ServerVariables collection to capture the login account, if you must turn off the option to allow anonymous logons in IIS, and then modify the password by ADSI in the changepwd.asp file.
Here's the program:

Changepwd.htm
<body>
<!--a client-side validation script related to the input form (that is, not allowing the new password to be null and two times the equality of password input) please number yourself-->
<form action= ' changepwd.asp ' method= ' post ' >
Type= ' hidden ' name= ' UserName ' value= ' <%=request.servervariables ("Login_user")%> ' > ' <input
<br> Enter old password: <input name= "Oldpwd" >
<br> Enter new password: <input name= "NEWPWD1" >
<br> Confirm New Password: <input name= "NEWPWD2" >
<input type=submit value= ' Change ' >
</form>
</body>


Changepwd.asp
<%
Oldpwd=request.form ("Oldpwd")
Newpwd=request.form ("NewPwd1")
Username=request.form ("UserName")
Set ouser=getobject ("winnt://computername/" & UserName)
Ouser.changepassword oldpwd,newpwd
Ouser.setinfo
Set ouser=nothing
Response.Write "Password modified successfully!" "
%>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.