KADM5_PWCHECK(3)
π KADM5_PWCHECK π
okay so bestie, welcome to the KADM5_PWCHECK(3) page β it lives in the Library Functions Manual and it's literally all about the Heimdal password quality checking situation. this is libkadm5srv territory, so buckle up π
β¨ NAME β¨
krb5_pwcheck, kadm5_setup_passwd_quality_check, kadm5_add_passwd_quality_verifier, kadm5_check_password_quality β Heimdal warning and error functions π
π LIBRARY π
Kerberos 5 Library (libkadm5srv, -lkadm5srv) π¦
πΈ SYNOPSIS πΈ
#include <kadm5-protos.h>
#include <kadm5-pwcheck.h>
void
kadm5_setup_passwd_quality_check(krb5_context context,
const char *check_library, const char *check_function);
krb5_error_code
kadm5_add_passwd_quality_verifier(krb5_context context,
const char *check_library);
const char *
kadm5_check_password_quality(krb5_context context,
krb5_principal principal, krb5_data *pwd_data);
int
(*kadm5_passwd_quality_check_func)(krb5_context context,
krb5_principal principal, krb5_data *password, const char *tuning,
char *message, size_t length);
π DESCRIPTION π
so these functions? they do the quality check for the heimdal database library. that's the whole vibe π«Ά
there are two versions of the shared object API. the old version (0) is deprecated but still supported, no cap. the new version (1) supports multiple password quality checking policies inside the same shared object. details below, keep reading π
the password quality checker will run all the policies that are configured by the user. and if any policy rejects the password, the password gets rejected. periodt. β
policy names look like module-name:policy-name β or, if the policy name is unique enough, you can just say policy-name. slay β¨
π§ IMPLEMENTING A PASSWORD QUALITY CHECKING SHARED OBJECT π§
(this one is about the version 1 API only, just so we're clear π)
module shared objects may conveniently be compiled and linked with libtool(1) β iconic. an object needs to export a symbol called kadm5_password_verifier of the type struct kadm5_pw_policy_verifier.
its name and vendor fields should contain the obvious information. name must match the module-name portion of the policy name (aka the part before the colon) if the policy name contains a colon β otherwise the policy will not be run, and we'd simply pass away π
version should be KADM5_PASSWD_VERSION_V1. yes ma'am.
funcs contains an array of struct kadm5_pw_policy_check_func structures that is terminated with an entry whose name component is NULL. the name field of the array must match the policy-name portion of a policy name (the part after the colon, or the complete policy name if there's no colon) specified by the user β or, again, the policy will not be run π
the func fields of the array elements are functions that are exported by the module to be called to check the password. they get the following arguments: the Kerberos context, principal, password, a tuning parameter, and a pointer to a message buffer and its length. and the tuning parameter for the quality check function is currently always NULL. noted. π
if the password is acceptable, the function returns zero. otherwise it returns non-zero and fills in the message buffer with an appropriate explanation. simple as that π
π₯ RUNNING THE CHECKS π₯
kadm5_setup_passwd_quality_checksets up type0checks. it sets up all type0checks defined inkrb5.conf(5)if called with the last two arguments null. πkadm5_add_passwd_quality_verifiersets up type1checks. it sets up all type1tests defined inkrb5.conf(5)if called with a null second argument. πkadm5_check_password_qualityruns the checks in the order in which they are defined inkrb5.conf(5)and the order in which they occur in a module'sfuncsarray β until one returns non-zero. and then it's done, bestie π
π SEE ALSO π
libtool(1), krb5(3), krb5.conf(5)
and that's the whole page fr fr π this was HEIMDAL β the February 29, 2004 edition β signing off, mwah π«Άβ¨π
π¦ 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