Article ID: 177200 - Last Review: March 21, 2005 - Revision: 4.3 How To Programmatically Change Network Password Under Windows 95, Windows 98, Windows MeThis article was previously published under Q177200 On This PageSUMMARY
If you want to design your application to implement its own routine to
change domain passwords on Microsoft Windows 95, Windows 98, Windows Millennium Edition (Me) you have several methods available to you, each one of which has limitations on functionality, portability, or security. This article describes two of these methods in detail.
MORE INFORMATIONMethod 1Dynamically load the 32-bit API PwdChangePassword() from Mpr.dll and it will successfully change passwords. However, it will display a non- customizable dialog box to prompt the user for password information. If you want your application to have its own interface for changing passwords, you cannot use this API.NOTE: PwdChangePassword() is the only interface that will change the Windows password as well as your network password. The following sample code demonstrates how to use PwdChangePassword. Sample CodeMethod 2A relatively easy way to change passwords under Windows 95, Windows 98, and Windows Me is to have a server process running on a Windows NT server that creates a named pipe to which the operating system client can connect. The Windows NT Server calls the ImpersonateNamedPipeClient() API and get the Windows 95 user's domain name and user name.The Client then sends the password information to the Windows NT process which can then call the NetUserChangePassword() API. The restrictions to this design are that you need a process running on a Windows NT Server, and that sending the password information over a network poses a security risk. To increase the level of security, you can encrypt the password before sending it over the network. For more information on encryption see the Crypto API documentation in the Win32 SDK. Furthermore, this method changes the network password only, not the Windows Logon Password. You can only change the Windows Logon Password by implementing Option 1 above. This means that the Windows Password and the Network passwords are not be synchronized. As a result, the user has to enter both passwords when logging onto Windows 95, Windows 98, and Windows Me. NOTE: You should not use the 16-bit Lan Manager API NetUserChangePassword(). This API changes the password to all uppercase characters and then sends the username and password combination across the network in non-encrypted clear text form. This is not only a security risk, it may also invalidate the original password by modifying changing it to an all uppercase version that may no longer be valid if the server applies password filtering. APPLIES TO
| Article Translations
|

Back to the top
