Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Password API on NT Server
Message
 
To
23/08/1999 03:56:28
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00256474
Message ID:
00257218
Views:
23
This code require Windows NT to work.

If what you need is to change the NT password
from a program running in Windows 95, you must
create a COM Server that run in Windows NT,
and call that server from a Win9x client.
LParam pcUsername, pcOldpassw, pcNewpassw
Local lnRet

*-- change password for user in current domain (require NT)
Declare Integer NetUserChangePassword IN NETAPI32 ;
        INTEGER domain, STRING username, ;
        STRING oldpass, STRING newpass

*   String parameters are converted to UNICODE
*   Return :
*        0 = No Error
*     2221 = user name could not be found.
*       86 = invalid old password
*     2245 = new password doesn't comply with policies
*        5 = access denied
*
lnRet = NetUserChangePassword( 0, StrConv(pcUsername, 5), ;
          StrConv(pcOldpassw, 5), StrConv(pcNewpassw, 5) )

Return lnRet
>Hi,
>
>Does anyone know if I can call a windows API to change the user login password in an NT server ? Thanks.

Just an opinion... Not a fact.
Previous
Reply
Map
View

Click here to load this message in the networking platform