KRB5_SET_PASSWORD(3)
π KRB5_SET_PASSWORD(3) π
okay bestie, pull up a chair, because this is the change your password page of the Kerberos 5 Library manual, and it's giving very much "let me in, I forgot my password" energy πβ¨
π LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) π«Ά
β¨ SYNOPSIS
#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);
krb5_error_code
krb5_set_password(krb5_context context, krb5_creds *creds, char *newpw,
krb5_principal targprinc, int *result_code,
krb5_data *result_code_string, krb5_data *result_string);
krb5_error_code
krb5_set_password_using_ccache(krb5_context context, krb5_ccache ccache,
char *newpw, krb5_principal targprinc, int *result_code,
krb5_data *result_code_string, krb5_data *result_string);
const char *
krb5_passwd_result_to_string(krb5_context context, int result);
no cap, that's a lot of parameters. but we're gonna get through this together π
πΈ DESCRIPTION
So here's the tea: these functions change the password for a given principal. that's the whole vibe. π
krb5_set_password() and krb5_set_password_using_ccache() are the newer ones out of the three, and they use a newer version of the protocol β and also fall back to the older set-password protocol if the newer protocol doesn't work. lowkey iconic of them to have a backup plan π¦
krb5_change_password() sets the password newpasswd for the client principal in creds. the server principal of creds must be kadmin/changepw. that part is not optional, bestie, that's the rule π
krb5_set_password() and krb5_set_password_using_ccache() change the password for the principal targprinc.
krb5_set_password() requires that the credential for kadmin/changepw@REALM is in creds. if the user caller isn't an administrator, this credential needs to be an initial credential β go look at krb5_get_init_creds(3) for how to get such credentials. iykyk π
krb5_set_password_using_ccache() will get the credential from ccache. very much "it's already in my bag, no need to ask" energy πβ¨
if targprinc is NULL, then krb5_set_password_using_ccache() uses the default principal in ccache, and krb5_set_password() uses the global default principal. so like, it'll just pick for you π
all three functions return an error in result_code, and maybe an error string to print in result_string. so check your result_code, bestie, it's literally telling you what happened π
krb5_passwd_result_to_string() returns a human readable string describing the error code in result_code from the krb5_set_password() functions. it's the translator friend who turns cryptic error numbers into actual sentences π«Ά
π SEE ALSO
reminder: this page is HEIMDAL's, dated July 15, 2004, and it's the KRB5_SET_PASSWORD(3) page. slay, go change that password responsibly πππ
that's the whole page, bestie β go forth and authenticate β¨
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- debian bookworm: heimdal-dev 7.8.git20221117.28daf24+dfsg-2 Β· BSD-3-Clause
- debian trixie: heimdal-dev 7.8.git20221117.28daf24+dfsg-9+deb13u1 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: heimdal 7.8.0-unstable-2024-09-10
- ubuntu jammy: heimdal-dev 7.7.0+dfsg-3ubuntu1 Β· BSD-3-Clause
- ubuntu noble: heimdal-dev 7.8.git20221117.28daf24+dfsg-5ubuntu3 Β· BSD-3-Clause
- ubuntu questing: heimdal-dev 7.8.git20221117.28daf24+dfsg-9ubuntu1
- ubuntu resolute: heimdal-dev 7.8.git20221117.28daf24+dfsg-11ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: heimdal-dev 7.8.git20240113.1b4565a+dfsg-2ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2003 - 2004 Kungliga Tekniska HΓΆgskolan
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms