网络编程
位置:首页>> 网络编程>> Asp编程>> asp更改Windows2000管理者密码?

asp更改Windows2000管理者密码?

  发布时间:2010-06-26 11:03:00 

标签:windows2000,密码,asp

如何在线更改Windows2000管理者密码?

changepwd.htm

<html>
<head>
<title>精彩春风之在线修改Windows2000密码</title>
</head>
<body>
<form action="changepwd.asp" method="post"> 
<!--使用隐藏--> 
<input type="hidden" name="UserName" 
 value="<%=Request.ServerVariables("LOGIN_USER")%>"> 
  <br>输入旧密码: <input name="OldPwd"> 
  <br>输入新密码: <input name="NewPwd1"> 
  <br>确认新密码: <input name="NewPwd2"> 
  <input type="submit" value="更改"> 
</form> 
</body>
</html>

changepwd.asp

<% 
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 "请再次确认密码!" 
End If 
%> 

 

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com