hx509: For times before 2050 use UTCTime (fix pasto)
[heimdal.git] / kadmin / kadmin.1
blob09381a6b3cd9e0265d0e50a17abbd5ab1df28dc3
1 .\" Copyright (c) 2000 - 2007 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" $Id$
33 .\"
34 .Dd Feb  22, 2007
35 .Dt KADMIN 1
36 .Os HEIMDAL
37 .Sh NAME
38 .Nm kadmin
39 .Nd Kerberos administration utility
40 .Sh SYNOPSIS
41 .Nm
42 .Bk -words
43 .Op Fl p Ar string \*(Ba Fl Fl principal= Ns Ar string
44 .Op Fl K Ar string \*(Ba Fl Fl keytab= Ns Ar string
45 .Op Fl c Ar file \*(Ba Fl Fl config-file= Ns Ar file
46 .Op Fl k Ar file \*(Ba Fl Fl key-file= Ns Ar file
47 .Op Fl r Ar realm \*(Ba Fl Fl realm= Ns Ar realm
48 .Op Fl a Ar host \*(Ba Fl Fl admin-server= Ns Ar host
49 .Op Fl s Ar port number \*(Ba Fl Fl server-port= Ns Ar port number
50 .Op Fl l | Fl Fl local
51 .Op Fl h | Fl Fl help
52 .Op Fl v | Fl Fl version
53 .Op Ar command
54 .Ek
55 .Sh DESCRIPTION
56 The
57 .Nm
58 program is used to make modifications to the Kerberos database, either remotely via the
59 .Xr kadmind 8
60 daemon, or locally (with the
61 .Fl l
62 option).
63 .Pp
64 Supported options:
65 .Bl -tag -width Ds
66 .It Fl p Ar string , Fl Fl principal= Ns Ar string
67 principal to authenticate as
68 .It Fl K Ar string , Fl Fl keytab= Ns Ar string
69 keytab for authentication principal
70 .It Fl c Ar file , Fl Fl config-file= Ns Ar file
71 location of config file
72 .It Fl H Ar HDB , Fl Fl hdb= Ns Ar HDB
73 location of HDB
74 .It Fl k Ar file , Fl Fl key-file= Ns Ar file
75 location of master key file
76 .It Fl r Ar realm , Fl Fl realm= Ns Ar realm
77 realm to use
78 .It Fl a Ar host , Fl Fl admin-server= Ns Ar host
79 server to contact
80 .It Fl s Ar port number , Fl Fl server-port= Ns Ar port number
81 port to use
82 .It Fl l , Fl Fl local
83 local admin mode
84 .El
85 .Pp
86 If no
87 .Ar command
88 is given on the command line,
89 .Nm
90 will prompt for commands to process. Some of the commands that take
91 one or more principals as argument
92 .Ns ( Nm delete ,
93 .Nm ext_keytab ,
94 .Nm get ,
95 .Nm modify ,
96 and
97 .Nm passwd )
98 will accept a glob style wildcard, and perform the operation on all
99 matching principals.
101 Commands include:
102 .\" not using a list here, since groff apparently gets confused
103 .\" with nested Xo/Xc
105 .Nm add
106 .Op Fl r | Fl Fl random-key
107 .Op Fl Fl enctypes= Ns Ar string
108 .Op Fl Fl random-password
109 .Op Fl p Ar string \*(Ba Fl Fl password= Ns Ar string
110 .Op Fl Fl key= Ns Ar string
111 .Op Fl Fl max-ticket-life= Ns Ar lifetime
112 .Op Fl Fl max-renewable-life= Ns Ar lifetime
113 .Op Fl Fl attributes= Ns Ar attributes
114 .Op Fl Fl expiration-time= Ns Ar time
115 .Op Fl Fl pw-expiration-time= Ns Ar time
116 .Op Fl Fl policy= Ns Ar policy-name
117 .Ar principal...
118 .Bd -ragged -offset indent
119 Adds a new principal to the database. The options not passed on the
120 command line will be promped for.
121 If enctypes to use are not given, then the
122 .Ar [libdefaults] supported_enctypes
123 configuration parameter will be used on the client side to select
124 enctypes, defaulting to
125 .Ar aes128-cts-hmac-sha1-96.
126 For compatibility with MIT, the enctypes string is a space- or
127 comma-separated list of enctype:salttype.
129 .Fl Fl keepold
130 is given, then old keys needed to decrypt extant tickets are
131 kept, and all other old keys are deleted.
133 .Fl Fl keepallold
134 is given then all old keys are kept.  If
135 .Fl Fl pruneall is given then all old keys are removed.
137 .Fl Fl keepold
138 behavior is the default if none of these are given.
139 The only policy supported by Heimdal servers is
140 .Ql default .
143 .Nm add_namespace
144 .Ar Fl Fl key-rotation-epoch= Ns Ar time
145 .Ar Fl Fl key-rotation-period= Ns Ar time
146 .Op Fl Fl enctypes= Ns Ar string
147 .Op Fl Fl max-ticket-life= Ns Ar lifetime
148 .Op Fl Fl max-renewable-life= Ns Ar lifetime
149 .Op Fl Fl attributes= Ns Ar attributes
150 .Ar principal...
151 .Bd -ragged -offset indent
152 Adds a new namespace of virtual host-based or domain-based
153 principals to the database, whose keys will be automatically
154 derived from base keys stored in the namespace record, and which
155 keys will be rotated automatically.
156 The namespace names should look like
157 .Ar hostname@REALM
158 and these will match all host-based or domain-based service names
159 where hostname component of such a principal ends in the labels
160 of the hostname in the namespace name.
162 For example,
163 .Ar bar.baz.example@BAZ.EXAMPLE
164 will match
165 .Ar host/foo.bar.baz.example@BAZ.EXAMPLE
166 but not
167 .Ar host/foobar.baz.example@BAZ.EXAMPLE .
169 Note well that services are expected to
170 .Ar ext_keytab
171 or otherwise re-fetch their keytabs at least as often as one
172 quarter of the key rotation period, otherwise they risk not
173 having keys they need to decrypt tickets with.
175 The epoch must be given as either an absolute time,
176 .Ar "now",
177 or as
178 .Ar "+<N>[<unit>]"
179 where
180 .Ar N
181 is a natural and
182 .Ar unit
183 is one "s", "m", "h", "day", "week", "month", defaulting to
184 "month".
185 The default key rotation period is
186 .Ar 7d .
187 The default enctypes is as for the
188 .Nm add
189 command.
192 .Nm add_enctype
193 .Op Fl r | Fl Fl random-key
194 .Ar principal enctypes...
196 .Bd -ragged -offset indent
197 Adds a new encryption type to the principal, only random key are
198 supported.
201 .Nm delete
202 .Ar principal...
203 .Bd -ragged -offset indent
204 Removes a principal.
207 .Nm del_enctype
208 .Ar principal enctypes...
209 .Bd -ragged -offset indent
210 Removes some enctypes from a principal; this can be useful if the
211 service belonging to the principal is known to not handle certain
212 enctypes.
215 .Nm prune
216 .Ar principal [kvno]
217 .Bd -ragged -offset indent
218 Deletes the named principal's keys of the given kvno.  If a kvno is
219 not given then this deletes all the named principals keys that are
220 too old to be needed for decrypting tickets issued using those keys
221 (i.e., any such tickets are necessarily expired).  The determination
222 of "too old" is made using the max-ticket-life attribute of the
223 principal; though in practice that max ticket life is also constrained
224 by the max-ticket-life of the client principals and the krbtgt
225 principals, those are not consulted here.
228 .Nm ext_keytab
229 .Oo Fl k Ar keytab \*(Ba Xo
230 .Op Fl Fl keepold | Fl Fl keepallold | Fl Fl pruneall
231 .Op Fl Fl enctypes= Ns Ar string
232 .Fl Fl keytab= Ns Ar string
235 .Ar principal...
236 .Bd -ragged -offset indent
237 Creates a keytab with the keys of the specified principals.  Requires
238 get-keys rights, otherwise the principal's keys are changed and saved in
239 the keytab.
240 If enctypes to use are not given, then the
241 .Ar [libdefaults] supported_enctypes
242 configuration parameter will be used on the client side to select
243 enctypes, defaulting to
244 .Ar aes128-cts-hmac-sha1-96.
245 For compatibility with MIT, the enctypes string is a space- or
246 comma-separated list of enctype:salttype.
248 .Fl Fl keepold
249 is given, then old keys needed to decrypt extant tickets are
250 kept, and all other old keys are deleted.
252 .Fl Fl keepallold
253 is given then all old keys are kept.  If
254 .Fl Fl pruneall is given then all old keys are removed.
256 .Fl Fl keepold
257 behavior is the default if none of these are given.
260 .Nm get
261 .Op Fl l | Fl Fl long
262 .Op Fl s | Fl Fl short
263 .Op Fl t | Fl Fl terse
264 .Op Fl o Ar string | Fl Fl column-info= Ns Ar string
265 .Op Fl C Ar path | Fl Fl krb5-config-file= Ns Ar path
266 .Ar principal...
267 .Bd -ragged -offset indent
268 Lists the matching principals, short prints the result as a table,
269 while long format produces a more verbose output. Which columns to
270 print can be selected with the
271 .Fl o
272 option. The argument is a comma separated list of column names
273 optionally appended with an equal sign
274 .Pq Sq =
275 and a column header. Which columns are printed by default differ
276 slightly between short and long output.
278 The default terse output format is similar to
279 .Fl s o Ar principal= ,
280 just printing the names of matched principals.
283 .Fl C
285 .Fl Fl krb5-config-file
286 is given and the principal has krb5 config file contents saved
287 in its HDB entry, then that will be saved in the given file.
288 Note that if multiple principals are requested, then the second,
289 third, and so on will have -1, -2, and so on appended to the
290 given filename unless the given filename is a device name.
292 Possible column names include:
293 .Li principal ,
294 .Li princ_expire_time ,
295 .Li pw_expiration ,
296 .Li last_pwd_change ,
297 .Li max_life ,
298 .Li max_rlife ,
299 .Li mod_time ,
300 .Li mod_name ,
301 .Li attributes ,
302 .Li kvno ,
303 .Li mkvno ,
304 .Li last_success ,
305 .Li last_failed ,
306 .Li fail_auth_count ,
307 .Li policy ,
309 .Li keytypes .
312 .Nm modify
313 .Oo Fl a Ar attributes \*(Ba Xo
314 .Fl Fl attributes= Ns Ar attributes
317 .Op Fl Fl max-ticket-life= Ns Ar lifetime
318 .Op Fl Fl max-renewable-life= Ns Ar lifetime
319 .Op Fl Fl expiration-time= Ns Ar time
320 .Op Fl Fl pw-expiration-time= Ns Ar time
321 .Op Fl Fl kvno= Ns Ar number
322 .Op Fl Fl policy= Ns Ar policy-name
323 .Op Fl C Ar path | Fl Fl krb5-config-file= Ns Ar path
324 .Ar principal...
325 .Bd -ragged -offset indent
326 Modifies certain attributes of a principal. If run without command
327 line options, you will be prompted. With command line options, it will
328 only change the ones specified.
330 The only policy supported by Heimdal is
331 .Ql default .
333 If a krb5 config file is given, it will be saved in the entry.
335 Possible attributes are:
336 .Li new-princ ,
337 .Li support-desmd5 ,
338 .Li pwchange-service ,
339 .Li disallow-client ,
340 .Li disallow-svr ,
341 .Li requires-pw-change ,
342 .Li requires-hw-auth ,
343 .Li requires-pre-auth ,
344 .Li allow-digest ,
345 .Li trusted-for-delegation ,
346 .Li ok-as-delegate ,
347 .Li disallow-all-tix ,
348 .Li disallow-dup-skey ,
349 .Li disallow-proxiable ,
350 .Li disallow-renewable ,
351 .Li disallow-tgt-based ,
352 .Li disallow-forwardable ,
353 .Li disallow-postdated
355 Attributes may be negated with a "-", e.g.,
357 kadmin -l modify -a -disallow-proxiable user
360 .Nm passwd
361 .Op Fl Fl keepold | Fl Fl keepallold | Fl Fl pruneall
362 .Op Fl Fl enctypes= Ns Ar string
363 .Op Fl r | Fl Fl random-key
364 .Op Fl Fl random-password
365 .Oo Fl p Ar string \*(Ba Xo
366 .Fl Fl password= Ns Ar string
369 .Op Fl Fl key= Ns Ar string
370 .Ar principal...
371 .Bd -ragged -offset indent
372 Changes the password of an existing principal.
373 If enctypes to use are not given, then the
374 .Ar [libdefaults] supported_enctypes
375 configuration parameter will be used on the client side to select
376 enctypes, defaulting to
377 .Ar aes128-cts-hmac-sha1-96.
378 For compatibility with MIT, the enctypes string is a space- or
379 comma-separated list of enctype:salttype.
381 .Fl Fl keepold
382 is given, then old keys needed to decrypt extant tickets are
383 kept, and all other old keys are deleted.
385 .Fl Fl keepallold
386 is given then all old keys are kept.  If
387 .Fl Fl pruneall is given then all old keys are removed.
389 .Fl Fl keepold
390 behavior is the default if none of these are given.
393 .Nm verify-password-quality
394 .Ar principal
395 .Ar password
396 .Bd -ragged -offset indent
397 Run the password quality check function locally.
398 You can run this on the host that is configured to run the kadmind
399 process to verify that your configuration file is correct.
400 The verification is done locally, if kadmin is run in remote mode,
401 no rpc call is done to the server. NOTE: if the environment has
402 verify-password-quality configured to use a back-end that stores
403 password history (such as heimdal-history), running
404 verify-quality-password will cause an update to the password
405 database meaning that merely verifying the quality of the password
406 using verify-quality-password invalidates the use of that
407 principal/password in the future.
410 .Nm privileges
411 .Bd -ragged -offset indent
412 Lists the operations you are allowed to perform. These include
413 .Li add ,
414 .Li add_enctype ,
415 .Li change-password ,
416 .Li delete ,
417 .Li del_enctype ,
418 .Li get ,
419 .Li get-keys ,
420 .Li list ,
422 .Li modify .
425 .Nm rename
426 .Ar from to
427 .Bd -ragged -offset indent
428 Renames a principal. This is normally transparent, but since keys are
429 salted with the principal name, they will have a non-standard salt,
430 and clients which are unable to cope with this will fail. Kerberos 4
431 suffers from this.
434 .Nm check
435 .Op Ar realm
437 .Bd -ragged -offset indent
438 Check database for strange configurations on important principals. If
439 no realm is given, the default realm is used.
442 When running in local mode, the following commands can also be used:
444 .Nm dump
445 .Op Fl d | Fl Fl decrypt
446 .Op Fl f Ns Ar format | Fl Fl format= Ns Ar format
447 .Op Ar dump-file
448 .Bd -ragged -offset indent
449 Writes the database in
450 .Dq machine readable text
451 form to the specified file, or standard out. If the database is
452 encrypted, the dump will also have encrypted keys, unless
453 .Fl Fl decrypt
454 is used.  If
455 .Fl Fl format=MIT
456 is used then the dump will be in MIT format.  Otherwise it will be in
457 Heimdal format.
460 .Nm init
461 .Op Fl Fl realm-max-ticket-life= Ns Ar string
462 .Op Fl Fl realm-max-renewable-life= Ns Ar string
463 .Ar realm
464 .Bd -ragged -offset indent
465 Initializes the Kerberos database with entries for a new realm. It's
466 possible to have more than one realm served by one server.
469 .Nm load
470 .Ar file
471 .Bd -ragged -offset indent
472 Reads a previously dumped database, and re-creates that database from
473 scratch.
476 .Nm merge
477 .Ar file
478 .Bd -ragged -offset indent
479 Similar to
480 .Nm load
481 but just modifies the database with the entries in the dump file.
484 .Nm stash
485 .Oo Fl e Ar enctype \*(Ba Xo
486 .Fl Fl enctype= Ns Ar enctype
489 .Oo Fl k Ar keyfile \*(Ba Xo
490 .Fl Fl key-file= Ns Ar keyfile
493 .Op Fl Fl convert-file
494 .Op Fl Fl master-key-fd= Ns Ar fd
495 .Bd -ragged -offset indent
496 Writes the Kerberos master key to a file used by the KDC.
498 .\".Sh ENVIRONMENT
499 .\".Sh FILES
500 .\".Sh EXAMPLES
501 .\".Sh DIAGNOSTICS
502 .Sh SEE ALSO
503 .Xr kadmind 8 ,
504 .Xr kdc 8
505 .\".Sh STANDARDS
506 .\".Sh HISTORY
507 .\".Sh AUTHORS
508 .\".Sh BUGS