<%@ Language=VBScript%>
<%=Request.ServerVariables("AUTH_USER")%>
<td></td>
<html>
<head></head>
<body>
<form name='form1' method='post'>
<input type='text' name='oldpasswd' /><br/>
<input type='text' name='passwd' />
<input type='submit' name='submit' value='submit' />
</form>
</body>
<%
Sub ChangePassword(sOldpassword, sNewPassword)
Set objSysInfo = CreateObject("ADSystemInfo")
'
' Response.Write(objSysInfo.UserName)
' Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
' objUser.Password = sNewPassword
' objUser.SetInfo
' Set objUser = Nothing
' Set objSysInfo = Nothing
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
objUser.ChangePassword sOldpassword , sNewPassword
End Sub
Dim NewPassword, OldPassword
OldPassword= Request("oldpasswd")
NewPassword = Request("passwd")
if NewPassword <> "" Then
Response.Write(NewPassword)
call ChangePassword(OldPassword, NewPassword)
Response.Redirect("check.htm")
end if
%>
</html>
'IT Professional > Windows Management Technology' 카테고리의 다른 글
AD User Sync (0) | 2010.02.25 |
---|---|
AD User Password reset script (0) | 2010.02.25 |
말도 많도 탈도 많은 Hyper-V 이야기 : 첫번째 (0) | 2010.02.15 |
Visual basic Script 를 사용하여 event log 에 logging 하기 (0) | 2010.02.01 |
Microsoft Hyper-v Capacity design (0) | 2010.02.01 |