__passwd -- Verify or Change a Password


 #include <sys/types.h>
 #include <pwd.h>

 int __passwd(const char *userID, const char *currentPassword,
              const char *newPassword);


__passwd verifies or changes a user password.
identifies the user. userID is a 1 to 8 character, null-terminated, MVS user ID.
is the current password.
is the new password. The new password replaces the current password. If newPassword is NULL, then currentPassword is verified and not changed.
The passwords are 1 to 8 character, null-terminated strings. Site-dependent restrictions on passwords may apply to both the currentPassword and newPassword arguments.

Note: This function can only be used by a process that is a member of the BPX.DAEMON class. See IBM's Planning OpenEdition MVS for more information.

Refer to IBM's OpenEdition MVS Supplement for rlogin (SC23-3847).


__passwd returns a 0 if successful and a -1 if unsuccessful. It is possible for __passwd to fail even if the password is correct, if the password has expired, and a new password was not specified.

Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.