请问如何使用.net修改微软ad用户的密码?

hzpengyou 2004-03-16 02:48:08
我想通过网页让用户修改自己的windows用户密码,请问如何操作?
...全文
47 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
oceanju 2004-03-16
  • 打赏
  • 举报
回复
为什么你们不看msdn呢,这是上面关于操作ad用户密码的文章。

Example Code for Setting User Passwords

The following Visual Basic® code example shows how to set a user password, assuming the caller has the permission to set the password.





Dim oADsSysInfo as New ADSystemInfo
Dim sPass as String
Dim ADsPath as String

' Retrieve the ADsPath for the current user
ADsPath = oADsSysInfo.UserName

' Use some method of securely getting and verifying
' the new password from the user.
SetPassword (ADsPath, sPass)

Exit Sub

Sub SetPassword(sADsPath as String, sPassword as String)
Set usr = GetObject(sADsPath)
oObject.SetPassword sPassword
End Sub


110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧