WINDOWS2000服务器账号登陆身份验证

发表于:2007-06-30来源:作者:点击数: 标签:
% userflag=trim(request(userflag)) oldPwd=trim(request(oldPwd)) newPwd=trim(request(newPwd)) @#修改内部网和邮箱的密码 adsPath = LDAP://file/cn= ,cn=users,dc=yulong,dc=com Set oo = GetObject(LDAP:) on error resume next Set obj = oo.OpenDSObj
<%
userflag=trim(request("userflag"))
oldPwd=trim(request("oldPwd"))
newPwd=trim(request("newPwd"))

@#修改内部网和邮箱的密码
adsPath = "LDAP://file/cn=" & userflag & ",cn=users,dc=yulong,dc=com"
Set oo = GetObject("LDAP:")
on error resume next
Set obj = oo.OpenDSObject(adsPath,userflag,oldPwd,0)
if err.Number <> o then
    err.clear
%>
    <script language="javascript">
        alert("用户名或密码错,请重新输入!");
        history.go(-1);
    </script>
<%
else
    @#Response.Write "newPwd=" & newPwd
    obj.SetPassword newPwd
    @#Response.Write "<hr>"
    Response.Write("<div class=aa>你已经成功修改了网络密码!</div>")
end if
%>


//基本上只需改dc=yulong,dc=com这地方,改成自己的域  

原文转自:http://www.ltesting.net