KADMIN(1) | MIT Kerberos | KADMIN(1) |
kadmin - Kerberos V5 database administration program
kadmin [-O|-N] [-r realm] [-p principal] [-q query] [[-c cache_name]|[-k [-t keytab]]|-n] [-w password] [-s admin_server[:port]] [command args...]
kadmin.local [-r realm] [-p principal] [-q query] [-d dbname] [-e enc:salt ...] [-m] [-x db_args] [command args...]
kadmin and kadmin.local are command-line interfaces to the Kerberos V5 administration system. They provide nearly identical functionalities; the difference is that kadmin.local directly accesses the KDC database, while kadmin performs operations using kadmind(8). Except as explicitly noted otherwise, this man page will use "kadmin" to refer to both versions. kadmin provides for the maintenance of Kerberos principals, password policies, and service key tables (keytabs).
The remote kadmin client uses Kerberos to authenticate to kadmind using the service principal kadmin/admin or kadmin/ADMINHOST (where ADMINHOST is the fully-qualified hostname of the admin server). If the credentials cache contains a ticket for one of these principals, and the -c credentials_cache option is specified, that ticket is used to authenticate to kadmind. Otherwise, the -p and -k options are used to specify the client Kerberos principal name used to authenticate. Once kadmin has determined the principal name, it requests a service ticket from the KDC, and uses that service ticket to authenticate to kadmind.
Since kadmin.local directly accesses the KDC database, it usually must be run directly on the primary KDC with sufficient permissions to read the KDC database. If the KDC database uses the LDAP database module, kadmin.local can be run on any host which can access the LDAP server.
Starting with release 1.14, if any command-line arguments remain after the options, they will be treated as a single query to be executed. This mode of operation is intended for scripts and behaves differently from the interactive mode in several respects:
The -q option does not carry these behavior differences; the query will be processed as if it was entered interactively. The -q option cannot be used in combination with a query in the remaining arguments.
Database options can be used to override database-specific defaults. Supported options for the DB2 module are:
Supported options for the LDAP module are:
When using the remote client, available commands may be restricted according to the privileges specified in the kadm5.acl(5) file on the admin server.
Creates the principal newprinc, prompting twice for a password. If no password policy is specified with the -policy option, and the policy named default is assigned to the principal if it exists. However, creating a policy named default will not automatically assign this policy to previously existing principals. This policy assignment can be suppressed with the -clearpolicy option.
This command requires the add privilege.
Aliases: addprinc, ank
Options:
NOTE:
Example:
kadmin: addprinc jennifer No policy specified for "jennifer@ATHENA.MIT.EDU"; defaulting to no policy. Enter password for principal jennifer@ATHENA.MIT.EDU: Re-enter password for principal jennifer@ATHENA.MIT.EDU: Principal "jennifer@ATHENA.MIT.EDU" created. kadmin:
Modifies the specified principal, changing the fields as specified. The options to add_principal also apply to this command, except for the -randkey, -pw, and -e options. In addition, the option -clearpolicy will clear the current policy of a principal.
This command requires the modify privilege.
Alias: modprinc
Options (in addition to the addprinc options):
Renames the specified old_principal to new_principal. This command prompts for confirmation, unless the -force option is given.
This command requires the add and delete privileges.
Alias: renprinc
Deletes the specified principal from the database. This command prompts for deletion, unless the -force option is given.
This command requires the delete privilege.
Alias: delprinc
Changes the password of principal. Prompts for a new password if neither -randkey or -pw is specified.
This command requires the changepw privilege, or that the principal running the program is the same as the principal being changed.
Alias: cpw
The following options are available:
Example:
kadmin: cpw systest Enter password for principal systest@BLEEP.COM: Re-enter password for principal systest@BLEEP.COM: Password for systest@BLEEP.COM changed. kadmin:
Purges previously retained old keys (e.g., from change_password -keepold) from principal. If -keepkvno is specified, then only purges keys with kvnos lower than oldest_kvno_to_keep. If -all is specified, then all keys are purged. The -all option is new in release 1.12.
This command requires the modify privilege.
Gets the attributes of principal. With the -terse option, outputs fields as quoted tab-separated strings.
This command requires the inquire privilege, or that the principal running the the program to be the same as the one being listed.
Alias: getprinc
Examples:
kadmin: getprinc tlyu/admin Principal: tlyu/admin@BLEEP.COM Expiration date: [never] Last password change: Mon Aug 12 14:16:47 EDT 1996 Password expiration date: [never] Maximum ticket life: 0 days 10:00:00 Maximum renewable life: 7 days 00:00:00 Last modified: Mon Aug 12 14:16:47 EDT 1996 (bjaspan/admin@BLEEP.COM) Last successful authentication: [never] Last failed authentication: [never] Failed password attempts: 0 Number of keys: 1 Key: vno 1, aes256-cts-hmac-sha384-192 MKey: vno 1 Attributes: Policy: [none] kadmin: getprinc -terse systest systest@BLEEP.COM 3 86400 604800 1 785926535 753241234 785900000 tlyu/admin@BLEEP.COM 786100034 0 0 kadmin:
Retrieves all or some principal names. expression is a shell-style glob expression that can contain the wild-card characters ?, *, and []. All principal names matching the expression are printed. If no expression is provided, all principal names are printed. If the expression does not contain an @ character, an @ character followed by the local realm is appended to the expression.
This command requires the list privilege.
Alias: listprincs, get_principals, getprincs
Example:
kadmin: listprincs test* test3@SECURE-TEST.OV.COM test2@SECURE-TEST.OV.COM test1@SECURE-TEST.OV.COM testuser@SECURE-TEST.OV.COM kadmin:
Displays string attributes on principal.
This command requires the inquire privilege.
Alias: getstrs
Sets a string attribute on principal. String attributes are used to supply per-principal configuration to the KDC and some KDC plugin modules. The following string attribute names are recognized by the KDC:
This command requires the modify privilege.
Alias: setstr
Example:
set_string host/foo.mit.edu session_enctypes aes128-cts set_string user@FOO.COM otp "[{""type"":""hotp"",""username"":""al""}]"
Deletes a string attribute from principal.
This command requires the delete privilege.
Alias: delstr
Adds a password policy named policy to the database.
This command requires the add privilege.
Alias: addpol
The following options are available:
Example:
kadmin: add_policy -maxlife "2 days" -minlength 5 guests kadmin:
Modifies the password policy named policy. Options are as described for add_policy.
This command requires the modify privilege.
Alias: modpol
Deletes the password policy named policy. Prompts for confirmation before deletion. The command will fail if the policy is in use by any principals.
This command requires the delete privilege.
Alias: delpol
Example:
kadmin: del_policy guests Are you sure you want to delete the policy "guests"? (yes/no): yes kadmin:
Displays the values of the password policy named policy. With the -terse flag, outputs the fields as quoted strings separated by tabs.
This command requires the inquire privilege.
Alias: getpol
Examples:
kadmin: get_policy admin Policy: admin Maximum password life: 180 days 00:00:00 Minimum password life: 00:00:00 Minimum password length: 6 Minimum number of password character classes: 2 Number of old keys kept: 5 Reference count: 17 kadmin: get_policy -terse admin admin 15552000 0 6 2 5 17 kadmin:
The "Reference count" is the number of principals using that policy. With the LDAP KDC database module, the reference count field is not meaningful.
Retrieves all or some policy names. expression is a shell-style glob expression that can contain the wild-card characters ?, *, and []. All policy names matching the expression are printed. If no expression is provided, all existing policy names are printed.
This command requires the list privilege.
Aliases: listpols, get_policies, getpols.
Examples:
kadmin: listpols test-pol dict-only once-a-min test-pol-nopw kadmin: listpols t* test-pol test-pol-nopw kadmin:
ktadd [options] principal ktadd [options] -glob princ-exp
Adds a principal, or all principals matching princ-exp, to a keytab file. Each principal's keys are randomized in the process. The rules for princ-exp are described in the list_principals command.
This command requires the inquire and changepw privileges. With the -glob form, it also requires the list privilege.
The options are:
An entry for each of the principal's unique encryption types is added, ignoring multiple keys with the same encryption type but different salt types.
Alias: xst
Example:
kadmin: ktadd -k /tmp/foo-new-keytab host/foo.mit.edu Entry for principal host/foo.mit.edu@ATHENA.MIT.EDU with kvno 3, encryption type aes256-cts-hmac-sha1-96 added to keytab FILE:/tmp/foo-new-keytab kadmin:
Removes entries for the specified principal from a keytab. Requires no permissions, since this does not require database access.
If the string "all" is specified, all entries for that principal are removed; if the string "old" is specified, all entries for that principal except those with the highest kvno are removed. Otherwise, the value specified is parsed as an integer, and all entries whose kvno match that integer are removed.
The options are:
Alias: ktrem
Example:
kadmin: ktremove kadmin/admin all Entry for principal kadmin/admin with kvno 3 removed from keytab FILE:/etc/krb5.keytab kadmin:
Lock database exclusively. Use with extreme caution! This command only works with the DB2 KDC database module.
Release the exclusive database lock.
Lists available for kadmin requests.
Aliases: lr, ?
Exit program. If the database was locked, the lock is released.
Aliases: exit, q
The kadmin program was originally written by Tom Yu at MIT, as an interface to the OpenVision Kerberos administration program.
See kerberos(7) for a description of Kerberos environment variables.
kpasswd(1), kadmind(8), kerberos(7)
MIT
1985-2022, MIT
1.20.1 |