KDB5_LDAP_UTIL(8)
π KDB5_LDAP_UTIL(8) β the kdb5_ldap_util glow-up π
okay bestie, so this is kdb5_ldap_util, the Kerberos configuration utility from the MIT Kerberos manual, section 8. she's an admin tool, she's iconic, and she's about to manage your realms, Kerberos services and ticket policies like the queen she is. π
β¨ SYNOPSIS β¨
kdb5_ldap_util [-D user_dn [-w passwd]] [-H ldapuri] command
[command_options]
πΈ DESCRIPTION πΈ
so like, kdb5_ldap_util is the girl who lets an administrator manage realms, Kerberos services and ticket policies. that's the whole job. she does it. slay. π
π COMMAND-LINE OPTIONS π
these are the global girlies, they go before the command:
-rrealm β says which realm we're operating on, like picking your main character. β¨-Duser_dn β the Distinguished Name (DN) of the user who has sufficient rights to do the operation on the LDAP server. if you don't have the rights bestie, you're not getting in. π«Ά-wpasswd β the password of user_dn. not recommended, fr fr, don't do it. π-Hldapuri β the URI of the LDAP server. where we're connecting. that's the address. π
by default, kdb5_ldap_util operates on the default realm (as specified in krb5.conf) and connects + authenticates to the LDAP server the exact same way kadmind(8) would, given the parameters in [dbdefaults] in kdc.conf. no cap.
π COMMANDS π
π create
create [-subtrees subtree_dn_list] [-sscope search_scope]
[-containerref container_reference_dn] [-k mkeytype] [-kv mkeyVNO]
[-M mkeyname] [-m|-P password|-sf stashfilename] [-s] [-maxtktlife
max_ticket_life] [-maxrenewlife max_renewable_ticket_life]
[ticket_flags]
creates the realm in the directory. the options, bestie:
-subtreessubtree_dn_list β the list of subtrees that contain the principals of a realm. it holds the DNs of the subtree objects, separated by colon (:). β-sscopesearch_scope β the scope for searching the principals under the subtree. possible values are1orone(one level), and2orsub(subtrees). pick your vibe.-containerrefcontainer_reference_dn β the DN of the container object where the principals of a realm will be created. if the container reference isn't configured for a realm, the principals get created in the realm container. π-kmkeytype β the key type of the master key in the database. the default comes from themaster_key_typevariable inkdc.conf.-kvmkeyVNO β the version number of the master key in the database; default is1. note that0is not allowed, like at all, don't try it. π-Mmkeyname β the principal name for the master key in the database. if you don't specify it, the name is determined by themaster_key_namevariable inkdc.conf.-mβ says the master database password should be read from the TTY instead of being fetched from a file on disk. π-Ppassword β the master database password. not recommended. π«-sfstashfilename β the stash file of the master database password.-sβ says the stash file is to be created. β¨-maxtktlifemax_ticket_life β (agetdatetime string) the maximum ticket life for principals in this realm. β°-maxrenewlifemax_renewable_ticket_life β (agetdatetime string) the maximum renewable life of tickets for principals in this realm. π- ticket_flags β the global ticket flags for the realm. allowable flags are documented in the description of the
add_principalcommand inkadmin.
example, because we love a demo:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU create -subtrees o=org -sscope SUB
Password for "cn=admin,o=org":
Initializing database for realm 'ATHENA.MIT.EDU'
You will be prompted for the database Master Password.
It is important that you NOT FORGET this password.
Enter KDC database master key:
Re-enter KDC database master key to verify:
π¦ modify
modify [-subtrees subtree_dn_list] [-sscope search_scope]
[-containerref container_reference_dn] [-maxtktlife max_ticket_life]
[-maxrenewlife max_renewable_ticket_life] [ticket_flags]
modifies the attributes of a realm. glow-up time. options:
-subtreessubtree_dn_list β the list of subtrees containing the principals of a realm. it holds the DNs of the subtree objects separated by colon (:). this list replaces the existing list. β οΈ-sscopesearch_scope β the scope for searching the principals under the subtrees. possible values are1orone(one level),2orsub(subtrees).-containerrefcontainer_reference_dn β the DN of the container object in which the principals of a realm will be created.-maxtktlifemax_ticket_life β (agetdatetime string) maximum ticket life for principals in this realm. β°-maxrenewlifemax_renewable_ticket_life β (agetdatetime string) maximum renewable life of tickets for principals in this realm. π- ticket_flags β global ticket flags for the realm. allowable flags are documented in the description of the
add_principalcommand inkadmin.
example:
shell% kdb5_ldap_util -r ATHENA.MIT.EDU -D cn=admin,o=org -H
ldaps://ldap-server1.mit.edu modify +requires_preauth
Password for "cn=admin,o=org":
shell%
π view
view
displays the attributes of a realm. no options, just vibes. π
example:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU view
Password for "cn=admin,o=org":
Realm Name: ATHENA.MIT.EDU
Subtree: ou=users,o=org
Subtree: ou=servers,o=org
SearchScope: ONE
Maximum ticket life: 0 days 01:00:00
Maximum renewable life: 0 days 10:00:00
Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
π destroy
destroy [-f]
destroys an existing realm. yes, destroys. gone. options:
-fβ if specified, will not prompt the user for confirmation. (no take-backs, bestie π)
example:
shell% kdb5_ldap_util -r ATHENA.MIT.EDU -D cn=admin,o=org -H
ldaps://ldap-server1.mit.edu destroy
Password for "cn=admin,o=org":
Deleting KDC database of 'ATHENA.MIT.EDU', are you sure?
(type 'yes' to confirm)? yes
OK, deleting database of 'ATHENA.MIT.EDU'...
shell%
π list
list
lists the names of realms under the container. that's it, that's the command. β¨
example:
shell% kdb5_ldap_util -D cn=admin,o=org -H
ldaps://ldap-server1.mit.edu list
Password for "cn=admin,o=org":
ATHENA.MIT.EDU
OPENLDAP.MIT.EDU
MEDIA-LAB.MIT.EDU
shell%
π§ stashsrvpw
stashsrvpw [-f filename] name
lets an administrator store the password for a service object in a file, so that the KDC and the Administration server can use it to authenticate to the LDAP server. very useful, very demure. options:
-ffilename β the complete path of the service password file. by default,/usr/local/var/service_passwdis used. π- name β the name of the object whose password is to be stored. if
krb5kdcorkadmindare configured for simple binding, this should be the distinguished name it will use, as given by theldap_kdc_dnorldap_kadmind_dnvariable inkdc.conf. if the KDC or kadmind is configured for SASL binding, this should be the authentication name it will use, as given by theldap_kdc_sasl_authcidorldap_kadmind_sasl_authcidvariable. π«Ά
example:
kdb5_ldap_util stashsrvpw -f /home/andrew/conf_keyfile
cn=service-kdc,o=org
Password for "cn=service-kdc,o=org":
Re-enter password for "cn=service-kdc,o=org":
π create_policy
create_policy [-maxtktlife max_ticket_life] [-maxrenewlife
max_renewable_ticket_life] [ticket_flags] policy_name
creates a ticket policy in the directory. options:
-maxtktlifemax_ticket_life β (agetdatetime string) maximum ticket life for principals. β°-maxrenewlifemax_renewable_ticket_life β (agetdatetime string) maximum renewable life of tickets for principals. π- ticket_flags β the ticket flags. if this option isn't specified, then by default no restriction will be set by the policy. allowable flags are documented in the description of the
add_principalcommand inkadmin. - policy_name β the name of the ticket policy. π
example:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU create_policy -maxtktlife "1 day"
-maxrenewlife "1 week" -allow_postdated +needchange
-allow_forwardable tktpolicy
Password for "cn=admin,o=org":
π modify_policy
modify_policy [-maxtktlife max_ticket_life] [-maxrenewlife
max_renewable_ticket_life] [ticket_flags] policy_name
modifies the attributes of a ticket policy. the options are the same as for create_policy. β¨
example:
kdb5_ldap_util -D cn=admin,o=org -H
ldaps://ldap-server1.mit.edu -r ATHENA.MIT.EDU modify_policy
-maxtktlife "60 minutes" -maxrenewlife "10 hours"
+allow_postdated -requires_preauth tktpolicy
Password for "cn=admin,o=org":
πΈ view_policy
view_policy policy_name
displays the attributes of the named ticket policy. the tea. β
example:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU view_policy tktpolicy
Password for "cn=admin,o=org":
Ticket policy: tktpolicy
Maximum ticket life: 0 days 01:00:00
Maximum renewable life: 0 days 10:00:00
Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE
π₯ destroy_policy
destroy_policy [-force] policy_name
destroys an existing ticket policy. options:
-forceβ forces the deletion of the policy object. if it's not specified, the user gets prompted for confirmation before deleting the policy. β οΈ- policy_name β the name of the ticket policy.
example:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU destroy_policy tktpolicy
Password for "cn=admin,o=org":
This will delete the policy object 'tktpolicy', are you sure?
(type 'yes' to confirm)? yes
** policy object 'tktpolicy' deleted.
β list_policy
list_policy
lists ticket policies. short, sweet, iconic. π
example:
kdb5_ldap_util -D cn=admin,o=org -H ldaps://ldap-server1.mit.edu
-r ATHENA.MIT.EDU list_policy
Password for "cn=admin,o=org":
tktpolicy
tmppolicy
userpolicy
π ENVIRONMENT π
see kerberos for a description of the Kerberos environment variables. that's the whole section, bestie, go read it. π¦
π SEE ALSO π
kadmin, kerberos
βοΈ AUTHOR βοΈ
MIT. that's the author. MIT did that. π
π COPYRIGHT π
1985-2026, MIT
okay so that's the whole page!! you now know every single flag, every example, every default, every DN, and every warning. i'm so proud of you, fr fr. go configure a realm. π«Άβ¨
this whole thing is from MIT Kerberos, version 1.22.2, and yeah, she lives in the KDB5_LDAP_UTIL(8) section of the manual. mwah. ππ
π¦ where this page comes from
- alpine 3.24: krb5-doc 1.22.2-r1 Β· MIT
- arch rolling: krb5 1.22.2-1 Β· custom
- fedora 43: krb5-server-ldap 1.22.2-4.fc43 Β· Brian-Gladman-2-Clause AND BSD-2-Clause AND (BSD-2-Clause OR GPL-2.0-or-later) AND BSD-2-Clause-first-lines AND BSD-3-Clause AND BSD-4-Clause AND CMU-Mach-nodoc AND FSFULLRWD AND HPND AND HPND-export2-US AND HPND-export-US AND HPND-export-US-acknowledgement AND HPND-export-US-modify AND ISC AND MIT AND MIT-CMU AND OLDAP-2.8 AND OpenVision
- nixos 26.05: krb5 1.22.2
- nixpkgs unstable: krb5 1.22.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms