KRB5_SET_PASSWORD(3)     BSD Library Functions Manual     KRB5_SET_PASSWORD(3)

[1mNAME[0m
     [1mkrb5_change_password[22m, [1mkrb5_set_password[22m, [1mkrb5_set_password_using_ccache[22m,
     [1mkrb5_passwd_result_to_string [22m-- change password functions

[1mLIBRARY[0m
     Kerberos 5 Library (libkrb5, -lkrb5)

[1mSYNOPSIS[0m
     [1m#include <krb5.h>[0m

     [4mkrb5_error_code[0m
     [1mkrb5_change_password[22m([4mkrb5_context[24m [4mcontext[24m, [4mkrb5_creds[24m [4m*creds[24m,
         [4mchar[24m [4m*newpw[24m, [4mint[24m [4m*result_code[24m, [4mkrb5_data[24m [4m*result_code_string[24m,
         [4mkrb5_data[24m [4m*result_string[24m);

     [4mkrb5_error_code[0m
     [1mkrb5_set_password[22m([4mkrb5_context[24m [4mcontext[24m, [4mkrb5_creds[24m [4m*creds[24m, [4mchar[24m [4m*newpw[24m,
         [4mkrb5_principal[24m [4mtargprinc[24m, [4mint[24m [4m*result_code[24m,
         [4mkrb5_data[24m [4m*result_code_string[24m, [4mkrb5_data[24m [4m*result_string[24m);

     [4mkrb5_error_code[0m
     [1mkrb5_set_password_using_ccache[22m([4mkrb5_context[24m [4mcontext[24m, [4mkrb5_ccache[24m [4mccache[24m,
         [4mchar[24m [4m*newpw[24m, [4mkrb5_principal[24m [4mtargprinc[24m, [4mint[24m [4m*result_code[24m,
         [4mkrb5_data[24m [4m*result_code_string[24m, [4mkrb5_data[24m [4m*result_string[24m);

     [4mconst[24m [4mchar[24m [4m*[0m
     [1mkrb5_passwd_result_to_string[22m([4mkrb5_context[24m [4mcontext[24m, [4mint[24m [4mresult[24m);

[1mDESCRIPTION[0m
     These functions change the password for a given principal.

     [1mkrb5_set_password[22m() and [1mkrb5_set_password_using_ccache[22m() 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).

     [1mkrb5_change_password[22m() sets the password [4mnewpasswd[24m for the client princi-
     pal in [4mcreds[24m.  The server principal of creds must be kadmin/changepw.

     [1mkrb5_set_password[22m() and [1mkrb5_set_password_using_ccache[22m() change the pass-
     word for the principal [4mtargprinc[24m.

     [1mkrb5_set_password[22m() requires that the credential for
     kadmin/changepw@REALM is in [4mcreds[24m.  If the user caller isn't an adminis-
     trator, this credential needs to be an initial credential, see
     krb5_get_init_creds(3) how to get such credentials.

     [1mkrb5_set_password_using_ccache[22m() will get the credential from [4mccache[24m.

     If [4mtargprinc[24m is NULL, [1mkrb5_set_password_using_ccache[22m() uses the the de-
     fault principal in [4mccache[24m and [1mkrb5_set_password[22m() uses the global the de-
     fault principal.

     All three functions return an error in [4mresult_code[24m and maybe an error
     string to print in [4mresult_string[24m.

     [1mkrb5_passwd_result_to_string[22m() returns an human readable string describ-
     ing the error code in [4mresult_code[24m from the [1mkrb5_set_password[22m() functions.

[1mSEE ALSO[0m
     krb5_ccache(3), krb5_init_context(3)

HEIMDAL                          July 15, 2004                         HEIMDAL
