Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing user's password on Active Directory via code
Message
 
 
To
18/04/2001 15:35:10
Christian Bellavance
Université du Québec à Hull
Hull, Quebec, Canada
General information
Forum:
Windows
Category:
API
Miscellaneous
Thread ID:
00496936
Message ID:
00497339
Views:
10
>Does somebody has examples or links where I can find How to create a program to change a user's password. I think it must be done by ADSI.
>
>Thanks

In VFP:
ouser = getobject('WinNT://Machine/UserName,user')
ouser.ChangePassword('oldpassword','newpassword')

In VB (after adding the Active DS Type library to the project references):
Dim ouser As IADsUser
Set ouser = GetObject("WinNT://Machine/UserName,user")
ouser.ChangePassword "oldpassword", "newpassword"

This works if you are the user or if you have adminsitrative rights to the machine/domain in question.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform