手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>服务器技术>Mail服务器>列表

基于ADSI的NT帐号及Exchange Server帐号申请及验证模块源代码

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

</td>
<td width="80">
<p align="center"><input type="button" value="取消" name="Cancel"></td>
</tr>
<tr>
<td width="92"> </td> bbs.bitsCN.com
<td width="80"> </td>
<td width="80"> </td>
</tr>
</table>
</div>
</td></tr></table>
</center>
</div></tr></table>
</center>
</div>
</form>
</body>

</html>

b>响应文档CHPWD.asp
<HTML>

<head>
<meta name="Microsoft Theme" content="mstheme1530 1111, default">
</head>

<BODY>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="100%" align="center" valign="middle">
<%

' Variables
dim rbox

uid=session("SID_UID")
opwd=request.form("opwd")
npwd=request.form("npwd")
cpwd=request.form("cpwd")

if opwd="" then
BBS.bitsCN.com网管论坛

response.write "请输入旧密码!"
response.end
end if

if npwd="" then
response.write "请输入新密码!"
response.end
end if

if cpwd="" then
response.write "请输入确认密码!"
response.end
end if

if npwd<>cpwd then
response.write "新密码和确认密码不一致!"
response.end
end if

if ucase(opwd)=ucase(npwd) then
response.write "新密码不得和旧密码相同!"
response.end
end if

if len(npwd)<3 then
response.write "新密码长度不得小于3位!"
response.end
end if

set rbox = Server.CreateObject("RbsBoxGen.NTUserManager")

' rbox.ResetPwd uid,npwd
' rbox.Login uid,npwd
rbox.ChangePwd uid,opwd,npwd

if rbox.isok then
set rbox = nothing
response.write "密码更改成功!"
else
set rbox = nothing
response.write "旧密码输入错误!"
end if
response.end
bitsCN.Com


%>
</td>
</tr>
</table>
</BODY>
</HTML>

3.登陆验证(ASP):
dim rbox
set rbox = Server.CreateObject("RbsBoxGen.NTUserManager")
'以下假如已在DLL的初始化事件中配置正确则无须配置,可提高安全性
'rbox.Domain="yourdomain"
'rbox.Admin="administrator"
'rbox.password="XXXXXX"
'rbox.Ntserver="yonrntserver"
'rbox.EmailAddress="@Xxx.xxx"
'rbox.ExchServer="yourExchangeServerName"
'rbox.ExchSite="yourExchangeSiteName"
'rbox.ExchOrganization="yourExchangeOrganizationName"


rbox.Login name,pass 'name:待验证的用户帐号,Pass:用户密码
Login=cbool(rbox.isok) '假如rbox.isok为真,验证通过.
set rbox = nothing
if Not Login then
response.redirect Request.ServerVariables("HTTP_REFERER")
response.end
end if
中国.网管联盟

,

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!