krb5_get_init_creds_password - Get initial credentials using a password. — MIT Kerberos Documentation

# MIT Kerberos Documentation

Contents | previous | next | index | Search | feedback

# krb5_get_init_creds_password - Get initial credentials using a password.

krb5_error_code `krb5_get_init_creds_password`(krb5_context context, krb5_creds * creds, krb5_principal client, const char * password, krb5_prompter_fct prompter, void * data, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * k5_gic_options)

param: | [in] context - Library context [out] creds - New credentials [in] client - Client principal [in] password - Password (or NULL) [in] prompter - Prompter function [in] data - Prompter callback data [in] start_time - Time when ticket becomes valid (0 for now) [in] in_tkt_service - Service name of initial credentials (or NULL) [in] k5_gic_options - Initial credential options

retval: | 0 Success EINVAL Invalid argument KRB5_KDC_UNREACH Cannot contact any KDC for requested realm KRB5_PREAUTH_FAILED Generic Pre-athentication failure KRB5_LIBOS_PWDINTR Password read interrupted KRB5_REALM_CANT_RESOLVE Cannot resolve network address for KDC in requested realm KRB5KDC_ERR_KEY_EXP Password has expired KRB5_LIBOS_BADPWDMATCH Password mismatch KRB5_CHPW_PWDNULL New password cannot be zero length KRB5_CHPW_FAIL Password change failed
return: | Kerberos error codes

This function requests KDC for an initial credentials for client using password . If password is NULL, a password will be prompted for using prompter if necessary. If in_tkt_service is specified, it is parsed as a principal name (with the realm ignored) and used as the service principal for the request; otherwise the ticket-granting service is used.