Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> usrpasschg()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrPassChg()
------------------------------------------------------------------------------
 Purpose:
 Change or set a user password.

 Syntax:
 bResult = UsrPassChg( lpszUserName,
              lpszNewPassword, lpszOldPassword)

 Parameters:
 lpszUserName    The user/object name.
 lpszNewPassword The new password.
 lpszOldPassword The old password.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 UsrPassChg() can be used to change or set a user's password.

 For a user to change their own password they must specify their user name
 lpszUserName, the new password lpszNewPassword and the old password
 lpszOldPassword.

 If a Supervisor, or a user with Supervisor equivalence wishes to change
 either their own or another user's password, they must specify the user's
 name, lpszUserName and the new password lpszNewPassword. A user with
 supervisor equivalence does not need to pass the old password
 lpszOldPassword and can instead pass a NULL string ("").

 UsrPassChg() returns TRUE if the password was changed successfully.
 Returns FALSE if not, or if an error occurs.

 Example:
 // For user KERRY to change her own password from POLLY to TITCHMARSH:
 if ( UsrPassChg( "KERRY", "TITCHMARSH", "POLLY" ))
    ? "User KERRY's password has been successfully changed"
 endif
 // For a user with supervisor equivalence to change user KATIE's password
 // to "DAVID":
 if ( UsrPassChg( "KATIE", "DAVID", "" ))
    ? "User KATIE's password has been successfully changed"
 endif

 Notes:
 This function requires Supervisor equivalence in order to change
 another user's password. If FALSE is returned, check NWErrorGet().

 For NetWare 2.x and 3.x the user name and Password MUST be in capital
 letters.

See Also: UsrPassTst()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson