Changes password for the currently logged on user.
Server.ChangePassword (OldPassword as String, NewPassword as String)
|OldPassword||String||Userís old password on the server or domain.|
|NewPassword||String||Userís new password on the server or domain.|
There are some differences between UserManager.Server.ChangePassword method and UserManager.User.Password write property.
- ChangePassword method of Server object can call only logged-on user. There is no need to know user name, password for current user is to change. But user must know an old password. Similar like crtl-alt-del -> change password.
- Password write property of User object can call ONLY administrator (or account operator). You do not need to know an old password. Similar like account manager -> set password.
Source code for this Script:
<form Name=Password> Old password : <input Name=OldPassword> New password : <input Name=NewPassword> <input type=button onclick="ChangePassword()" Value="Change Password"> </form> <script language=vbscript> Function ChangePassword() Set Server = CreateObject("UserManager.Server") Server.Select "" Server.ChangePassword document.forms.Password.OldPassword.Value, document.forms.Password.NewPassword.Value MsgBox "Password was changed to " & document.forms.Password.NewPassword.Value End Function </script>
Properties of servers, enumerating users, logon/logoff to the user administrator account.
ActiveX UserManager is easy to use COM component with classes to create, delete and manage local and remote user accounts, groups, servers and domains in the Windows NT (2000/XP) environment. You can simple work with user accounts and groups from VBA, VBS/JS, ASP and T-SQL programming environment.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: firstname.lastname@example.org