krb5_change_password()--Change Password
Syntax
#include <krb5.h> krb5_error_code krb5_change_password( krb5_context context, krb5_creds * creds, char * newpw, int * result_code, krb5_data * result_code_string, krb5_data * result_string);Service Program Name: QSYS/QKRBGSS
Default Public Authority: *USE
Threadsafe: Yes
The krb5_change_password() function changes the password for the principal identified by the supplied credentials. The password change server will apply any applicable password policy checks before changing the password. The password change will be rejected if the policy checks are not successful.
Authorities
None.
Parameters
- context (Input)
- The Kerberos context.
- creds (Input)
- The credentials for the request. This must be an initial ticket to the
kadmin/changepw service for the principal whose password is to be changed.
- newpw (Input)
- The new password for the principal.
- result_code (Output)
- Results code for the change password request.
KRB5_KPASSWD_SUCCESS (0) password changed KRB5_KPASSWD_MALFORMED (1) request packet incorrect KRB5_KPASSWD_HARDERROR (2) password server error KRB5_KPASSWD_AUTHERROR (3) authentication error KRB5_KPASSWD_SOFTERROR (4) password changed rejected
- result_code_string (Output)
- Text description associated with the result code. Specify NULL for this
parameter if the text description is not needed. The text description should be
released when it is no longer needed by calling the
krb5_free_string() function.
- result_string (Output)
- Additional information provided by the password change server. Specify NULL
for this parameter if the additional information is not needed. The result
string should be released when it is no longer needed by calling the
krb5_free_string() function.
Return Value
If no errors occur, the return value is 0. Otherwise, a Kerberos error code is returned. The password will not have been changed unless both the function return value and the result code are zero.
Error Messages
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
API introduced: V5R2
[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]