1a0d22a8ff7eeab3c9d3c9d1eaea04b50314281c
[krb5.git] / src / man / kadmin.1
1 .TH "KADMIN" "1" "January 06, 2012" "0.0.1" "MIT Kerberos"
2 .SH NAME
3 kadmin \- Kerberos V5 database administration program
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .\" Man page generated from reStructeredText.
32 .
33 .SH SYNOPSIS
34 .INDENT 0.0
35 .TP
36 .B \fBkadmin\fP
37 .sp
38 [ \fB\-O\fP | \fB\-N\fP ]
39 [\fB\-r\fP \fIrealm\fP]
40 [\fB\-p\fP \fIprincipal\fP]
41 [\fB\-q\fP \fIquery\fP]
42 [[\fB\-c\fP \fIcache_name\fP] | [\fB\-k\fP [\fB\-t\fP \fIkeytab\fP ]] | \fB\-n\fP]
43 [\fB\-w\fP \fIpassword\fP]
44 [\fB\-s\fP \fIadmin_server\fP [:\fIport\fP]]
45 .TP
46 .B \fBkadmin.local\fP
47 .sp
48 [\fB\-r\fP \fIrealm\fP]
49 [\fB\-p\fP \fIprincipal\fP]
50 [\fB\-q\fP \fIquery\fP]
51 [\fB\-d\fP \fIdbname\fP]
52 [\fB\-e\fP "enc:salt ..."]
53 [\fB\-m\fP]
54 [\fB\-x\fP \fIdb_args\fP]
55 .UNINDENT
56 .SH DESCRIPTION
57 .sp
58 \fIkadmin\fP and \fIkadmin.local\fP are command\-line interfaces to the Kerberos V5 KADM5 administration system.
59 Both \fIkadmin\fP and \fIkadmin.local\fP provide identical functionalities;
60 the difference is that \fIkadmin.local\fP runs on the master KDC if the database is db2 and does not use Kerberos to authenticate to the database.
61 Except as explicitly noted otherwise, this man page will use \fIkadmin\fP to refer to both versions.
62 \fIkadmin\fP provides for the maintenance of Kerberos principals, KADM5 policies, and service key tables (keytabs).
63 .sp
64 The remote version uses Kerberos authentication and an encrypted RPC, to operate securely from anywhere on the network.
65 It authenticates to the KADM5 server using the service principal \fIkadmin/admin\fP.
66 If the credentials cache contains a ticket for the \fIkadmin/admin\fP principal, and the \fI\-c\fP credentials_cache option is specified,
67 that ticket is used to authenticate to KADM5.
68 Otherwise, the \fI\-p\fP and \fI\-k\fP options are used to specify the client Kerberos principal name used to authenticate.
69 Once \fIkadmin\fP has determined the principal name, it requests a \fIkadmin/admin\fP Kerberos service ticket from the KDC,
70 and uses that service ticket to authenticate to KADM5.
71 .sp
72 If the database is db2, the local client \fIkadmin.local\fP is intended to run directly on the master KDC without Kerberos authentication.
73 The local version provides all of the functionality of the now obsolete kdb5_edit(8), except for database dump and load,
74 which is now provided by the \fIkdb5_util(8)\fP utility.
75 .sp
76 If the database is LDAP, \fIkadmin.local\fP need not be run on the KDC.
77 .sp
78 \fIkadmin.local\fP can be configured to log updates for incremental database propagation.
79 Incremental propagation allows slave KDC servers to receive principal and policy updates incrementally instead of receiving full dumps of the database.
80 This facility can be enabled in the \fIkdc.conf\fP file with the \fIiprop_enable\fP option.
81 See the \fIkdc.conf\fP documentation for other options for tuning incremental propagation parameters.
82 .SH OPTIONS
83 .INDENT 0.0
84 .INDENT 3.5
85 .INDENT 0.0
86 .TP
87 .B \fB\-r\fP \fIrealm\fP
88 .sp
89 Use \fIrealm\fP as the default database realm.
90 .TP
91 .B \fB\-p\fP \fIprincipal\fP
92 .sp
93 Use  \fIprincipal\fP to authenticate.  Otherwise, \fIkadmin\fP will append "/admin" to the primary principal name of the default ccache, the
94 value of the \fIUSER\fP environment variable, or the username as obtained with \fIgetpwuid\fP, in order of preference.
95 .TP
96 .B \fB\-k\fP
97 .sp
98 Use a \fIkeytab\fP to decrypt the KDC response instead of prompting for a password on the TTY.  In this case, the default principal
99 will be \fIhost/hostname\fP.  If there is not a \fIkeytab\fP specified with the \fB\-t\fP option, then the default \fIkeytab\fP will be used.
100 .TP
101 .B \fB\-t\fP \fIkeytab\fP
102 .sp
103 Use \fIkeytab\fP to decrypt the KDC response.  This can only be used with the \fB\-k\fP option.
104 .TP
105 .B \fB\-n\fP
106 .sp
107 Requests anonymous processing.  Two types of anonymous principals are supported.
108 For fully anonymous Kerberos, configure pkinit on the KDC and configure \fIpkinit_anchors\fP in the client\(aqs \fIkrb5.conf\fP.
109 Then use the \fI\-n\fP option with a principal of the form \fI@REALM\fP (an empty principal name followed by the at\-sign and a realm name).
110 If permitted by the KDC, an anonymous ticket will be returned.
111 A second form of anonymous tickets is supported; these realm\-exposed tickets hide the identity of the client but not the client\(aqs realm.
112 For this mode, use \fIkinit \-n\fP with a normal principal name.
113 If supported by the KDC, the principal (but not realm) will be replaced by the anonymous principal.
114 As of release 1.8, the MIT Kerberos KDC only supports fully anonymous operation.
115 .TP
116 .B \fB\-c\fP \fIcredentials_cache\fP
117 .sp
118 Use \fIcredentials_cache\fP as the credentials cache.  The \fIcredentials_cache\fP should contain a service ticket for the \fIkadmin/admin\fP service;
119 it can be acquired with the \fIkinit(1)\fP program.  If this option is not specified, \fIkadmin\fP requests a new service ticket from
120 the KDC, and stores it in its own temporary ccache.
121 .TP
122 .B \fB\-w\fP \fIpassword\fP
123 .sp
124 Use \fIpassword\fP instead of prompting for one on the TTY.
125 .IP Note
126 .
127 Placing the password for a Kerberos principal with administration access into a shell script can be dangerous if
128 unauthorized users gain read access to the script.
129 .RE
130 .TP
131 .B \fB\-q\fP \fIquery\fP
132 .sp
133 pass query directly to kadmin, which will perform query and then exit.  This can be useful for writing scripts.
134 .TP
135 .B \fB\-d\fP \fIdbname\fP
136 .sp
137 Specifies the name of the Kerberos database.  This option does not apply to the LDAP database.
138 .TP
139 .B \fB\-s\fP \fIadmin_server\fP [:port]
140 .sp
141 Specifies the admin server which \fIkadmin\fP should contact.
142 .UNINDENT
143 .sp
144 \fB\-m\fP     Do not authenticate using a \fIkeytab\fP.  This option will cause \fIkadmin\fP to prompt for the master database password.
145 .INDENT 0.0
146 .TP
147 .B \fB\-e\fP enc:salt_list
148 .sp
149 Sets the list of encryption types and salt types to be used for any new keys created.
150 .UNINDENT
151 .sp
152 \fB\-O\fP     Force use of old AUTH_GSSAPI authentication flavor.
153 .sp
154 \fB\-N\fP     Prevent fallback to AUTH_GSSAPI authentication flavor.
155 .INDENT 0.0
156 .TP
157 .B \fB\-x\fP \fIdb_args\fP
158 .sp
159 Specifies the database specific arguments.
160 .sp
161 Options supported for LDAP database are:
162 .INDENT 7.0
163 .TP
164 .B \fB\-x\fP host=<hostname>
165 .sp
166 specifies the LDAP server to connect to by a LDAP URI.
167 .TP
168 .B \fB\-x\fP binddn=<bind_dn>
169 .sp
170 specifies the DN of the object used by the administration server to bind to the LDAP server.  This object should have the
171 read and write rights on the realm container, principal container and the subtree that is referenced by the realm.
172 .TP
173 .B \fB\-x\fP bindpwd=<bind_password>
174 .sp
175 specifies the password for the above mentioned binddn. It is recommended not to use this option.
176 Instead, the password can be stashed using the \fIstashsrvpw\fP command of \fIkdb5_ldap_util(8)\fP
177 .UNINDENT
178 .UNINDENT
179 .UNINDENT
180 .UNINDENT
181 .SH DATE FORMAT
182 .sp
183 Many of the \fIkadmin\fP commands take a duration or time as an argument. The date can appear in a wide variety of formats, such as:
184 .sp
185 .nf
186 .ft C
187 1 month ago
188 2 hours ago
189 400000 seconds ago
190 last year
191 this Monday
192 next Monday
193 yesterday
194 tomorrow
195 now
196 second Monday
197 fortnight ago
198 3/31/92 10:00:07 PST
199 January 23, 1987 10:05pm
200 22:00 GMT
201 .ft P
202 .fi
203 .sp
204 Dates which do not have the "ago" specifier default to being absolute dates, unless they appear in a field where a duration is expected.
205 In that case the time specifier will be interpreted as relative.
206 Specifying "ago" in a duration may result in unexpected behavior.
207 .sp
208 The following is a list of all of the allowable keywords.
209 .TS
210 center;
211 |l|l|.
212 _
213 T{
214 Months
215 T}      T{
216 january, jan, february, feb, march, mar, april, apr, may, june, jun, july, jul, august, aug, september, sep, sept, october, oct, november, nov, december, dec
217 T}
218 _
219 T{
220 Days
221 T}      T{
222 sunday, sun, monday, mon, tuesday, tues, tue, wednesday, wednes, wed, thursday, thurs, thur, thu, friday, fri, saturday, sat
223 T}
224 _
225 T{
226 Units
227 T}      T{
228 year, month, fortnight, week, day, hour, minute, min, second, sec
229 T}
230 _
231 T{
232 Relative
233 T}      T{
234 tomorrow, yesterday, today, now, last, this, next, first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, ago
235 T}
236 _
237 T{
238 Time Zones
239 T}      T{
240 kadmin recognizes abbreviations for most of the world\(aqs time zones. A complete listing appears in kadmin Time Zones.
241 T}
242 _
243 T{
244 12\-hour Time Delimiters
245 T}      T{
246 am, pm
247 T}
248 _
249 .TE
250 .SH COMMANDS
251 .SS add_principal
252 .INDENT 0.0
253 .INDENT 3.5
254 .INDENT 0.0
255 .TP
256 .B \fBadd_principal\fP [options] \fInewprinc\fP
257 .sp
258 creates the principal \fInewprinc\fP, prompting twice for a password.  If no policy is specified with the \fI\-policy\fP option,
259 and the policy named "default" exists, then that policy is assigned to the principal;
260 note that the assignment of the policy "default" only occurs automatically when a principal is first created,
261 so the policy "default" must already exist for the assignment to occur.
262 This assignment of "default" can be suppressed with the \fI\-clearpolicy\fP option.
263 .INDENT 7.0
264 .INDENT 3.5
265 .IP Note
266 .
267 This command requires the \fIadd\fP privilege.
268 .RE
269 .UNINDENT
270 .UNINDENT
271 .sp
272 Aliases:
273 .sp
274 .nf
275 .ft C
276 addprinc ank
277 .ft P
278 .fi
279 .sp
280 The options are:
281 .INDENT 7.0
282 .TP
283 .B \fB\-x\fP \fIdb_princ_args\fP
284 .INDENT 7.0
285 .INDENT 3.5
286 .sp
287 Denotes the database specific options.
288 .sp
289 The options for LDAP database are:
290 .INDENT 0.0
291 .TP
292 .B \fB\-x\fP dn=<dn>
293 .sp
294 Specifies the LDAP object that will contain the Kerberos principal being created.
295 .TP
296 .B \fB\-x\fP linkdn=<dn>
297 .sp
298 Specifies the LDAP object to which the newly created Kerberos principal object will point to.
299 .TP
300 .B \fB\-x\fP containerdn=<container_dn>
301 .sp
302 Specifies the container object under which the Kerberos principal is to be created.
303 .TP
304 .B \fB\-x\fP tktpolicy=<policy>
305 .sp
306 Associates a ticket policy to the Kerberos principal.
307 .UNINDENT
308 .UNINDENT
309 .UNINDENT
310 .IP Note
311 .INDENT 7.0
312 .IP \(bu 2
313 .
314 \fIcontainerdn\fP and \fIlinkdn\fP options cannot be specified with dn option.
315 .IP \(bu 2
316 .
317 If \fIdn\fP or \fIcontainerdn\fP options are not specified while adding the principal, the principals are created under the prinicipal container configured in the realm or the realm container.
318 .IP \(bu 2
319 .
320 \fIdn\fP and \fIcontainerdn\fP should be within the subtrees or principal container configured in the realm.
321 .UNINDENT
322 .RE
323 .TP
324 .B \fB\-expire\fP \fIexpdate\fP
325 .sp
326 expiration date of the principal
327 .TP
328 .B \fB\-pwexpire\fP \fIpwexpdate\fP
329 .sp
330 password expiration date
331 .TP
332 .B \fB\-maxlife\fP \fImaxlife\fP
333 .sp
334 maximum ticket life for the principal
335 .TP
336 .B \fB\-maxrenewlife\fP \fImaxrenewlife\fP
337 .sp
338 maximum renewable life of tickets for the principal
339 .TP
340 .B \fB\-kvno\fP \fIkvno\fP
341 .sp
342 explicitly set the key version number.
343 .TP
344 .B \fB\-policy\fP \fIpolicy\fP
345 .sp
346 policy used by this principal.
347 If no policy is supplied, then if the policy "default" exists and the \fI\-clearpolicy\fP is not also specified,
348 then the policy "default" is used;
349 otherwise, the principal will have no policy, and a warning message will be printed.
350 .TP
351 .B \fB\-clearpolicy\fP
352 .sp
353 \fI\-clearpolicy\fP prevents the policy "default" from being assigned when \fI\-policy\fP is not specified.
354 This option has no effect if the policy "default" does not exist.
355 .TP
356 .B {\- | +} \fBallow_postdated\fP
357 .sp
358 \fI\-allow_postdated\fP prohibits this principal from obtaining postdated tickets.
359 (Sets the \fIKRB5_KDB_DISALLOW_POSTDATED\fP flag.) \fI+allow_postdated\fP clears this flag.
360 .TP
361 .B {\- | +} \fBallow_forwardable\fP
362 .sp
363 \fI\-allow_forwardable\fP prohibits this principal from obtaining forwardable tickets.
364 (Sets the  \fIKRB5_KDB_DISALLOW_FORWARDABLE\fP flag.)
365 \fI+allow_forwardable\fP clears this flag.
366 .TP
367 .B {\- | +} \fBallow_renewable\fP
368 .sp
369 \fI\-allow_renewable\fP prohibits this principal from obtaining renewable tickets.
370 (Sets the \fIKRB5_KDB_DISALLOW_RENEWABLE\fP flag.)
371 \fI+allow_renewable\fP clears this flag.
372 .TP
373 .B {\- | +} \fBallow_proxiable\fP
374 .sp
375 \fI\-allow_proxiable\fP prohibits this principal from obtaining proxiable tickets.
376 (Sets the \fIKRB5_KDB_DISALLOW_PROXIABLE\fP flag.)
377 \fI+allow_proxiable\fP clears this flag.
378 .TP
379 .B {\- | +} \fBallow_dup_skey\fP
380 .sp
381 \fI\-allow_dup_skey\fP  disables  user\-to\-user  authentication for this principal by prohibiting this principal from obtaining a
382 session key for another user.
383 (Sets the \fIKRB5_KDB_DISALLOW_DUP_SKEY\fP flag.)
384 \fI+allow_dup_skey\fP clears this flag.
385 .TP
386 .B {\- | +} \fBrequires_preauth\fP
387 .sp
388 \fI+requires_preauth\fP  requires  this  principal  to  preauthenticate   before   being   allowed   to   kinit.
389 (Sets   the \fIKRB5_KDB_REQUIRES_PRE_AUTH\fP flag.)
390 \fI\-requires_preauth\fP clears this flag.
391 .TP
392 .B {\- | +} \fBrequires_hwauth\fP
393 .sp
394 \fI+requires_hwauth\fP requires this principal to preauthenticate using a hardware device before being allowed to kinit.
395 (Sets the \fIKRB5_KDB_REQUIRES_HW_AUTH\fP flag.)
396 \fI\-requires_hwauth\fP clears this flag.
397 .TP
398 .B {\- | +} \fBok_as_delegate\fP
399 .sp
400 \fI+ok_as_delegate\fP sets the OK\-AS\-DELEGATE flag on tickets issued for use with this principal as the service,
401 which clients may use as a hint that credentials can and should be delegated when authenticating to the service.
402 (Sets the \fIKRB5_KDB_OK_AS_DELEGATE\fP flag.)
403 \fI\-ok_as_delegate\fP clears this flag.
404 .TP
405 .B {\- | +} \fBallow_svr\fP
406 .sp
407 \fI\-allow_svr\fP prohibits the issuance of service tickets for this principal.
408 (Sets  the  \fIKRB5_KDB_DISALLOW_SVR\fP  flag.)
409 \fI+allow_svr\fP clears this flag.
410 .TP
411 .B {\- | +} \fBallow_tgs_req\fP
412 .sp
413 \fI\-allow_tgs_req\fP specifies that a Ticket\-Granting Service (TGS) request for a service ticket for this principal is not permitted.
414 This option is useless for most things.
415 \fI+allow_tgs_req\fP clears this flag.
416 The default  is  +allow_tgs_req.
417 In effect, \fI\-allow_tgs_req sets\fP the \fIKRB5_KDB_DISALLOW_TGT_BASED\fP flag on the principal in the database.
418 .TP
419 .B {\- | +} \fBallow_tix\fP
420 .sp
421 \fI\-allow_tix\fP forbids the issuance of any tickets for this principal.
422 \fI+allow_tix\fP clears this flag.
423 The default is \fI+allow_tix\fP.  In effect, \fI\-allow_tix\fP sets the \fIKRB5_KDB_DISALLOW_ALL_TIX\fP flag on the principal in the database.
424 .TP
425 .B {\- | +} \fBneedchange\fP
426 .sp
427 \fI+needchange\fP sets a flag in attributes field to force a password change;
428 \fI\-needchange\fP clears it.
429 The  default  is  \fI\-needchange\fP.
430 In effect, \fI+needchange\fP sets the \fIKRB5_KDB_REQUIRES_PWCHANGE\fP flag on the principal in the database.
431 .TP
432 .B {\- | +} \fBpassword_changing_service\fP
433 .sp
434 \fI+password_changing_service\fP  sets a flag in the attributes field marking this as a password change service principal
435 (useless for most things).
436 \fI\-password_changing_service\fP clears the flag.  This  flag  intentionally  has  a  long  name.
437 The default  is \fI\-password_changing_service\fP.
438 In effect, \fI+password_changing_service\fP sets the \fIKRB5_KDB_PWCHANGE_SERVICE\fP flag on the principal in the database.
439 .TP
440 .B \fB\-randkey\fP
441 .sp
442 sets the key of the principal to a random value
443 .TP
444 .B \fB\-pw\fP \fIpassword\fP
445 .sp
446 sets the key of the principal to the specified string and does not prompt for a password.  Note:  using this option in  a
447 shell script can be dangerous if unauthorized users gain read access to the script.
448 .TP
449 .B \fB\-e\fP "enc:salt ..."
450 .sp
451 uses the specified list of enctype\-salttype pairs for setting the key of the principal. The quotes are necessary if
452 there are multiple enctype\-salttype pairs.  This will not function against \fIkadmin\fP daemons earlier than krb5\-1.2.
453 .UNINDENT
454 .sp
455 EXAMPLE:
456 .sp
457 .nf
458 .ft C
459 kadmin: addprinc jennifer
460 WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU";
461 defaulting to no policy.
462 Enter password for principal jennifer@ATHENA.MIT.EDU:  <= Type the password.
463 Re\-enter password for principal jennifer@ATHENA.MIT.EDU:  <=Type it again.
464 Principal "jennifer@ATHENA.MIT.EDU" created.
465 kadmin:
466 .ft P
467 .fi
468 .sp
469 ERRORS:
470 .sp
471 .nf
472 .ft C
473 KADM5_AUTH_ADD (requires "add" privilege)
474 KADM5_BAD_MASK (shouldn\(aqt happen)
475 KADM5_DUP (principal exists already)
476 KADM5_UNK_POLICY (policy does not exist)
477 KADM5_PASS_Q_* (password quality violations)
478 .ft P
479 .fi
480 .UNINDENT
481 .UNINDENT
482 .UNINDENT
483 .SS modify_principal
484 .INDENT 0.0
485 .INDENT 3.5
486 .INDENT 0.0
487 .TP
488 .B \fBmodify_principal\fP [options] \fIprincipal\fP
489 .sp
490 Modifies the specified principal, changing the fields as specified. The options are as above for \fIadd_principal\fP, except that
491 password changing and flags related to password changing are forbidden by this command.
492 In addition, the option \fI\-clearpolicy\fP will clear the current policy of a principal.
493 .INDENT 7.0
494 .INDENT 3.5
495 .IP Note
496 .
497 This command requires the \fImodify\fP privilege.
498 .RE
499 .UNINDENT
500 .UNINDENT
501 .sp
502 Alias:
503 .sp
504 .nf
505 .ft C
506 modprinc
507 .ft P
508 .fi
509 .sp
510 The options are:
511 .INDENT 7.0
512 .TP
513 .B \fB\-x\fP \fIdb_princ_args\fP
514 .sp
515 Denotes the database specific options.
516 .sp
517 The options for LDAP database are:
518 .INDENT 7.0
519 .TP
520 .B \fB\-x\fP tktpolicy=<policy>
521 .sp
522 Associates a ticket policy to the Kerberos principal.
523 .TP
524 .B \fB\-x\fP linkdn=<dn>
525 .sp
526 Associates  a  Kerberos principal with a LDAP object. This option is honored only if the Kerberos principal is not
527 already associated with a LDAP object.
528 .UNINDENT
529 .TP
530 .B \fB\-unlock\fP
531 .sp
532 Unlocks a locked principal (one which has received too many failed authentication attempts without  enough  time  between
533 them according to its password policy) so that it can successfully authenticate.
534 .UNINDENT
535 .sp
536 ERRORS:
537 .sp
538 .nf
539 .ft C
540 KADM5_AUTH_MODIFY  (requires "modify" privilege)
541 KADM5_UNK_PRINC (principal does not exist)
542 KADM5_UNK_POLICY (policy does not exist)
543 KADM5_BAD_MASK (shouldn\(aqt happen)
544 .ft P
545 .fi
546 .UNINDENT
547 .UNINDENT
548 .UNINDENT
549 .SS delete_principal
550 .INDENT 0.0
551 .INDENT 3.5
552 .INDENT 0.0
553 .TP
554 .B \fBdelete_principal\fP [ \fI\-force\fP ] \fIprincipal\fP
555 .sp
556 Deletes the specified \fIprincipal\fP from the database.  This command prompts for deletion, unless the \fI\-force\fP option is  given.
557 .INDENT 7.0
558 .INDENT 3.5
559 .IP Note
560 .
561 This command requires the \fIdelete\fP privilege.
562 .RE
563 .UNINDENT
564 .UNINDENT
565 .sp
566 Alias:
567 .sp
568 .nf
569 .ft C
570 delprinc
571 .ft P
572 .fi
573 .sp
574 ERRORS:
575 .sp
576 .nf
577 .ft C
578 KADM5_AUTH_DELETE (requires "delete" privilege)
579 KADM5_UNK_PRINC (principal does not exist)
580 .ft P
581 .fi
582 .UNINDENT
583 .UNINDENT
584 .UNINDENT
585 .SS change_password
586 .INDENT 0.0
587 .INDENT 3.5
588 .INDENT 0.0
589 .TP
590 .B \fBchange_password\fP [options] \fIprincipal\fP
591 .sp
592 Changes the password of \fIprincipal\fP.  Prompts for a new password if neither \fI\-randkey\fP or \fI\-pw\fP is specified.
593 .INDENT 7.0
594 .INDENT 3.5
595 .IP Note
596 .
597 Requires  the  \fIchangepw\fP privilege,  or that the principal that is running the program to be the same as the one changed.
598 .RE
599 .UNINDENT
600 .UNINDENT
601 .sp
602 Alias:
603 .sp
604 .nf
605 .ft C
606 cpw
607 .ft P
608 .fi
609 .sp
610 The following options are available:
611 .INDENT 7.0
612 .TP
613 .B \fB\-randkey\fP
614 .sp
615 Sets the key of the principal to a random value
616 .TP
617 .B \fB\-pw\fP \fIpassword\fP
618 .sp
619 Set the password to the specified string.  Not recommended.
620 .TP
621 .B \fB\-e\fP "enc:salt ..."
622 .sp
623 Uses the specified list of enctype\-salttype pairs for setting the key of the principal.   The quotes are necessary if
624 there are multiple enctype\-salttype pairs.  This will not function against \fIkadmin\fP daemons earlier than krb5\-1.2.
625 See \fISupported_Encryption_Types_and_Salts\fP for possible values.
626 .TP
627 .B \fB\-keepold\fP
628 .sp
629 Keeps the previous kvno\(aqs keys around.  This flag is usually not necessary except perhaps for TGS keys.  Don\(aqt use this
630 flag unless you know what you\(aqre doing. This option is not supported for the LDAP database.
631 .UNINDENT
632 .sp
633 EXAMPLE:
634 .sp
635 .nf
636 .ft C
637 kadmin: cpw systest
638 Enter password for principal systest@BLEEP.COM:
639 Re\-enter password for principal systest@BLEEP.COM:
640 Password for systest@BLEEP.COM changed.
641 kadmin:
642 .ft P
643 .fi
644 .sp
645 ERRORS:
646 .sp
647 .nf
648 .ft C
649 KADM5_AUTH_MODIFY (requires the modify privilege)
650 KADM5_UNK_PRINC (principal does not exist)
651 KADM5_PASS_Q_* (password policy violation errors)
652 KADM5_PADD_REUSE (password is in principal\(aqs password
653 history)
654 KADM5_PASS_TOOSOON (current password minimum life not
655 expired)
656 .ft P
657 .fi
658 .UNINDENT
659 .UNINDENT
660 .UNINDENT
661 .SS purgekeys
662 .INDENT 0.0
663 .INDENT 3.5
664 .INDENT 0.0
665 .TP
666 .B \fBpurgekeys\fP [\fI\-keepkvno oldest_kvno_to_keep\fP ] \fIprincipal\fP
667 .sp
668 Purges previously retained old keys (e.g., from \fIchange_password \-keepold\fP) from \fIprincipal\fP.
669 If \fB\-keepkvno\fP is specified, then only purges keys with kvnos lower than \fIoldest_kvno_to_keep\fP.
670 .UNINDENT
671 .UNINDENT
672 .UNINDENT
673 .SS get_principal
674 .INDENT 0.0
675 .INDENT 3.5
676 .INDENT 0.0
677 .TP
678 .B \fBget_principal\fP [\fI\-terse\fP] \fIprincipal\fP
679 .sp
680 Gets  the  attributes of principal.
681 With the \fB\-terse\fP option, outputs fields as quoted tab\-separated strings.
682 .INDENT 7.0
683 .INDENT 3.5
684 .IP Note
685 .
686 Requires the \fIinquire\fP privilege, or that the principal that is running the the program to be the same as the one being listed.
687 .RE
688 .UNINDENT
689 .UNINDENT
690 .sp
691 Alias:
692 .sp
693 .nf
694 .ft C
695 getprinc
696 .ft P
697 .fi
698 .sp
699 EXAMPLES:
700 .sp
701 .nf
702 .ft C
703 kadmin: getprinc tlyu/admin
704 Principal: tlyu/admin@BLEEP.COM
705 Expiration date: [never]
706 Last password change: Mon Aug 12 14:16:47 EDT 1996
707 Password expiration date: [none]
708 Maximum ticket life: 0 days 10:00:00
709 Maximum renewable life: 7 days 00:00:00
710 Last modified: Mon Aug 12 14:16:47 EDT 1996 (bjaspan/admin@BLEEP.COM)
711 Last successful authentication: [never]
712 Last failed authentication: [never]
713 Failed password attempts: 0
714 Number of keys: 2
715 Key: vno 1, DES cbc mode with CRC\-32, no salt
716 Key: vno 1, DES cbc mode with CRC\-32, Version 4
717 Attributes:
718 Policy: [none]
719
720
721 kadmin: getprinc \-terse systest
722 systest@BLEEP.COM   3    86400     604800    1
723 785926535 753241234 785900000
724 tlyu/admin@BLEEP.COM     786100034 0    0
725 kadmin:
726 .ft P
727 .fi
728 .sp
729 ERRORS:
730 .sp
731 .nf
732 .ft C
733 KADM5_AUTH_GET (requires the get (inquire) privilege)
734 KADM5_UNK_PRINC (principal does not exist)
735 .ft P
736 .fi
737 .UNINDENT
738 .UNINDENT
739 .UNINDENT
740 .SS list_principals
741 .INDENT 0.0
742 .INDENT 3.5
743 .INDENT 0.0
744 .TP
745 .B \fBlist_principals\fP [expression]
746 .sp
747 Retrieves all or some principal names.
748 Expression is a shell\-style glob expression that can contain the wild\-card characters ?, *,  and  []\(aqs.
749 All principal names matching the expression are printed.
750 If no expression is provided, all principal names are printed.
751 If the expression does not contain an "@" character, an "@" character followed by the local realm is appended  to  the expression.
752 .INDENT 7.0
753 .INDENT 3.5
754 .IP Note
755 .
756 Requires the \fIlist\fP privilege.
757 .RE
758 .UNINDENT
759 .UNINDENT
760 .sp
761 Aliases:
762 .sp
763 .nf
764 .ft C
765 listprincs get_principals get_princs
766 .ft P
767 .fi
768 .sp
769 EXAMPLES:
770 .sp
771 .nf
772 .ft C
773 kadmin:  listprincs test*
774 test3@SECURE\-TEST.OV.COM
775 test2@SECURE\-TEST.OV.COM
776 test1@SECURE\-TEST.OV.COM
777 testuser@SECURE\-TEST.OV.COM
778 kadmin:
779 .ft P
780 .fi
781 .UNINDENT
782 .UNINDENT
783 .UNINDENT
784 .SS get_strings
785 .INDENT 0.0
786 .INDENT 3.5
787 .INDENT 0.0
788 .TP
789 .B \fBget_strings\fP \fIprincipal\fP
790 .sp
791 Displays string attributes on \fIprincipal\fP.
792 String attributes are used to supply per\-principal configuration to some KDC plugin modules.
793 .sp
794 Alias:
795 .sp
796 .nf
797 .ft C
798 getstr
799 .ft P
800 .fi
801 .UNINDENT
802 .UNINDENT
803 .UNINDENT
804 .SS set_string
805 .INDENT 0.0
806 .INDENT 3.5
807 .INDENT 0.0
808 .TP
809 .B \fBset_string\fP \fIprincipal\fP \fIkey\fP \fIvalue\fP
810 .sp
811 Sets a string attribute on \fIprincipal\fP.
812 .sp
813 Alias:
814 .sp
815 .nf
816 .ft C
817 setstr
818 .ft P
819 .fi
820 .UNINDENT
821 .UNINDENT
822 .UNINDENT
823 .SS del_string
824 .INDENT 0.0
825 .INDENT 3.5
826 .INDENT 0.0
827 .TP
828 .B \fBdel_string\fP \fIprincipal\fP \fIkey\fP
829 .sp
830 Deletes a string attribute from \fIprincipal\fP.
831 .sp
832 Alias:
833 .sp
834 .nf
835 .ft C
836 delstr
837 .ft P
838 .fi
839 .UNINDENT
840 .UNINDENT
841 .UNINDENT
842 .SS add_policy
843 .INDENT 0.0
844 .INDENT 3.5
845 .INDENT 0.0
846 .TP
847 .B \fBadd_policy\fP [options] \fIpolicy\fP
848 .sp
849 Adds the named \fIpolicy\fP to the policy database.
850 .INDENT 7.0
851 .INDENT 3.5
852 .IP Note
853 .
854 Requires the \fIadd\fP privilege.
855 .RE
856 .UNINDENT
857 .UNINDENT
858 .sp
859 Alias:
860 .sp
861 .nf
862 .ft C
863 addpol
864 .ft P
865 .fi
866 .sp
867 The following options are available:
868 .INDENT 7.0
869 .TP
870 .B \fB\-maxlife\fP \fItime\fP
871 .sp
872 sets the maximum lifetime of a password
873 .TP
874 .B \fB\-minlife\fP \fItime\fP
875 .sp
876 sets the minimum lifetime of a password
877 .TP
878 .B \fB\-minlength\fP \fIlength\fP
879 .sp
880 sets the minimum length of a password
881 .TP
882 .B \fB\-minclasses\fP \fInumber\fP
883 .sp
884 sets the minimum number of character classes allowed in a password
885 .TP
886 .B \fB\-history\fP \fInumber\fP
887 .sp
888 sets the number of past keys kept for a principal. This option is not supported for LDAP database
889 .TP
890 .B \fB\-maxfailure\fP \fImaxnumber\fP
891 .sp
892 sets the maximum number of authentication failures before the principal is  locked.
893 Authentication failures are only tracked for principals which require preauthentication.
894 .TP
895 .B \fB\-failurecountinterval\fP \fIfailuretime\fP
896 .sp
897 sets  the  allowable  time  between  authentication failures.
898 If an authentication failure happens after \fIfailuretime\fP has elapsed since the previous failure,
899 the number of authentication failures is reset to 1.
900 .TP
901 .B \fB\-lockoutduration\fP \fIlockouttime\fP
902 .sp
903 sets the duration for which the principal is locked from authenticating if too many authentication failures occur without
904 the specified failure count interval elapsing. A duration of 0 means forever.
905 .UNINDENT
906 .sp
907 EXAMPLES:
908 .sp
909 .nf
910 .ft C
911 kadmin: add_policy \-maxlife "2 days" \-minlength 5 guests
912 kadmin:
913 .ft P
914 .fi
915 .sp
916 ERRORS:
917 .sp
918 .nf
919 .ft C
920 KADM5_AUTH_ADD (requires the add privilege)
921 KADM5_DUP (policy already exists)
922 .ft P
923 .fi
924 .UNINDENT
925 .UNINDENT
926 .UNINDENT
927 .SS modify_policy
928 .INDENT 0.0
929 .INDENT 3.5
930 .INDENT 0.0
931 .TP
932 .B \fBmodify_policy\fP [options] \fIpolicy\fP
933 .sp
934 modifies the named \fIpolicy\fP.  Options are as above for \fIadd_policy\fP.
935 .INDENT 7.0
936 .INDENT 3.5
937 .IP Note
938 .
939 Requires the \fImodify\fP privilege.
940 .RE
941 .UNINDENT
942 .UNINDENT
943 .sp
944 Alias:
945 .sp
946 .nf
947 .ft C
948 modpol
949 .ft P
950 .fi
951 .sp
952 ERRORS:
953 .sp
954 .nf
955 .ft C
956 KADM5_AUTH_MODIFY (requires the modify privilege)
957 KADM5_UNK_POLICY (policy does not exist)
958 .ft P
959 .fi
960 .UNINDENT
961 .UNINDENT
962 .UNINDENT
963 .SS delete_policy
964 .INDENT 0.0
965 .INDENT 3.5
966 .INDENT 0.0
967 .TP
968 .B \fBdelete_policy\fP [ \fI\-force\fP ] \fIpolicy\fP
969 .sp
970 deletes the named \fIpolicy\fP.  Prompts for confirmation before deletion.
971 The command will fail if the policy is in use by any principals.
972 .INDENT 7.0
973 .INDENT 3.5
974 .IP Note
975 .
976 Requires the \fIdelete\fP privilege.
977 .RE
978 .UNINDENT
979 .UNINDENT
980 .sp
981 Alias:
982 .sp
983 .nf
984 .ft C
985 delpol
986 .ft P
987 .fi
988 .sp
989 EXAMPLE:
990 .sp
991 .nf
992 .ft C
993 kadmin: del_policy guests
994 Are you sure you want to delete the policy "guests"?
995 (yes/no): yes
996 kadmin:
997 .ft P
998 .fi
999 .sp
1000 ERRORS:
1001 .sp
1002 .nf
1003 .ft C
1004 KADM5_AUTH_DELETE (requires the delete privilege)
1005 KADM5_UNK_POLICY (policy does not exist)
1006 KADM5_POLICY_REF (reference count on policy is not zero)
1007 .ft P
1008 .fi
1009 .UNINDENT
1010 .UNINDENT
1011 .UNINDENT
1012 .SS get_policy
1013 .INDENT 0.0
1014 .INDENT 3.5
1015 .INDENT 0.0
1016 .TP
1017 .B \fBget_policy\fP [ \fB\-terse\fP ] \fIpolicy\fP
1018 .sp
1019 displays the values of the named \fIpolicy\fP.
1020 With the \fB\-terse\fP flag, outputs the fields as quoted strings separated by tabs.
1021 .INDENT 7.0
1022 .INDENT 3.5
1023 .IP Note
1024 .
1025 Requires the \fIinquire\fP privilege.
1026 .RE
1027 .UNINDENT
1028 .UNINDENT
1029 .sp
1030 Alias:
1031 .sp
1032 .nf
1033 .ft C
1034 getpol
1035 .ft P
1036 .fi
1037 .sp
1038 EXAMPLES:
1039 .sp
1040 .nf
1041 .ft C
1042 kadmin: get_policy admin
1043 Policy: admin
1044 Maximum password life: 180 days 00:00:00
1045 Minimum password life: 00:00:00
1046 Minimum password length: 6
1047 Minimum number of password character classes: 2
1048 Number of old keys kept: 5
1049 Reference count: 17
1050
1051 kadmin: get_policy \-terse admin
1052 admin     15552000  0    6    2    5    17
1053 kadmin:
1054 .ft P
1055 .fi
1056 .sp
1057 The \fIReference count\fP is the number of principals using that policy.
1058 .sp
1059 ERRORS:
1060 .sp
1061 .nf
1062 .ft C
1063 KADM5_AUTH_GET (requires the get privilege)
1064 KADM5_UNK_POLICY (policy does not exist)
1065 .ft P
1066 .fi
1067 .UNINDENT
1068 .UNINDENT
1069 .UNINDENT
1070 .SS list_policies
1071 .INDENT 0.0
1072 .INDENT 3.5
1073 .INDENT 0.0
1074 .TP
1075 .B \fBlist_policies\fP [expression]
1076 .sp
1077 Retrieves all or some policy names.  Expression is a shell\-style glob expression that can contain the wild\-card characters ?, *, and []\(aqs.
1078 All policy names matching the expression are printed.
1079 If no expression is provided, all existing policy names are printed.
1080 .INDENT 7.0
1081 .INDENT 3.5
1082 .IP Note
1083 .
1084 Requires the \fIlist\fP privilege.
1085 .RE
1086 .UNINDENT
1087 .UNINDENT
1088 .sp
1089 Alias:
1090 .sp
1091 .nf
1092 .ft C
1093 listpols, get_policies, getpols.
1094 .ft P
1095 .fi
1096 .sp
1097 EXAMPLES:
1098 .sp
1099 .nf
1100 .ft C
1101 kadmin:  listpols
1102 test\-pol
1103 dict\-only
1104 once\-a\-min
1105 test\-pol\-nopw
1106
1107 kadmin:  listpols t*
1108 test\-pol
1109 test\-pol\-nopw
1110 kadmin:
1111 .ft P
1112 .fi
1113 .UNINDENT
1114 .UNINDENT
1115 .UNINDENT
1116 .SS ktadd
1117 .INDENT 0.0
1118 .INDENT 3.5
1119 .INDENT 0.0
1120 .TP
1121 .B \fBktadd\fP  [[\fIprincipal\fP | \fB\-glob\fP \fIprinc\-exp\fP]
1122 .sp
1123 Adds a \fIprincipal\fP or all principals matching \fIprinc\-exp\fP to a keytab file.
1124 It randomizes each principal\(aqs key in the process, to prevent a compromised admin account from reading out all of the keys from the database.
1125 The rules for principal expression are the same as for the \fIkadmin\fP \fI\%list_principals\fP command.
1126 .INDENT 7.0
1127 .INDENT 3.5
1128 .IP Note
1129 .
1130 Requires the  \fIinquire\fP and \fIchangepw\fP privileges.
1131 .sp
1132 If you use the \fI\-glob\fP option, it also requires the \fIlist\fP administrative privilege.
1133 .RE
1134 .UNINDENT
1135 .UNINDENT
1136 .sp
1137 The options are:
1138 .INDENT 7.0
1139 .TP
1140 .B \fB\-k[eytab]\fP  \fIkeytab\fP
1141 .sp
1142 Use \fIkeytab\fP as the keytab file. Otherwise, \fIktadd\fP will use the default keytab file (\fI/etc/krb5.keytab\fP).
1143 .TP
1144 .B \fB\-e\fP \fI"enc:salt..."\fP
1145 .sp
1146 Use the specified list of enctype\-salttype pairs for setting the key of the principal.
1147 The enctype\-salttype pairs may be delimited with commas or whitespace.
1148 The quotes are necessary for whitespace\-delimited list.
1149 If this option is not specified, then \fIsupported_enctypes\fP from \fIkrb5.conf\fP will be used.
1150 See \fISupported_Encryption_Types_and_Salts\fP for all possible values.
1151 .TP
1152 .B \fB\-q\fP
1153 .sp
1154 Run in quiet mode. This causes \fIktadd\fP to display less verbose information.
1155 .TP
1156 .B \fB\-norandkey\fP
1157 .sp
1158 Do not randomize the keys. The keys and their version numbers stay unchanged.
1159 That allows users to continue to use the passwords they know to login normally,
1160 while simultaneously allowing scripts to login to the same account using a \fIkeytab\fP.
1161 There is no significant security risk added since \fIkadmin.local\fP must be run by root on the KDC anyway.
1162 This option is only available in \fIkadmin.local\fP and cannot be specified in combination with \fI\-e\fP option.
1163 .UNINDENT
1164 .IP Note
1165 .
1166 An entry for each of the principal\(aqs unique encryption types is added, ignoring multiple keys with the same encryption type but different salt types.
1167 .RE
1168 .sp
1169 EXAMPLE:
1170 .sp
1171 .nf
1172 .ft C
1173 kadmin: ktadd \-k /tmp/foo\-new\-keytab host/foo.mit.edu
1174 Entry for principal host/foo.mit.edu@ATHENA.MIT.EDU with
1175      kvno 3, encryption type DES\-CBC\-CRC added to keytab
1176      WRFILE:/tmp/foo\-new\-keytab
1177 kadmin:
1178 .ft P
1179 .fi
1180 .UNINDENT
1181 .UNINDENT
1182 .UNINDENT
1183 .SS ktremove
1184 .INDENT 0.0
1185 .INDENT 3.5
1186 .INDENT 0.0
1187 .TP
1188 .B \fBktremove\fP  \fIprincipal\fP [\fIkvno\fP | \fIall\fP | \fIold\fP]
1189 .sp
1190 Removes entries for the specified \fIprincipal\fP from a keytab.  Requires no permissions, since this does not require database access.
1191 .sp
1192 If the string "all" is specified, all entries for that principal are removed;
1193 if the string "old" is specified, all entries for that principal except those with the highest kvno are removed.
1194 Otherwise, the value specified is parsed as an integer, and all entries whose \fIkvno\fP match that integer are removed.
1195 .sp
1196 The options are:
1197 .INDENT 7.0
1198 .TP
1199 .B \fB\-k[eytab]\fP  \fIkeytab\fP
1200 .sp
1201 Use keytab as the keytab file. Otherwise, \fIktremove\fP will use the default keytab file (\fI/etc/krb5.keytab\fP).
1202 .TP
1203 .B \fB\-q\fP
1204 .sp
1205 Run in quiet mode. This causes \fIktremove\fP to display less verbose information.
1206 .UNINDENT
1207 .sp
1208 EXAMPLE:
1209 .sp
1210 .nf
1211 .ft C
1212 kadmin: ktremove \-k /usr/local/var/krb5kdc/kadmind.keytab kadmin/admin all
1213 Entry for principal kadmin/admin with kvno 3 removed
1214      from keytab WRFILE:/usr/local/var/krb5kdc/kadmind.keytab.
1215 kadmin:
1216 .ft P
1217 .fi
1218 .UNINDENT
1219 .UNINDENT
1220 .UNINDENT
1221 .SH FILES
1222 .IP Note
1223 .
1224 The first three files are specific to db2 database.
1225 .RE
1226 .TS
1227 center;
1228 |l|l|.
1229 _
1230 T{
1231 principal.db
1232 T}      T{
1233 default name for Kerberos principal database
1234 T}
1235 _
1236 T{
1237 <dbname>.kadm5
1238 T}      T{
1239 KADM5 administrative database. (This would be "principal.kadm5", if you use the default database name.)  Contains policy information.
1240 T}
1241 _
1242 T{
1243 <dbname>.kadm5.lock
1244 T}      T{
1245 Lock file for the KADM5 administrative database.  This file works backwards from most other lock files. I.e., \fIkadmin\fP will exit with an error if this file does not exist.
1246 T}
1247 _
1248 T{
1249 kadm5.acl
1250 T}      T{
1251 File containing list of principals and their \fIkadmin\fP administrative privileges.  See kadmind(8) for a description.
1252 T}
1253 _
1254 T{
1255 kadm5.keytab
1256 T}      T{
1257 \fIkeytab\fP file for \fIkadmin/admin\fP principal.
1258 T}
1259 _
1260 T{
1261 kadm5.dict
1262 T}      T{
1263 file containing dictionary of strings explicitly disallowed as passwords.
1264 T}
1265 _
1266 .TE
1267 .SH HISTORY
1268 .sp
1269 The \fIkadmin\fP program was originally written by Tom Yu at MIT, as an interface to the OpenVision Kerberos administration program.
1270 .SH SEE ALSO
1271 .sp
1272 kerberos(1), kpasswd(1), kadmind(8)
1273 .SH AUTHOR
1274 MIT
1275 .SH COPYRIGHT
1276 2011, MIT
1277 .\" Generated by docutils manpage writer.
1278 .