| 1 |
.. _kadmin(1): |
| 2 |
|
| 3 |
kadmin |
| 4 |
====== |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
-------- |
| 8 |
|
| 9 |
.. _kadmin_synopsis: |
| 10 |
|
| 11 |
**kadmin** |
| 12 |
[**-O**\|\ **-N**] |
| 13 |
[**-r** *realm*] |
| 14 |
[**-p** *principal*] |
| 15 |
[**-q** *query*] |
| 16 |
[[**-c** *cache_name*]\|[**-k** [**-t** *keytab*]]\|\ **-n**] |
| 17 |
[**-w** *password*] |
| 18 |
[**-s** *admin_server*\ [:*port*]] |
| 19 |
[command args...] |
| 20 |
|
| 21 |
**kadmin.local** |
| 22 |
[**-r** *realm*] |
| 23 |
[**-p** *principal*] |
| 24 |
[**-q** *query*] |
| 25 |
[**-d** *dbname*] |
| 26 |
[**-e** *enc*:*salt* ...] |
| 27 |
[**-m**] |
| 28 |
[**-x** *db_args*] |
| 29 |
[command args...] |
| 30 |
|
| 31 |
|
| 32 |
DESCRIPTION |
| 33 |
----------- |
| 34 |
|
| 35 |
kadmin and kadmin.local are command-line interfaces to the Kerberos V5 |
| 36 |
administration system. They provide nearly identical functionalities; |
| 37 |
the difference is that kadmin.local directly accesses the KDC |
| 38 |
database, while kadmin performs operations using :ref:`kadmind(8)`. |
| 39 |
Except as explicitly noted otherwise, this man page will use "kadmin" |
| 40 |
to refer to both versions. kadmin provides for the maintenance of |
| 41 |
Kerberos principals, password policies, and service key tables |
| 42 |
(keytabs). |
| 43 |
|
| 44 |
The remote kadmin client uses Kerberos to authenticate to kadmind |
| 45 |
using the service principal ``kadmin/admin`` or ``kadmin/ADMINHOST`` |
| 46 |
(where *ADMINHOST* is the fully-qualified hostname of the admin |
| 47 |
server). If the credentials cache contains a ticket for one of these |
| 48 |
principals, and the **-c** credentials_cache option is specified, that |
| 49 |
ticket is used to authenticate to kadmind. Otherwise, the **-p** and |
| 50 |
**-k** options are used to specify the client Kerberos principal name |
| 51 |
used to authenticate. Once kadmin has determined the principal name, |
| 52 |
it requests a service ticket from the KDC, and uses that service |
| 53 |
ticket to authenticate to kadmind. |
| 54 |
|
| 55 |
Since kadmin.local directly accesses the KDC database, it usually must |
| 56 |
be run directly on the primary KDC with sufficient permissions to read |
| 57 |
the KDC database. If the KDC database uses the LDAP database module, |
| 58 |
kadmin.local can be run on any host which can access the LDAP server. |
| 59 |
|
| 60 |
|
| 61 |
OPTIONS |
| 62 |
------- |
| 63 |
|
| 64 |
.. _kadmin_options: |
| 65 |
|
| 66 |
**-r** *realm* |
| 67 |
Use *realm* as the default database realm. |
| 68 |
|
| 69 |
**-p** *principal* |
| 70 |
Use *principal* to authenticate. Otherwise, kadmin will append |
| 71 |
``/admin`` to the primary principal name of the default ccache, |
| 72 |
the value of the **USER** environment variable, or the username as |
| 73 |
obtained with getpwuid, in order of preference. |
| 74 |
|
| 75 |
**-k** |
| 76 |
Use a keytab to decrypt the KDC response instead of prompting for |
| 77 |
a password. In this case, the default principal will be |
| 78 |
``host/hostname``. If there is no keytab specified with the |
| 79 |
**-t** option, then the default keytab will be used. |
| 80 |
|
| 81 |
**-t** *keytab* |
| 82 |
Use *keytab* to decrypt the KDC response. This can only be used |
| 83 |
with the **-k** option. |
| 84 |
|
| 85 |
**-n** |
| 86 |
Requests anonymous processing. Two types of anonymous principals |
| 87 |
are supported. For fully anonymous Kerberos, configure PKINIT on |
| 88 |
the KDC and configure **pkinit_anchors** in the client's |
| 89 |
:ref:`krb5.conf(5)`. Then use the **-n** option with a principal |
| 90 |
of the form ``@REALM`` (an empty principal name followed by the |
| 91 |
at-sign and a realm name). If permitted by the KDC, an anonymous |
| 92 |
ticket will be returned. A second form of anonymous tickets is |
| 93 |
supported; these realm-exposed tickets hide the identity of the |
| 94 |
client but not the client's realm. For this mode, use ``kinit |
| 95 |
-n`` with a normal principal name. If supported by the KDC, the |
| 96 |
principal (but not realm) will be replaced by the anonymous |
| 97 |
principal. As of release 1.8, the MIT Kerberos KDC only supports |
| 98 |
fully anonymous operation. |
| 99 |
|
| 100 |
**-c** *credentials_cache* |
| 101 |
Use *credentials_cache* as the credentials cache. The cache |
| 102 |
should contain a service ticket for the ``kadmin/admin`` or |
| 103 |
``kadmin/ADMINHOST`` (where *ADMINHOST* is the fully-qualified |
| 104 |
hostname of the admin server) service; it can be acquired with the |
| 105 |
:ref:`kinit(1)` program. If this option is not specified, kadmin |
| 106 |
requests a new service ticket from the KDC, and stores it in its |
| 107 |
own temporary ccache. |
| 108 |
|
| 109 |
**-w** *password* |
| 110 |
Use *password* instead of prompting for one. Use this option with |
| 111 |
care, as it may expose the password to other users on the system |
| 112 |
via the process list. |
| 113 |
|
| 114 |
**-q** *query* |
| 115 |
Perform the specified query and then exit. |
| 116 |
|
| 117 |
**-d** *dbname* |
| 118 |
Specifies the name of the KDC database. This option does not |
| 119 |
apply to the LDAP database module. |
| 120 |
|
| 121 |
**-s** *admin_server*\ [:*port*] |
| 122 |
Specifies the admin server which kadmin should contact. |
| 123 |
|
| 124 |
**-m** |
| 125 |
If using kadmin.local, prompt for the database master password |
| 126 |
instead of reading it from a stash file. |
| 127 |
|
| 128 |
**-e** "*enc*:*salt* ..." |
| 129 |
Sets the keysalt list to be used for any new keys created. See |
| 130 |
:ref:`Keysalt_lists` in :ref:`kdc.conf(5)` for a list of possible |
| 131 |
values. |
| 132 |
|
| 133 |
**-O** |
| 134 |
Force use of old AUTH_GSSAPI authentication flavor. |
| 135 |
|
| 136 |
**-N** |
| 137 |
Prevent fallback to AUTH_GSSAPI authentication flavor. |
| 138 |
|
| 139 |
**-x** *db_args* |
| 140 |
Specifies the database specific arguments. See the next section |
| 141 |
for supported options. |
| 142 |
|
| 143 |
Starting with release 1.14, if any command-line arguments remain after |
| 144 |
the options, they will be treated as a single query to be executed. |
| 145 |
This mode of operation is intended for scripts and behaves differently |
| 146 |
from the interactive mode in several respects: |
| 147 |
|
| 148 |
* Query arguments are split by the shell, not by kadmin. |
| 149 |
* Informational and warning messages are suppressed. Error messages |
| 150 |
and query output (e.g. for **get_principal**) will still be |
| 151 |
displayed. |
| 152 |
* Confirmation prompts are disabled (as if **-force** was given). |
| 153 |
Password prompts will still be issued as required. |
| 154 |
* The exit status will be non-zero if the query fails. |
| 155 |
|
| 156 |
The **-q** option does not carry these behavior differences; the query |
| 157 |
will be processed as if it was entered interactively. The **-q** |
| 158 |
option cannot be used in combination with a query in the remaining |
| 159 |
arguments. |
| 160 |
|
| 161 |
.. _dboptions: |
| 162 |
|
| 163 |
DATABASE OPTIONS |
| 164 |
---------------- |
| 165 |
|
| 166 |
Database options can be used to override database-specific defaults. |
| 167 |
Supported options for the DB2 module are: |
| 168 |
|
| 169 |
**-x dbname=**\ \*filename* |
| 170 |
Specifies the base filename of the DB2 database. |
| 171 |
|
| 172 |
**-x lockiter** |
| 173 |
Make iteration operations hold the lock for the duration of |
| 174 |
the entire operation, rather than temporarily releasing the |
| 175 |
lock while handling each principal. This is the default |
| 176 |
behavior, but this option exists to allow command line |
| 177 |
override of a [dbmodules] setting. First introduced in |
| 178 |
release 1.13. |
| 179 |
|
| 180 |
**-x unlockiter** |
| 181 |
Make iteration operations unlock the database for each |
| 182 |
principal, instead of holding the lock for the duration of the |
| 183 |
entire operation. First introduced in release 1.13. |
| 184 |
|
| 185 |
Supported options for the LDAP module are: |
| 186 |
|
| 187 |
**-x host=**\ *ldapuri* |
| 188 |
Specifies the LDAP server to connect to by a LDAP URI. |
| 189 |
|
| 190 |
**-x binddn=**\ *bind_dn* |
| 191 |
Specifies the DN used to bind to the LDAP server. |
| 192 |
|
| 193 |
**-x bindpwd=**\ *password* |
| 194 |
Specifies the password or SASL secret used to bind to the LDAP |
| 195 |
server. Using this option may expose the password to other |
| 196 |
users on the system via the process list; to avoid this, |
| 197 |
instead stash the password using the **stashsrvpw** command of |
| 198 |
:ref:`kdb5_ldap_util(8)`. |
| 199 |
|
| 200 |
**-x sasl_mech=**\ *mechanism* |
| 201 |
Specifies the SASL mechanism used to bind to the LDAP server. |
| 202 |
The bind DN is ignored if a SASL mechanism is used. New in |
| 203 |
release 1.13. |
| 204 |
|
| 205 |
**-x sasl_authcid=**\ *name* |
| 206 |
Specifies the authentication name used when binding to the |
| 207 |
LDAP server with a SASL mechanism, if the mechanism requires |
| 208 |
one. New in release 1.13. |
| 209 |
|
| 210 |
**-x sasl_authzid=**\ *name* |
| 211 |
Specifies the authorization name used when binding to the LDAP |
| 212 |
server with a SASL mechanism. New in release 1.13. |
| 213 |
|
| 214 |
**-x sasl_realm=**\ *realm* |
| 215 |
Specifies the realm used when binding to the LDAP server with |
| 216 |
a SASL mechanism, if the mechanism uses one. New in release |
| 217 |
1.13. |
| 218 |
|
| 219 |
**-x debug=**\ *level* |
| 220 |
sets the OpenLDAP client library debug level. *level* is an |
| 221 |
integer to be interpreted by the library. Debugging messages |
| 222 |
are printed to standard error. New in release 1.12. |
| 223 |
|
| 224 |
|
| 225 |
COMMANDS |
| 226 |
-------- |
| 227 |
|
| 228 |
When using the remote client, available commands may be restricted |
| 229 |
according to the privileges specified in the :ref:`kadm5.acl(5)` file |
| 230 |
on the admin server. |
| 231 |
|
| 232 |
.. _add_principal: |
| 233 |
|
| 234 |
add_principal |
| 235 |
~~~~~~~~~~~~~ |
| 236 |
|
| 237 |
**add_principal** [*options*] *newprinc* |
| 238 |
|
| 239 |
Creates the principal *newprinc*, prompting twice for a password. If |
| 240 |
no password policy is specified with the **-policy** option, and the |
| 241 |
policy named ``default`` is assigned to the principal if it exists. |
| 242 |
However, creating a policy named ``default`` will not automatically |
| 243 |
assign this policy to previously existing principals. This policy |
| 244 |
assignment can be suppressed with the **-clearpolicy** option. |
| 245 |
|
| 246 |
This command requires the **add** privilege. |
| 247 |
|
| 248 |
Aliases: **addprinc**, **ank** |
| 249 |
|
| 250 |
Options: |
| 251 |
|
| 252 |
**-expire** *expdate* |
| 253 |
(:ref:`getdate` string) The expiration date of the principal. |
| 254 |
|
| 255 |
**-pwexpire** *pwexpdate* |
| 256 |
(:ref:`getdate` string) The password expiration date. |
| 257 |
|
| 258 |
**-maxlife** *maxlife* |
| 259 |
(:ref:`duration` or :ref:`getdate` string) The maximum ticket life |
| 260 |
for the principal. |
| 261 |
|
| 262 |
**-maxrenewlife** *maxrenewlife* |
| 263 |
(:ref:`duration` or :ref:`getdate` string) The maximum renewable |
| 264 |
life of tickets for the principal. |
| 265 |
|
| 266 |
**-kvno** *kvno* |
| 267 |
The initial key version number. |
| 268 |
|
| 269 |
**-policy** *policy* |
| 270 |
The password policy used by this principal. If not specified, the |
| 271 |
policy ``default`` is used if it exists (unless **-clearpolicy** |
| 272 |
is specified). |
| 273 |
|
| 274 |
**-clearpolicy** |
| 275 |
Prevents any policy from being assigned when **-policy** is not |
| 276 |
specified. |
| 277 |
|
| 278 |
{-\|+}\ **allow_postdated** |
| 279 |
**-allow_postdated** prohibits this principal from obtaining |
| 280 |
postdated tickets. **+allow_postdated** clears this flag. |
| 281 |
|
| 282 |
{-\|+}\ **allow_forwardable** |
| 283 |
**-allow_forwardable** prohibits this principal from obtaining |
| 284 |
forwardable tickets. **+allow_forwardable** clears this flag. |
| 285 |
|
| 286 |
{-\|+}\ **allow_renewable** |
| 287 |
**-allow_renewable** prohibits this principal from obtaining |
| 288 |
renewable tickets. **+allow_renewable** clears this flag. |
| 289 |
|
| 290 |
{-\|+}\ **allow_proxiable** |
| 291 |
**-allow_proxiable** prohibits this principal from obtaining |
| 292 |
proxiable tickets. **+allow_proxiable** clears this flag. |
| 293 |
|
| 294 |
{-\|+}\ **allow_dup_skey** |
| 295 |
**-allow_dup_skey** disables user-to-user authentication for this |
| 296 |
principal by prohibiting others from obtaining a service ticket |
| 297 |
encrypted in this principal's TGT session key. |
| 298 |
**+allow_dup_skey** clears this flag. |
| 299 |
|
| 300 |
{-\|+}\ **requires_preauth** |
| 301 |
**+requires_preauth** requires this principal to preauthenticate |
| 302 |
before being allowed to kinit. **-requires_preauth** clears this |
| 303 |
flag. When **+requires_preauth** is set on a service principal, |
| 304 |
the KDC will only issue service tickets for that service principal |
| 305 |
if the client's initial authentication was performed using |
| 306 |
preauthentication. |
| 307 |
|
| 308 |
{-\|+}\ **requires_hwauth** |
| 309 |
**+requires_hwauth** requires this principal to preauthenticate |
| 310 |
using a hardware device before being allowed to kinit. |
| 311 |
**-requires_hwauth** clears this flag. When **+requires_hwauth** is |
| 312 |
set on a service principal, the KDC will only issue service tickets |
| 313 |
for that service principal if the client's initial authentication was |
| 314 |
performed using a hardware device to preauthenticate. |
| 315 |
|
| 316 |
{-\|+}\ **ok_as_delegate** |
| 317 |
**+ok_as_delegate** sets the **okay as delegate** flag on tickets |
| 318 |
issued with this principal as the service. Clients may use this |
| 319 |
flag as a hint that credentials should be delegated when |
| 320 |
authenticating to the service. **-ok_as_delegate** clears this |
| 321 |
flag. |
| 322 |
|
| 323 |
{-\|+}\ **allow_svr** |
| 324 |
**-allow_svr** prohibits the issuance of service tickets for this |
| 325 |
principal. In release 1.17 and later, user-to-user service |
| 326 |
tickets are still allowed unless the **-allow_dup_skey** flag is |
| 327 |
also set. **+allow_svr** clears this flag. |
| 328 |
|
| 329 |
{-\|+}\ **allow_tgs_req** |
| 330 |
**-allow_tgs_req** specifies that a Ticket-Granting Service (TGS) |
| 331 |
request for a service ticket for this principal is not permitted. |
| 332 |
**+allow_tgs_req** clears this flag. |
| 333 |
|
| 334 |
{-\|+}\ **allow_tix** |
| 335 |
**-allow_tix** forbids the issuance of any tickets for this |
| 336 |
principal. **+allow_tix** clears this flag. |
| 337 |
|
| 338 |
{-\|+}\ **needchange** |
| 339 |
**+needchange** forces a password change on the next initial |
| 340 |
authentication to this principal. **-needchange** clears this |
| 341 |
flag. |
| 342 |
|
| 343 |
{-\|+}\ **password_changing_service** |
| 344 |
**+password_changing_service** marks this principal as a password |
| 345 |
change service principal. |
| 346 |
|
| 347 |
{-\|+}\ **ok_to_auth_as_delegate** |
| 348 |
**+ok_to_auth_as_delegate** allows this principal to acquire |
| 349 |
forwardable tickets to itself from arbitrary users, for use with |
| 350 |
constrained delegation. |
| 351 |
|
| 352 |
{-\|+}\ **no_auth_data_required** |
| 353 |
**+no_auth_data_required** prevents PAC or AD-SIGNEDPATH data from |
| 354 |
being added to service tickets for the principal. |
| 355 |
|
| 356 |
{-\|+}\ **lockdown_keys** |
| 357 |
**+lockdown_keys** prevents keys for this principal from leaving |
| 358 |
the KDC via kadmind. The chpass and extract operations are denied |
| 359 |
for a principal with this attribute. The chrand operation is |
| 360 |
allowed, but will not return the new keys. The delete and rename |
| 361 |
operations are also denied if this attribute is set, in order to |
| 362 |
prevent a malicious administrator from replacing principals like |
| 363 |
krbtgt/* or kadmin/* with new principals without the attribute. |
| 364 |
This attribute can be set via the network protocol, but can only |
| 365 |
be removed using kadmin.local. |
| 366 |
|
| 367 |
**-randkey** |
| 368 |
Sets the key of the principal to a random value. |
| 369 |
|
| 370 |
**-nokey** |
| 371 |
Causes the principal to be created with no key. New in release |
| 372 |
1.12. |
| 373 |
|
| 374 |
**-pw** *password* |
| 375 |
Sets the password of the principal to the specified string and |
| 376 |
does not prompt for a password. Note: using this option in a |
| 377 |
shell script may expose the password to other users on the system |
| 378 |
via the process list. |
| 379 |
|
| 380 |
**-e** *enc*:*salt*,... |
| 381 |
Uses the specified keysalt list for setting the keys of the |
| 382 |
principal. See :ref:`Keysalt_lists` in :ref:`kdc.conf(5)` for a |
| 383 |
list of possible values. |
| 384 |
|
| 385 |
**-x** *db_princ_args* |
| 386 |
Indicates database-specific options. The options for the LDAP |
| 387 |
database module are: |
| 388 |
|
| 389 |
**-x dn=**\ *dn* |
| 390 |
Specifies the LDAP object that will contain the Kerberos |
| 391 |
principal being created. |
| 392 |
|
| 393 |
**-x linkdn=**\ *dn* |
| 394 |
Specifies the LDAP object to which the newly created Kerberos |
| 395 |
principal object will point. |
| 396 |
|
| 397 |
**-x containerdn=**\ *container_dn* |
| 398 |
Specifies the container object under which the Kerberos |
| 399 |
principal is to be created. |
| 400 |
|
| 401 |
**-x tktpolicy=**\ *policy* |
| 402 |
Associates a ticket policy to the Kerberos principal. |
| 403 |
|
| 404 |
.. note:: |
| 405 |
|
| 406 |
- The **containerdn** and **linkdn** options cannot be |
| 407 |
specified with the **dn** option. |
| 408 |
- If the *dn* or *containerdn* options are not specified while |
| 409 |
adding the principal, the principals are created under the |
| 410 |
principal container configured in the realm or the realm |
| 411 |
container. |
| 412 |
- *dn* and *containerdn* should be within the subtrees or |
| 413 |
principal container configured in the realm. |
| 414 |
|
| 415 |
Example:: |
| 416 |
|
| 417 |
kadmin: addprinc jennifer |
| 418 |
No policy specified for "[email protected]"; |
| 419 |
defaulting to no policy. |
| 420 |
Enter password for principal [email protected]: |
| 421 |
Re-enter password for principal [email protected]: |
| 422 |
Principal "[email protected]" created. |
| 423 |
kadmin: |
| 424 |
|
| 425 |
.. _modify_principal: |
| 426 |
|
| 427 |
modify_principal |
| 428 |
~~~~~~~~~~~~~~~~ |
| 429 |
|
| 430 |
**modify_principal** [*options*] *principal* |
| 431 |
|
| 432 |
Modifies the specified principal, changing the fields as specified. |
| 433 |
The options to **add_principal** also apply to this command, except |
| 434 |
for the **-randkey**, **-pw**, and **-e** options. In addition, the |
| 435 |
option **-clearpolicy** will clear the current policy of a principal. |
| 436 |
|
| 437 |
This command requires the *modify* privilege. |
| 438 |
|
| 439 |
Alias: **modprinc** |
| 440 |
|
| 441 |
Options (in addition to the **addprinc** options): |
| 442 |
|
| 443 |
**-unlock** |
| 444 |
Unlocks a locked principal (one which has received too many failed |
| 445 |
authentication attempts without enough time between them according |
| 446 |
to its password policy) so that it can successfully authenticate. |
| 447 |
|
| 448 |
.. _rename_principal: |
| 449 |
|
| 450 |
rename_principal |
| 451 |
~~~~~~~~~~~~~~~~ |
| 452 |
|
| 453 |
**rename_principal** [**-force**] *old_principal* *new_principal* |
| 454 |
|
| 455 |
Renames the specified *old_principal* to *new_principal*. This |
| 456 |
command prompts for confirmation, unless the **-force** option is |
| 457 |
given. |
| 458 |
|
| 459 |
This command requires the **add** and **delete** privileges. |
| 460 |
|
| 461 |
Alias: **renprinc** |
| 462 |
|
| 463 |
.. _add_alias: |
| 464 |
|
| 465 |
add_alias |
| 466 |
~~~~~~~~~ |
| 467 |
|
| 468 |
**add_alias** *alias_princ* *target_princ* |
| 469 |
|
| 470 |
Create an alias *alias_princ* pointing to *target_princ*. Aliases may |
| 471 |
be chained (that is, *target_princ* may itself be an alias) up to a |
| 472 |
depth of 10. |
| 473 |
|
| 474 |
This command requires the **add** privilege for *alias_princ* and the |
| 475 |
**modify** privilege for *target_princ*. |
| 476 |
|
| 477 |
(New in release 1.22.) |
| 478 |
|
| 479 |
Aliases: **alias** |
| 480 |
|
| 481 |
.. _delete_principal: |
| 482 |
|
| 483 |
delete_principal |
| 484 |
~~~~~~~~~~~~~~~~ |
| 485 |
|
| 486 |
**delete_principal** [**-force**] *principal* |
| 487 |
|
| 488 |
Deletes the specified *principal* or alias from the database. This |
| 489 |
command prompts for deletion, unless the **-force** option is given. |
| 490 |
|
| 491 |
This command requires the **delete** privilege. |
| 492 |
|
| 493 |
Alias: **delprinc** |
| 494 |
|
| 495 |
.. _change_password: |
| 496 |
|
| 497 |
change_password |
| 498 |
~~~~~~~~~~~~~~~ |
| 499 |
|
| 500 |
**change_password** [*options*] *principal* |
| 501 |
|
| 502 |
Changes the password of *principal*. Prompts for a new password if |
| 503 |
neither **-randkey** or **-pw** is specified. |
| 504 |
|
| 505 |
This command requires the **changepw** privilege, or that the |
| 506 |
principal running the program is the same as the principal being |
| 507 |
changed. |
| 508 |
|
| 509 |
Alias: **cpw** |
| 510 |
|
| 511 |
The following options are available: |
| 512 |
|
| 513 |
**-randkey** |
| 514 |
Sets the key of the principal to a random value. |
| 515 |
|
| 516 |
**-pw** *password* |
| 517 |
Set the password to the specified string. Using this option in a |
| 518 |
script may expose the password to other users on the system via |
| 519 |
the process list. |
| 520 |
|
| 521 |
**-e** *enc*:*salt*,... |
| 522 |
Uses the specified keysalt list for setting the keys of the |
| 523 |
principal. See :ref:`Keysalt_lists` in :ref:`kdc.conf(5)` for a |
| 524 |
list of possible values. |
| 525 |
|
| 526 |
**-keepold** |
| 527 |
Keeps the existing keys in the database. This flag is usually not |
| 528 |
necessary except perhaps for ``krbtgt`` principals. |
| 529 |
|
| 530 |
Example:: |
| 531 |
|
| 532 |
kadmin: cpw systest |
| 533 |
Enter password for principal [email protected]: |
| 534 |
Re-enter password for principal [email protected]: |
| 535 |
Password for [email protected] changed. |
| 536 |
kadmin: |
| 537 |
|
| 538 |
.. _purgekeys: |
| 539 |
|
| 540 |
purgekeys |
| 541 |
~~~~~~~~~ |
| 542 |
|
| 543 |
**purgekeys** [**-all**\|\ **-keepkvno** *oldest_kvno_to_keep*] *principal* |
| 544 |
|
| 545 |
Purges previously retained old keys (e.g., from **change_password |
| 546 |
-keepold**) from *principal*. If **-keepkvno** is specified, then |
| 547 |
only purges keys with kvnos lower than *oldest_kvno_to_keep*. If |
| 548 |
**-all** is specified, then all keys are purged. The **-all** option |
| 549 |
is new in release 1.12. |
| 550 |
|
| 551 |
This command requires the **modify** privilege. |
| 552 |
|
| 553 |
.. _get_principal: |
| 554 |
|
| 555 |
get_principal |
| 556 |
~~~~~~~~~~~~~ |
| 557 |
|
| 558 |
**get_principal** [**-terse**] *principal* |
| 559 |
|
| 560 |
Gets the attributes of principal. With the **-terse** option, outputs |
| 561 |
fields as quoted tab-separated strings. |
| 562 |
|
| 563 |
This command requires the **inquire** privilege, or that the principal |
| 564 |
running the the program to be the same as the one being listed. |
| 565 |
|
| 566 |
Alias: **getprinc** |
| 567 |
|
| 568 |
Examples:: |
| 569 |
|
| 570 |
kadmin: getprinc tlyu/admin |
| 571 |
Principal: tlyu/[email protected] |
| 572 |
Expiration date: [never] |
| 573 |
Last password change: Mon Aug 12 14:16:47 EDT 1996 |
| 574 |
Password expiration date: [never] |
| 575 |
Maximum ticket life: 0 days 10:00:00 |
| 576 |
Maximum renewable life: 7 days 00:00:00 |
| 577 |
Last modified: Mon Aug 12 14:16:47 EDT 1996 (bjaspan/[email protected]) |
| 578 |
Last successful authentication: [never] |
| 579 |
Last failed authentication: [never] |
| 580 |
Failed password attempts: 0 |
| 581 |
Number of keys: 1 |
| 582 |
Key: vno 1, aes256-cts-hmac-sha384-192 |
| 583 |
MKey: vno 1 |
| 584 |
Attributes: |
| 585 |
Policy: [none] |
| 586 |
|
| 587 |
kadmin: getprinc -terse systest |
| 588 |
[email protected] 3 86400 604800 1 |
| 589 |
785926535 753241234 785900000 |
| 590 |
tlyu/[email protected] 786100034 0 0 |
| 591 |
kadmin: |
| 592 |
|
| 593 |
.. _list_principals: |
| 594 |
|
| 595 |
list_principals |
| 596 |
~~~~~~~~~~~~~~~ |
| 597 |
|
| 598 |
**list_principals** [*expression*] |
| 599 |
|
| 600 |
Retrieves all or some principal names. *expression* is a shell-style |
| 601 |
glob expression that can contain the wild-card characters ``?``, |
| 602 |
``*``, and ``[]``. All principal names matching the expression are |
| 603 |
printed. If no expression is provided, all principal names are |
| 604 |
printed. If the expression does not contain an ``@`` character, an |
| 605 |
``@`` character followed by the local realm is appended to the |
| 606 |
expression. |
| 607 |
|
| 608 |
This command requires the **list** privilege. |
| 609 |
|
| 610 |
Alias: **listprincs**, **get_principals**, **getprincs** |
| 611 |
|
| 612 |
Example:: |
| 613 |
|
| 614 |
kadmin: listprincs test* |
| 615 |
[email protected] |
| 616 |
[email protected] |
| 617 |
[email protected] |
| 618 |
[email protected] |
| 619 |
kadmin: |
| 620 |
|
| 621 |
.. _get_strings: |
| 622 |
|
| 623 |
get_strings |
| 624 |
~~~~~~~~~~~ |
| 625 |
|
| 626 |
**get_strings** *principal* |
| 627 |
|
| 628 |
Displays string attributes on *principal*. |
| 629 |
|
| 630 |
This command requires the **inquire** privilege. |
| 631 |
|
| 632 |
Alias: **getstrs** |
| 633 |
|
| 634 |
.. _set_string: |
| 635 |
|
| 636 |
set_string |
| 637 |
~~~~~~~~~~ |
| 638 |
|
| 639 |
**set_string** *principal* *name* *value* |
| 640 |
|
| 641 |
Sets a string attribute on *principal*. String attributes are used to |
| 642 |
supply per-principal configuration to the KDC and some KDC plugin |
| 643 |
modules. The following string attribute names are recognized by the |
| 644 |
KDC: |
| 645 |
|
| 646 |
**require_auth** |
| 647 |
Specifies an authentication indicator which is required to |
| 648 |
authenticate to the principal as a service. Multiple indicators |
| 649 |
can be specified, separated by spaces; in this case any of the |
| 650 |
specified indicators will be accepted. (New in release 1.14.) |
| 651 |
|
| 652 |
**session_enctypes** |
| 653 |
Specifies the encryption types supported for session keys when the |
| 654 |
principal is authenticated to as a server. See |
| 655 |
:ref:`Encryption_types` in :ref:`kdc.conf(5)` for a list of the |
| 656 |
accepted values. |
| 657 |
|
| 658 |
**otp** |
| 659 |
Enables One Time Passwords (OTP) preauthentication for a client |
| 660 |
*principal*. The *value* is a JSON string representing an array |
| 661 |
of objects, each having optional ``type`` and ``username`` fields. |
| 662 |
|
| 663 |
**pkinit_cert_match** |
| 664 |
Specifies a matching expression that defines the certificate |
| 665 |
attributes required for the client certificate used by the |
| 666 |
principal during PKINIT authentication. The matching expression |
| 667 |
is in the same format as those used by the **pkinit_cert_match** |
| 668 |
option in :ref:`krb5.conf(5)`. (New in release 1.16.) |
| 669 |
|
| 670 |
**pac_privsvr_enctype** |
| 671 |
Forces the encryption type of the PAC KDC checksum buffers to the |
| 672 |
specified encryption type for tickets issued to this server, by |
| 673 |
deriving a key from the local krbtgt key if it is of a different |
| 674 |
encryption type. It may be necessary to set this value to |
| 675 |
"aes256-sha1" on the cross-realm krbtgt entry for an Active |
| 676 |
Directory realm when using aes-sha2 keys on the local krbtgt |
| 677 |
entry. |
| 678 |
|
| 679 |
This command requires the **modify** privilege. |
| 680 |
|
| 681 |
Alias: **setstr** |
| 682 |
|
| 683 |
Example:: |
| 684 |
|
| 685 |
set_string host/foo.mit.edu session_enctypes aes128-cts |
| 686 |
set_string [email protected] otp "[{""type"":""hotp"",""username"":""al""}]" |
| 687 |
|
| 688 |
.. _del_string: |
| 689 |
|
| 690 |
del_string |
| 691 |
~~~~~~~~~~ |
| 692 |
|
| 693 |
**del_string** *principal* *key* |
| 694 |
|
| 695 |
Deletes a string attribute from *principal*. |
| 696 |
|
| 697 |
This command requires the **delete** privilege. |
| 698 |
|
| 699 |
Alias: **delstr** |
| 700 |
|
| 701 |
.. _add_policy: |
| 702 |
|
| 703 |
add_policy |
| 704 |
~~~~~~~~~~ |
| 705 |
|
| 706 |
**add_policy** [*options*] *policy* |
| 707 |
|
| 708 |
Adds a password policy named *policy* to the database. |
| 709 |
|
| 710 |
This command requires the **add** privilege. |
| 711 |
|
| 712 |
Alias: **addpol** |
| 713 |
|
| 714 |
The following options are available: |
| 715 |
|
| 716 |
**-maxlife** *time* |
| 717 |
(:ref:`duration` or :ref:`getdate` string) Sets the maximum |
| 718 |
lifetime of a password. |
| 719 |
|
| 720 |
**-minlife** *time* |
| 721 |
(:ref:`duration` or :ref:`getdate` string) Sets the minimum |
| 722 |
lifetime of a password. |
| 723 |
|
| 724 |
**-minlength** *length* |
| 725 |
Sets the minimum length of a password. |
| 726 |
|
| 727 |
**-minclasses** *number* |
| 728 |
Sets the minimum number of character classes required in a |
| 729 |
password. The five character classes are lower case, upper case, |
| 730 |
numbers, punctuation, and whitespace/unprintable characters. |
| 731 |
|
| 732 |
**-history** *number* |
| 733 |
Sets the number of past keys kept for a principal. This option is |
| 734 |
not supported with the LDAP KDC database module. |
| 735 |
|
| 736 |
.. _policy_maxfailure: |
| 737 |
|
| 738 |
**-maxfailure** *maxnumber* |
| 739 |
Sets the number of authentication failures before the principal is |
| 740 |
locked. Authentication failures are only tracked for principals |
| 741 |
which require preauthentication. The counter of failed attempts |
| 742 |
resets to 0 after a successful attempt to authenticate. A |
| 743 |
*maxnumber* value of 0 (the default) disables lockout. |
| 744 |
|
| 745 |
.. _policy_failurecountinterval: |
| 746 |
|
| 747 |
**-failurecountinterval** *failuretime* |
| 748 |
(:ref:`duration` or :ref:`getdate` string) Sets the allowable time |
| 749 |
between authentication failures. If an authentication failure |
| 750 |
happens after *failuretime* has elapsed since the previous |
| 751 |
failure, the number of authentication failures is reset to 1. A |
| 752 |
*failuretime* value of 0 (the default) means forever. |
| 753 |
|
| 754 |
.. _policy_lockoutduration: |
| 755 |
|
| 756 |
**-lockoutduration** *lockouttime* |
| 757 |
(:ref:`duration` or :ref:`getdate` string) Sets the duration for |
| 758 |
which the principal is locked from authenticating if too many |
| 759 |
authentication failures occur without the specified failure count |
| 760 |
interval elapsing. A duration of 0 (the default) means the |
| 761 |
principal remains locked out until it is administratively unlocked |
| 762 |
with ``modprinc -unlock``. |
| 763 |
|
| 764 |
**-allowedkeysalts** |
| 765 |
Specifies the key/salt tuples supported for long-term keys when |
| 766 |
setting or changing a principal's password/keys. See |
| 767 |
:ref:`Keysalt_lists` in :ref:`kdc.conf(5)` for a list of the |
| 768 |
accepted values, but note that key/salt tuples must be separated |
| 769 |
with commas (',') only. To clear the allowed key/salt policy use |
| 770 |
a value of '-'. |
| 771 |
|
| 772 |
Example:: |
| 773 |
|
| 774 |
kadmin: add_policy -maxlife "2 days" -minlength 5 guests |
| 775 |
kadmin: |
| 776 |
|
| 777 |
.. _modify_policy: |
| 778 |
|
| 779 |
modify_policy |
| 780 |
~~~~~~~~~~~~~ |
| 781 |
|
| 782 |
**modify_policy** [*options*] *policy* |
| 783 |
|
| 784 |
Modifies the password policy named *policy*. Options are as described |
| 785 |
for **add_policy**. |
| 786 |
|
| 787 |
This command requires the **modify** privilege. |
| 788 |
|
| 789 |
Alias: **modpol** |
| 790 |
|
| 791 |
.. _delete_policy: |
| 792 |
|
| 793 |
delete_policy |
| 794 |
~~~~~~~~~~~~~ |
| 795 |
|
| 796 |
**delete_policy** [**-force**] *policy* |
| 797 |
|
| 798 |
Deletes the password policy named *policy*. Prompts for confirmation |
| 799 |
before deletion. The command will fail if the policy is in use by any |
| 800 |
principals. |
| 801 |
|
| 802 |
This command requires the **delete** privilege. |
| 803 |
|
| 804 |
Alias: **delpol** |
| 805 |
|
| 806 |
Example:: |
| 807 |
|
| 808 |
kadmin: del_policy guests |
| 809 |
Are you sure you want to delete the policy "guests"? |
| 810 |
(yes/no): yes |
| 811 |
kadmin: |
| 812 |
|
| 813 |
.. _get_policy: |
| 814 |
|
| 815 |
get_policy |
| 816 |
~~~~~~~~~~ |
| 817 |
|
| 818 |
**get_policy** [ **-terse** ] *policy* |
| 819 |
|
| 820 |
Displays the values of the password policy named *policy*. With the |
| 821 |
**-terse** flag, outputs the fields as quoted strings separated by |
| 822 |
tabs. |
| 823 |
|
| 824 |
This command requires the **inquire** privilege. |
| 825 |
|
| 826 |
Alias: **getpol** |
| 827 |
|
| 828 |
Examples:: |
| 829 |
|
| 830 |
kadmin: get_policy admin |
| 831 |
Policy: admin |
| 832 |
Maximum password life: 180 days 00:00:00 |
| 833 |
Minimum password life: 00:00:00 |
| 834 |
Minimum password length: 6 |
| 835 |
Minimum number of password character classes: 2 |
| 836 |
Number of old keys kept: 5 |
| 837 |
Reference count: 17 |
| 838 |
|
| 839 |
kadmin: get_policy -terse admin |
| 840 |
admin 15552000 0 6 2 5 17 |
| 841 |
kadmin: |
| 842 |
|
| 843 |
The "Reference count" is the number of principals using that policy. |
| 844 |
With the LDAP KDC database module, the reference count field is not |
| 845 |
meaningful. |
| 846 |
|
| 847 |
.. _list_policies: |
| 848 |
|
| 849 |
list_policies |
| 850 |
~~~~~~~~~~~~~ |
| 851 |
|
| 852 |
**list_policies** [*expression*] |
| 853 |
|
| 854 |
Retrieves all or some policy names. *expression* is a shell-style |
| 855 |
glob expression that can contain the wild-card characters ``?``, |
| 856 |
``*``, and ``[]``. All policy names matching the expression are |
| 857 |
printed. If no expression is provided, all existing policy names are |
| 858 |
printed. |
| 859 |
|
| 860 |
This command requires the **list** privilege. |
| 861 |
|
| 862 |
Aliases: **listpols**, **get_policies**, **getpols**. |
| 863 |
|
| 864 |
Examples:: |
| 865 |
|
| 866 |
kadmin: listpols |
| 867 |
test-pol |
| 868 |
dict-only |
| 869 |
once-a-min |
| 870 |
test-pol-nopw |
| 871 |
|
| 872 |
kadmin: listpols t* |
| 873 |
test-pol |
| 874 |
test-pol-nopw |
| 875 |
kadmin: |
| 876 |
|
| 877 |
.. _ktadd: |
| 878 |
|
| 879 |
ktadd |
| 880 |
~~~~~ |
| 881 |
|
| 882 |
| **ktadd** [options] *principal* |
| 883 |
| **ktadd** [options] **-glob** *princ-exp* |
| 884 |
|
| 885 |
Adds a *principal*, or all principals matching *princ-exp*, to a |
| 886 |
keytab file. Each principal's keys are randomized in the process. |
| 887 |
The rules for *princ-exp* are described in the **list_principals** |
| 888 |
command. |
| 889 |
|
| 890 |
This command requires the **inquire** and **changepw** privileges. |
| 891 |
With the **-glob** form, it also requires the **list** privilege. |
| 892 |
|
| 893 |
The options are: |
| 894 |
|
| 895 |
**-k[eytab]** *keytab* |
| 896 |
Use *keytab* as the keytab file. Otherwise, the default keytab is |
| 897 |
used. |
| 898 |
|
| 899 |
**-e** *enc*:*salt*,... |
| 900 |
Uses the specified keysalt list for setting the new keys of the |
| 901 |
principal. See :ref:`Keysalt_lists` in :ref:`kdc.conf(5)` for a |
| 902 |
list of possible values. |
| 903 |
|
| 904 |
**-q** |
| 905 |
Display less verbose information. |
| 906 |
|
| 907 |
**-norandkey** |
| 908 |
Do not randomize the keys. The keys and their version numbers stay |
| 909 |
unchanged. This option cannot be specified in combination with the |
| 910 |
**-e** option. |
| 911 |
|
| 912 |
An entry for each of the principal's unique encryption types is added, |
| 913 |
ignoring multiple keys with the same encryption type but different |
| 914 |
salt types. |
| 915 |
|
| 916 |
Alias: **xst** |
| 917 |
|
| 918 |
Example:: |
| 919 |
|
| 920 |
kadmin: ktadd -k /tmp/foo-new-keytab host/foo.mit.edu |
| 921 |
Entry for principal host/[email protected] with kvno 3, |
| 922 |
encryption type aes256-cts-hmac-sha1-96 added to keytab |
| 923 |
FILE:/tmp/foo-new-keytab |
| 924 |
kadmin: |
| 925 |
|
| 926 |
.. _ktremove: |
| 927 |
|
| 928 |
ktremove |
| 929 |
~~~~~~~~ |
| 930 |
|
| 931 |
**ktremove** [options] *principal* [*kvno* | *all* | *old*] |
| 932 |
|
| 933 |
Removes entries for the specified *principal* from a keytab. Requires |
| 934 |
no permissions, since this does not require database access. |
| 935 |
|
| 936 |
If the string "all" is specified, all entries for that principal are |
| 937 |
removed; if the string "old" is specified, all entries for that |
| 938 |
principal except those with the highest kvno are removed. Otherwise, |
| 939 |
the value specified is parsed as an integer, and all entries whose |
| 940 |
kvno match that integer are removed. |
| 941 |
|
| 942 |
The options are: |
| 943 |
|
| 944 |
**-k[eytab]** *keytab* |
| 945 |
Use *keytab* as the keytab file. Otherwise, the default keytab is |
| 946 |
used. |
| 947 |
|
| 948 |
**-q** |
| 949 |
Display less verbose information. |
| 950 |
|
| 951 |
Alias: **ktrem** |
| 952 |
|
| 953 |
Example:: |
| 954 |
|
| 955 |
kadmin: ktremove kadmin/admin all |
| 956 |
Entry for principal kadmin/admin with kvno 3 removed from keytab |
| 957 |
FILE:/etc/krb5.keytab |
| 958 |
kadmin: |
| 959 |
|
| 960 |
lock |
| 961 |
~~~~ |
| 962 |
|
| 963 |
Lock database exclusively. Use with extreme caution! This command |
| 964 |
only works with the DB2 KDC database module. |
| 965 |
|
| 966 |
unlock |
| 967 |
~~~~~~ |
| 968 |
|
| 969 |
Release the exclusive database lock. |
| 970 |
|
| 971 |
list_requests |
| 972 |
~~~~~~~~~~~~~ |
| 973 |
|
| 974 |
Lists available for kadmin requests. |
| 975 |
|
| 976 |
Aliases: **lr**, **?** |
| 977 |
|
| 978 |
quit |
| 979 |
~~~~ |
| 980 |
|
| 981 |
Exit program. If the database was locked, the lock is released. |
| 982 |
|
| 983 |
Aliases: **exit**, **q** |
| 984 |
|
| 985 |
|
| 986 |
HISTORY |
| 987 |
------- |
| 988 |
|
| 989 |
The kadmin program was originally written by Tom Yu at MIT, as an |
| 990 |
interface to the OpenVision Kerberos administration program. |
| 991 |
|
| 992 |
|
| 993 |
ENVIRONMENT |
| 994 |
----------- |
| 995 |
|
| 996 |
See :ref:`kerberos(7)` for a description of Kerberos environment |
| 997 |
variables. |
| 998 |
|
| 999 |
|
| 1000 |
SEE ALSO |
| 1001 |
-------- |
| 1002 |
|
| 1003 |
:ref:`kpasswd(1)`, :ref:`kadmind(8)`, :ref:`kerberos(7)` |