KADMIN(1)

NAME
kadmin - Kerberos administration utility

SYNOPSIS
kadmin [-p string - -principal=string] [-K string - -keytab=string] [-c file - -config-file=file] [-k file - -key-file=file] [-r realm - -realm=realm] [-a host - -admin-server=host] [-s port number - -server-port=port number] [-l | - -local] [-h | - -help] [-v | - -version] [command]

DESCRIPTION
The kadmin program is used to make modifications to the Kerberos database, either remotely via the kadmind(8) daemon, or locally (with the -l option).

Supported options:

-p string, - -principal=string
    principal to authenticate as

-K string, - -keytab=string
    keytab for authentication principal

-c file, - -config-file=file
    location of config file

-H HDB, - -hdb=HDB
    location of HDB

-k file, - -key-file=file
    location of master key file

-r realm, - -realm=realm
    realm to use

-a host, - -admin-server=host
    server to contact

-s port number, - -server-port=port number
    port to use

-l, - -local
    local admin mode

If no command is given on the command line, kadmin will prompt for commands to process. Some of the commands that take one or more principals as argument (delete, ext_keytab, get, modify, and passwd) will accept a glob style wildcard, and perform the operation on all matching principals.

Commands include:

add [-r | - -random-key] [- -enctypes=string] [- -random-password] [-p string - -password=string] [- -key=string] [- -max-ticket-life=lifetime] [- -max-renewable-life=lifetime] [- -attributes=attributes] [- -expiration-time=time] [- -pw-expiration-time=time] [- -policy=policy-name] [- -use-defaults] principal...

Adds a new principal to the database. The options not passed on the command line will be promped for. If enctypes to use are not given, then the [libdefaults] supported_enctypes configuration parameter will be used on the client side to select enctypes, defaulting to aes128-cts-hmac-sha1-96. For compatibility with MIT, the enctypes string is a space- or comma-separated list of enctype:salttype. If - -keepold is given, then old keys needed to decrypt extant tickets are kept, and all other old keys are deleted. If - -keepallold is given then all old keys are kept. If - -pruneall -is -given -then -all -old -keys -are -removed. The - -keepold behavior is the default if none of these are given. The only policy supported by Heimdal servers is ‘default’.

If some parameters are not given then they will be prompted for unless the - -use-defaults option is given, in which case defaults will be taken from the principal named “default”.

This command has the following aliases: ank, add_new_key.

add_alias principal alias...

Adds one or more aliases to the given principal.

There are two types of aliases: hard, and soft. A soft alias is an alias of a principal of the form WELLKNOWN/REFERRALS/TARGET@target_realm or WELLKNOWN/REFERRALS/TARGET/arbitrary-component@target_realm. A hard alias is an alias of any normal principal, even if in a different realm.

Hard aliases are treated as distinct principals sharing attributes and keys with their canonical principals. If a client requests canonicalization of a hard alias name, the KDC will use the canonical name in the ticket issued as long as the alias and canonical names are in the same realm. Conversely, if a client does not request canonicalization, or if the hard alias and the canonical name have different realms, then the KDC will issue a ticket for the alias name.

Soft aliases can only be used to configure the production of referrals by the KDC. When a client requests a ticket for a principal that turns out to be a soft alias, the KDC will respond with a referral to the alias' canonical name's realm.

Soft aliasing compares favorably to using [domain_realm] entries in the KDC's krb5.conf: soft aliases may be managed via the kadmin command and its add_alias and del_alias sub-commands rather than having to edit the KDC's configuration file and having to restart the KDC.

There are two methods for configuring the issuance of referrals for entire namespaces of hostnames. A soft alias of the form WELLKNOWN/HOSTBASED-NAMESPACE/service/namespace-fqdn@REALM (see add_namespace below) will cause all requests for host-based principals in the given namespace to be referred to the given realm. Alternatively, the KDC will issue referrals for all host-based service principals whose hostname component matches a [domain_realm] entry in the KDC's krb5.conf file referring to a different realm.

add_namespace file ... - -key-rotation-epoch=time file ... - -key-rotation-period=time [- -enctypes=string] [- -max-ticket-life=lifetime] [- -max-renewable-life=lifetime] [- -attributes=attributes] host-based-principal...

Adds a new namespace of virtual host-based or domain-based principals to the database, whose keys will be automatically derived from base keys stored in the namespace record, and which keys will be rotated automatically. The namespace names are of the same form as host-based principal names: service/hostname@REALM and these will match all host-based or domain-based service names where hostname component of such a principal ends in the labels of the hostname in the namespace name.

The service name component may be a wild-card (underscore, _ ), in which case it will match any service.

For example, bar.baz.example@BAZ.EXAMPLE will match host/foo.bar.baz.example@BAZ.EXAMPLE but not host/foobar.baz.example@BAZ.EXAMPLE.

Note well that services are expected to ext_keytab or otherwise re-fetch their keytabs at least as often as one quarter of the key rotation period, otherwise they risk not having keys they need to decrypt tickets with.

The epoch must be given as either an absolute time, now, or as +<N>[<unit>] where N is a natural and unit is one "s", "m", "h", "day", "week", "month", defaulting to "month". The default key rotation period is 7d. The default enctypes is as for the add command.

Note that namespaces are stored as principals whose names are of the form WELLKNOWN/HOSTBASED-NAMESPACE/service/namespace.fqdn@REALM, with the service

This command has the following alias: add_ns.

add_enctype [-r | - -random-key] principal enctypes...

Adds a new encryption type to the principal, only random key are supported.

delete principal...

Removes a principal. It is an error to delete an alias. To remove a principal's alias or aliases, use the del_alias command. To remove a principal given an alias, first get the principal to get its canonical name and then delete that.

del_alias alias...

Deletes the given aliases, but not their canonical principals.

This command has the following aliases: del, del_entry.

del_enctype principal enctypes...

Removes some enctypes from a principal; this can be useful if the service belonging to the principal is known to not handle certain enctypes.

prune [- -kvno=number] principal

Deletes the named principal's keys of the given kvno. If a kvno is not given then this deletes all the named principal's keys that are too old to be needed for decrypting tickets issued using those keys (i.e., any such tickets are necessarily expired). The determination of "too old" is made using the max-ticket-life attribute of the principal; though in practice that max ticket life is also constrained by the max-ticket-life of the client principals and the krbtgt principals, those are not consulted here.

ext_keytab [-k keytab [- -random-key] [- -keepold | - -keepallold | - -pruneall] [- -enctypes=string] - -keytab=string] principal...

Creates a keytab with the keys of the specified principals. Requires get-keys rights, otherwise the principal's keys are changed and saved in the keytab.

If the - -random-key option is given then new randomly-generated keys will be set on the principal.

If enctypes to use are not given, then the [libdefaults] supported_enctypes configuration parameter will be used on the client side to select enctypes, defaulting to aes128-cts-hmac-sha1-96. For compatibility with MIT, the enctypes string is a space- or comma-separated list of enctype:salttype. If - -keepold is given, then old keys needed to decrypt extant tickets are kept, and all other old keys are deleted. If - -keepallold is given then all old keys are kept. If - -pruneall -is -given -then -all -old -keys -are -removed. The - -keepold behavior is the default if none of these are given.

get [-l | - -long] [-s | - -short] [-t | - -terse] [-o string | - -column-info=string] [-C path | - -krb5-config-file=path] [- -upto=number] principal...

Lists the matching principals, short prints the result as a table, while long format produces a more verbose output. If the - -upto=number option is given, then only up to that many principals will be listed.

Which columns to print can be selected with the -o option. The argument is a comma separated list of column names optionally appended with an equal sign (‘=’) and a column header. Which columns are printed by default differ slightly between short and long output.

The default terse output format is similar to -s -o principal=, just printing the names of matched principals.

If -C or - -krb5-config-file is given and the principal has krb5 config file contents saved in its HDB entry, then that will be saved in the given file. Note that if multiple principals are requested, then the second, third, and so on will have -1, -2, and so on appended to the given filename unless the given filename is a device name.

Possible column names include: principal, princ_expire_time, pw_expiration, last_pwd_change, max_life, max_rlife, mod_time, mod_name, attributes, kvno, mkvno, last_success, last_failed, fail_auth_count, policy, and keytypes.

modify [-a attributes - -attributes=attributes] [- -max-ticket-life=lifetime] [- -max-renewable-life=lifetime] [- -expiration-time=time] [- -pw-expiration-time=time] [- -kvno=number] [- -policy=policy-name] [- -alias=alias-name] [- -constrained-delegation=principal-name] [- -pkinit-acl=subject-name] [- -service-enctypes=enctype] [-C path | - -krb5-config-file=path] principal...

Modifies certain attributes of a principal. If run without command line options, you will be prompted. With command line options, it will only change the ones specified.

The - -alias=alias-name option may be given multiple times. If this option is used at all, the complete list of aliases must be given, with one option per-alias. If the list given has fewer aliases than the principal had prior to the modification, then the missing aliases will be deleted.

Use the add_alias command instead to add an alias to avoid having to list all existing aliases to keep.

The - -alias= option without a value allows the user to set an empty list of aliases. Use the del_alias command to delete one or more aliases.

The only policy supported by Heimdal is ‘default’.

If a krb5 config file is given, it will be saved in the entry.

Possible attributes are:

new-princ
    not used

support-desmd5
    not used

pwchange-service
    for kadmin/admin style service principals

requires-pw-change
    force the user to change their password

requires-hw-auth

requires-pre-auth

allow-digest
    allow NTLM for this user in the KDC's digest service

trusted-for-delegation

ok-as-delegate
    allow forwarding of tickets to this service principal

disallow-client
    disallow issuance of tickets for this principal as a client

disallow-svr
    disallow issuance of tickets for this principal as a server

disallow-all-tix
    disallow issuance of tickets for this principal as a client or server

disallow-dup-skey
    not used

disallow-proxiable
    disallow proxiable tickets

disallow-renewable,
    disallow reneable tickets

disallow-tgt-based,
    require initial tickets for this service, such as password changing services

disallow-forwardable
    disallow forwardable tickets

disallow-postdated
    disallow postdated tickets

no-auth-data-reqd
    do not include a PAC in tickets issued to this service

auth-data-reqd
    do include a PAC in tickets issued to this service even if the disable_pac KDC configuration parameter is set to true

Attributes may be negated with a "-", e.g.,

kadmin -l modify -a -disallow-proxiable user

The - -constrained-delegation=principal-name option is not currently implemented.

The - -pkinit-acl=subject-name option authorizes clients with certificates with the given subject distinguished name to get tickets for the principal using PKINIT. This option can be given multiple times. The PKINIT ACLs set with this option will replace the existing ones.

The - -service-enctypes=enctype option indicates that the service supports the given enctype regardless of whether the service has long-term keys of that enctype. This option can be given multiple times and will replace the existing set of enctypes supported by the service. If a service principal does not have any supported enctypes then the KDC will assume that it supports only the enctypes of all of its long-term keys.

This command has the following alias: mod.

passwd [- -keepold | - -keepallold | - -pruneall] [- -enctypes=string] [-r | - -random-key] [- -random-password] [-p string - -password=string] [- -key=string] principal...

Changes the password of an existing principal. If enctypes to use are not given, then the [libdefaults] supported_enctypes configuration parameter will be used on the client side to select enctypes, defaulting to aes128-cts-hmac-sha1-96. For compatibility with MIT, the enctypes string is a space- or comma-separated list of enctype:salttype. If - -keepold is given, then old keys needed to decrypt extant tickets are kept, and all other old keys are deleted. If - -keepallold is given then all old keys are kept. If - -pruneall -is -given -then -all -old -keys -are -removed. The - -keepold behavior is the default if none of these are given.

This command has the following aliases: cpw, change_password.

verify-password-quality principal password

Run the password quality check function locally. You can run this on the host that is configured to run the kadmind process to verify that your configuration file is correct. The verification is done locally, if kadmin is run in remote mode, no rpc call is done to the server. NOTE: if the environment has verify-password-quality configured to use a back-end that stores password history (such as heimdal-history), running verify-quality-password will cause an update to the password database meaning that merely verifying the quality of the password using verify-quality-password invalidates the use of that principal/password in the future.

This command has the following alias: pwq.

privileges

Lists the operations you are allowed to perform. These include add, add_enctype, change-password, delete, del_enctype, get, get-keys, list, and modify.

This command has the following alias: privs.

rename from to

Renames a principal. This is normally transparent, but since keys are salted with the principal name, they will have a non-standard salt, and clients which are unable to cope with this will fail. Kerberos 4 suffers from this.

check [realm]

Check database for strange configurations on important principals. If no realm is given, the default realm is used.

When running in local mode, the following commands can also be used:

dump [-d | - -decrypt] [-fformat | - -format=format] [dump-file]

Writes the database in “machine readable text” form to the specified file, or standard out. If the database is encrypted, the dump will also have encrypted keys, unless - -decrypt is used. If - -format=MIT is used then the dump will be in MIT format. Otherwise it will be in Heimdal format.

init [- -realm-max-ticket-life=string] [- -realm-max-renewable-life=string] [- -bare] realm

Initializes the Kerberos database with entries for a new realm. It's possible to have more than one realm served by one server with the same database.

If the - -bare option is given, then only the root krbtgt principal for that realm will be created.

load file

Reads a previously dumped database, and re-creates that database from scratch.

merge file

Similar to load but just modifies the database with the entries in the dump file.

stash [-e enctype - -enctype=enctype] [-k keyfile - -key-file=keyfile] [- -convert-file] [- -master-key-fd=fd] [- -random-password]

Writes the Kerberos master key to a file used by the KDC.

If the - -convert-file option is given then convert an existing file to the new format. If the - -master-key-fd=fd option is given the the password will be read from the given file descriptor. If the - -random-password option is given then a password will be generated randomly.

This command has the following alias: kstash.

exit

Exits kadmin.

This command has the following alias: quit.

ENVIRONMENT
KADMIN_USE_GET_PRINCIPALS, if set to any non-empty value then it uses a slower RPC to list principals when talking to a remote kadmind server. This is useful when the server is an older version of Heimdal.

SEE ALSO
kadmind(8), kdc(8)