Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing user's password on Active Directory via code
Message
 
 
À
18/04/2001 15:35:10
Christian Bellavance
Université du Québec à Hull
Hull, Québec, Canada
Information générale
Forum:
Windows
Catégorie:
API
Divers
Thread ID:
00496936
Message ID:
00497339
Vues:
9
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform