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