当前位置: 首页 > 图文教程 > 网络编程 > ASP > WINDOWS2000服务器账号登陆身份验证

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 133 ::
收藏到网摘: n/a

<%
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这地方,改成自己的域