krb5_set_password(3) krb5_set_password_using_ccache

Other Alias

krb5_change_password

LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

SYNOPSIS

In krb5.h Ft krb5_error_code Fo krb5_change_password Fa krb5_context context Fa krb5_creds *creds Fa char *newpw Fa int *result_code Fa krb5_data *result_code_string Fa krb5_data *result_string Fc Ft krb5_error_code Fo krb5_set_password Fa krb5_context context Fa krb5_creds *creds Fa char *newpw Fa krb5_principal targprinc Fa int *result_code Fa krb5_data *result_code_string Fa krb5_data *result_string Fc Ft krb5_error_code Fo krb5_set_password_using_ccache Fa krb5_context context Fa krb5_ccache ccache Fa char *newpw Fa krb5_principal targprinc Fa int *result_code Fa krb5_data *result_code_string Fa krb5_data *result_string Fc Ft const char * Fo krb5_passwd_result_to_string Fa krb5_context context Fa int result Fc

DESCRIPTION

These functions change the password for a given principal.

Fn krb5_set_password and Fn krb5_set_password_using_ccache are the newer of the three functions, and use a newer version of the protocol (and also fall back to the older set-password protocol if the newer protocol doesn't work).

Fn krb5_change_password sets the password Fa newpasswd for the client principal in Fa creds . The server principal of creds must be kadmin/changepw

Fn krb5_set_password and Fn krb5_set_password_using_ccache change the password for the principal Fa targprinc .

Fn krb5_set_password requires that the credential for kadmin/changepw@REALM is in Fa creds . If the user caller isn't an administrator, this credential needs to be an initial credential, see krb5_get_init_creds3 how to get such credentials.

Fn krb5_set_password_using_ccache will get the credential from Fa ccache .

If Fa targprinc is NULL Fn krb5_set_password_using_ccache uses the the default principal in Fa ccache and Fn krb5_set_password uses the global the default principal.

All three functions return an error in Fa result_code and maybe an error string to print in Fa result_string .

Fn krb5_passwd_result_to_string returns an human readable string describing the error code in Fa result_code from the Fn krb5_set_password functions.