afslog.1: Remove documentation for removed no-v4 argument.
[heimdal.git] / kadmin / kadmin-commands.in
blob622a5ee70e03b833838faadc8125366f824aa64a
1 /*
2  * Copyright (c) 2004 - 2007 Kungliga Tekniska Högskolan
3  * (Royal Institute of Technology, Stockholm, Sweden). 
4  * All rights reserved. 
5  *
6  * Redistribution and use in source and binary forms, with or without 
7  * modification, are permitted provided that the following conditions 
8  * are met: 
9  *
10  * 1. Redistributions of source code must retain the above copyright 
11  *    notice, this list of conditions and the following disclaimer. 
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright 
14  *    notice, this list of conditions and the following disclaimer in the 
15  *    documentation and/or other materials provided with the distribution. 
16  *
17  * 3. Neither the name of the Institute nor the names of its contributors 
18  *    may be used to endorse or promote products derived from this software 
19  *    without specific prior written permission. 
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
31  * SUCH DAMAGE. 
32  */
33 /* $Id$ */
35 command = {
36         name = "stash"
37         name = "kstash"
38         option = {
39                 long = "enctype"
40                 short = "e"
41                 type = "string"
42                 help = "encryption type"
43                 default = "des3-cbc-sha1"
44         }
45         option = {
46                 long = "key-file"
47                 short = "k"
48                 type = "string"
49                 argument = "file"
50                 help = "master key file"
51         }
52         option = {
53                 long = "convert-file"
54                 type = "flag"
55                 help = "just convert keyfile to new format"
56         }
57         option = {
58                 long = "random-password"
59                 type = "flag"
60                 help = "use a random password (and print the password to stdout)"
61         }
62         option = {
63                 long = "master-key-fd"
64                 type = "integer"
65                 argument = "fd"
66                 help = "filedescriptor to read passphrase from"
67                 default = "-1"
68         }
69         help = "Writes the Kerberos master key to a file used by the KDC. \nLocal (-l) mode only."
71 command = {
72         name = "dump"
73         option = {
74                 long = "decrypt"
75                 short = "d"
76                 type = "flag"
77                 help = "decrypt keys"
78         }
79         option = {
80                 long = "format"
81                 short = "f"
82                 type = "string"
83                 help = "dump format, mit or heimdal (default: heimdal)"
84         }
85         argument = "[dump-file]"
86         min_args = "0"
87         max_args = "1"
88         help = "Dumps the database in a human readable format to the specified file, \nor the standard out. Local (-l) mode only."
91 command = {
92         name = "init"
93         option = {
94                 long = "realm-max-ticket-life"
95                 type = "string"
96                 help = "realm max ticket lifetime"
97         }
98         option = {
99                 long = "realm-max-renewable-life"
100                 type = "string"
101                 help = "realm max renewable lifetime"
102         }
103         option = {
104                 long = "bare"
105                 type = "flag"
106                 help = "only create krbtgt for realm"
107         }
108         argument = "realm..."
109         min_args = "1"
110         help = "Initializes the default principals for a realm. Creates the database\nif necessary. Local (-l) mode only."
112 command = {
113         name = "load"
114         argument = "file"
115         min_args = "1"
116         max_args = "1"
117         help = "Loads a previously dumped file. Local (-l) mode only."
119 command = {
120         name = "merge"
121         argument = "file"
122         min_args = "1"
123         max_args = "1"
124         help = "Merges the contents of a dump file into the database. Local (-l) mode only."
126 command = {
127         name = "add"
128         name = "ank"
129         name = "add_new_key"
130         function = "add_new_key"
131         option = {
132                 long = "random-key"
133                 short = "r"
134                 type = "flag"
135                 help = "set random key"
136         }
137         option = {
138                 long = "random-password"
139                 type = "flag"
140                 help = "set random password"
141         }
142         option = {
143                 long = "password"
144                 short = "p"
145                 type = "string"
146                 help = "principal's password"
147         }
148         option = {
149                 long = "key"
150                 type = "string"
151                 help = "DES-key in hex"
152         }
153         option = {
154                 long = "max-ticket-life"
155                 type = "string"
156                 argument ="lifetime"
157                 help = "max ticket lifetime"
158         }
159         option = {
160                 long = "max-renewable-life"
161                 type = "string"
162                 argument = "lifetime"
163                 help = "max renewable life"
164         }
165         option = {
166                 long = "attributes"
167                 type = "string"
168                 argument = "attributes"
169                 help = "principal attributes"
170         }
171         option = {
172                 long = "expiration-time"
173                 type = "string"
174                 argument = "time"
175                 help = "principal expiration time"
176         }
177         option = {
178                 long = "pw-expiration-time"
179                 type = "string"
180                 argument = "time"
181                 help = "password expiration time"
182         }
183         option = {
184                 long = "hist-kvno-diff-clnt"
185                 type = "integer"
186                 argument = "kvno diff"
187                 help = "historic keys allowed for client"
188                 default = "-1"
189         }
190         option = {
191                 long = "hist-kvno-diff-svc"
192                 type = "integer"
193                 argument = "kvno diff"
194                 help = "historic keys allowed for service"
195                 default = "-1"
196         }
197         option = {
198                 long = "use-defaults"
199                 type = "flag"
200                 help = "use default values"
201         }
202         option = {
203                 long = "policy"
204                 type = "string"
205                 argument = "policy"
206                 help = "policy name"
207         }
208         argument = "principal..."
209         min_args = "1"
210         help = "Adds a principal to the database."
212 command = {
213         name = "passwd"
214         name = "cpw"
215         name = "change_password"
216         function = "cpw_entry"
217         option = {
218                 long = "random-key"
219                 short = "r"
220                 type = "flag"
221                 help = "set random key"
222         }
223         option = {
224                 long = "random-password"
225                 type = "flag"
226                 help = "set random password"
227         }
228         option = {
229                 long = "password"
230                 short = "p"
231                 type = "string"
232                 help = "princial's password"
233         }
234         option = {
235                 long = "key"
236                 type = "string"
237                 help = "DES key in hex"
238         }
239         option = {
240                 long = "keepold"
241                 type = "flag"
242                 help = "keep old keys/password"
243         }
244         argument = "principal..."
245         min_args = "1"
246         help = "Changes the password of one or more principals matching the expressions."
248 command = {
249         name = "delete"
250         name = "del"
251         name = "del_entry"
252         function = "del_entry"
253         argument = "principal..."
254         min_args = "1"
255         help = "Deletes all principals matching the expressions."
257 command = {
258         name = "del_enctype"
259         argument = "principal enctype..."
260         min_args = "2"
261         help = "Delete all the mentioned enctypes for principal."
263 command = {
264         name = "add_enctype"
265         option = {
266                 long = "random-key"
267                 short = "r"
268                 type = "flag"
269                 help = "set random key"
270         }
271         argument = "principal enctype..."
272         min_args = "2"
273         help = "Add new enctypes for principal."
275 command = {
276         name = "ext_keytab"
277         option = {
278                 long = "keytab"
279                 short = "k"
280                 type = "string"
281                 help = "keytab to use"
282         }
283         argument = "principal..."
284         min_args = "1"
285         help = "Extracts the keys of all principals matching the expressions, and stores them in a keytab." 
287 command = {
288         name = "get"
289         name = "get_entry"
290         function = "get_entry"
291         /* XXX sync options with "list" */
292         option = {
293                 long = "long"
294                 short = "l"
295                 type = "flag"
296                 help = "long format"
297                 default = "-1"
298         }
299         option = {
300                 long = "short"
301                 short = "s"
302                 type = "flag"
303                 help = "short format"
304         }
305         option = {
306                 long = "terse"
307                 short = "t"
308                 type = "flag"
309                 help = "terse format"
310         }
311         option = {
312                 long = "column-info"
313                 short = "o"
314                 type = "string"
315                 help = "columns to print for short output"
316         }
317         argument = "principal..."
318         min_args = "1"
319         help = "Shows information about principals matching the expressions."
321 command = {
322         name = "rename"
323         function = "rename_entry"
324         argument = "from to"
325         min_args = "2"
326         max_args = "2"
327         help = "Renames a principal."
329 command = {
330         name = "modify"
331         function = "mod_entry"
332         option = {
333                 long = "max-ticket-life"
334                 type = "string"
335                 argument ="lifetime"
336                 help = "max ticket lifetime"
337         }
338         option = {
339                 long = "max-renewable-life"
340                 type = "string"
341                 argument = "lifetime"
342                 help = "max renewable life"
343         }
344         option = {
345                 long = "attributes"
346                 short = "a"
347                 type = "string"
348                 argument = "attributes"
349                 help = "principal attributes"
350         }
351         option = {
352                 long = "expiration-time"
353                 type = "string"
354                 argument = "time"
355                 help = "principal expiration time"
356         }
357         option = {
358                 long = "pw-expiration-time"
359                 type = "string"
360                 argument = "time"
361                 help = "password expiration time"
362         }
363         option = {
364                 long = "kvno"
365                 type = "integer"
366                 help = "key version number"
367                 default = "-1"
368         }
369         option = {
370                 long = "constrained-delegation"
371                 type = "strings"
372                 argument = "principal"
373                 help = "allowed target principals"
374         }
375         option = {
376                 long = "alias"
377                 type = "strings"
378                 argument = "principal"
379                 help = "aliases"
380         }
381         option = {
382                 long = "pkinit-acl"
383                 type = "strings"
384                 argument = "subject dn"
385                 help = "aliases"
386         }
387         option = {
388                 long = "policy"
389                 type = "string"
390                 argument = "policy"
391                 help = "policy name"
392         }
393         option = {
394                 long = "hist-kvno-diff-clnt"
395                 type = "integer"
396                 argument = "kvno diff"
397                 help = "historic keys allowed for client"
398                 default = "-1"
399         }
400         option = {
401                 long = "hist-kvno-diff-svc"
402                 type = "integer"
403                 argument = "kvno diff"
404                 help = "historic keys allowed for service"
405                 default = "-1"
406         }
407         argument = "principal"
408         min_args = "1"
409         max_args = "1"
410         help = "Modifies some attributes of the specified principal."
412 command = {
413         name = "privileges"
414         name = "privs"
415         function = "get_privs"
416         help = "Shows which operations you are allowed to perform."
418 command = {
419         name = "list"
420         function = "list_princs"
421         /* XXX sync options with "get" */
422         option = {
423                 long = "long"
424                 short = "l"
425                 type = "flag"
426                 help = "long format"
427         }
428         option = {
429                 long = "short"
430                 short = "s"
431                 type = "flag"
432                 help = "short format"
433         }
434         option = {
435                 long = "terse"
436                 short = "t"
437                 type = "flag"
438                 help = "terse format"
439                 default = "-1"
440         }
441         option = {
442                 long = "column-info"
443                 short = "o"
444                 type = "string"
445                 help = "columns to print for short output"
446         }
447         argument = "principal..."
448         min_args = "1"
449         help = "Lists principals in a terse format. Equivalent to \"get -t\"." 
451 command = {
452         name = "verify-password-quality"
453         name = "pwq"
454         function = "password_quality"
455         argument = "principal password"
456         min_args = "2"
457         max_args = "2"
458         help = "Try run the password quality function locally (not doing RPC out to server)."
460 command = {
461         name = "check"
462         function = "check"
463         argument = "[realm]"
464         min_args = "0"
465         max_args = "1"
466         help = "Check the realm (if not given, the default realm) for configuration errors."
468 command = {
469         name = "lock"
470         function = "lock"
471         argument = ""
472         min_args = "0"
473         max_args = "0"
474         help = "Lock the database for writing (use with care)."
476 command = {
477         name = "unlock"
478         function = "unlock"
479         argument = ""
480         min_args = "0"
481         max_args = "0"
482         help = "Unlock the database."
484 command = {
485         name = "help"
486         name = "?"
487         argument = "[command]"
488         min_args = "0"
489         max_args = "1"
490         help = "Help! I need somebody."
492 command = {
493         name = "exit"
494         name = "quit"
495         function = "exit_kadmin"
496         help = "Quits."