s4:torture: Adapt KDC canon test to Heimdal upstream changes
[samba.git] / third_party / heimdal / admin / ktutil-commands.in
1 /*
2  * Copyright (c) 2004 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$ */
34
35 command = {
36         name = "add"
37         option = {
38                 long = "principal"
39                 short = "p"
40                 type = "string"
41                 help = "principal to add"
42                 argument = "principal"
43                 default = ""
44         }
45         option = {
46                 long = "kvno"
47                 short = "V"
48                 type = "integer"
49                 help = "key version number"
50                 default = "-1"
51         }
52         option = {
53                 long = "enctype"
54                 short = "e"
55                 type = "string"
56                 argument = "enctype"
57                 help = "encryption type(s)"
58         }
59         option = {
60                 long = "password"
61                 short = "w"
62                 type = "string"
63                 help = "password for key"
64         }
65         option = {
66                 long = "salt"
67                 short = "s"
68                 type = "-flag"
69                 help = "use unsalted keys"
70                 default = "1"
71         }
72         option = {
73                 long = "random"
74                 short = "r"
75                 type = "flag"
76                 help = "generate random key"
77         }
78         option = {
79                 long = "keepold"
80                 type = "flag"
81                 help = "keep old keys/password needed to decrypt extant tickets (default)"
82         }
83         option = {
84                 long = "keepallold"
85                 type = "flag"
86                 help = "keep all old keys/password"
87         }
88         option = {
89                 long = "pruneall"
90                 type = "flag"
91                 help = "delete all old keys"
92         }
93         option = {
94                 long = "hex"
95                 short = "H"
96                 type = "flag"
97                 help = "password is a hexadecimal string"
98         }
99         function = "kt_add"
100         help = "Adds a key to a keytab."
101         max_args = "0"
102 }
103 command = {
104         name = "change"
105         option = {
106                 long = "realm"
107                 short = "r"
108                 type = "string"
109                 argument = "realm"
110                 help = "realm to use"
111         }
112         option = {
113                 long = "enctype"
114                 short = "e"
115                 type = "string"
116                 argument = "enctype"
117                 help = "encryption type(s)"
118         }
119         option = {
120                 long = "keepold"
121                 type = "flag"
122                 help = "keep old keys/password needed to decrypt extant tickets (default)"
123         }
124         option = {
125                 long = "keepallold"
126                 type = "flag"
127                 help = "keep all old keys/password"
128         }
129         option = {
130                 long = "pruneall"
131                 type = "flag"
132                 help = "delete all old keys"
133         }
134         option = {
135                 long = "admin-server"
136                 short = "a"
137                 type = "string"
138                 argument = "host"
139                 help = "server to contact"
140         }
141         option = {
142                 long = "server-port"
143                 short = "s"
144                 type = "integer"
145                 argument = "port number"
146                 help = "port number on server"
147         }
148         function = "kt_change"
149         argument = "[principal...]"
150         help = "Change keys for specified principals (default all)."
151 }
152 command = {
153         name = "copy"
154         function = "kt_copy"
155         argument = "source destination"
156         min_args = "2"
157         max_args = "2"
158         help = "Copies one keytab to another."
159 }
160 command = {
161         name = "get"
162         option = {
163                 long = "principal"
164                 short = "p"
165                 type = "string"
166                 help = "admin principal"
167                 argument = "principal"
168         }
169         option = {
170                 long = "enctypes"
171                 short = "e"
172                 type = "strings"
173                 help = "encryption types to use"
174                 argument = "enctype"
175         }
176         option = {
177                 long = "keepold"
178                 type = "flag"
179                 help = "keep old keys/password needed to decrypt extant tickets (default)"
180         }
181         option = {
182                 long = "keepallold"
183                 type = "flag"
184                 help = "keep all old keys/password"
185         }
186         option = {
187                 long = "pruneall"
188                 type = "flag"
189                 help = "delete all old keys"
190         }
191         option = {
192                 long = "realm"
193                 short = "r"
194                 type = "string"
195                 argument = "realm"
196                 help = "realm to use"
197         }
198         option = {
199                 long = "admin-server"
200                 short = "a"
201                 type = "string"
202                 argument = "host"
203                 help = "server to contact"
204         }
205         option = {
206                 long = "server-port"
207                 short = "s"
208                 type = "integer"
209                 argument = "port number"
210                 help = "port number on server"
211         }
212         function = "kt_get"
213         min_args = "1"
214         argument = "principal..."
215         help = "Change keys for specified principals, and add them to the keytab."
216 }
217 command = {
218         name = "list"
219         option = {
220                 long = "keys"
221                 type = "flag"
222                 help = "show key values"
223         }
224         option = {
225                 long = "timestamp"
226                 type = "flag"
227                 help = "show timestamps"
228         }
229         max_args = "0"
230         function = "kt_list"
231         help = "Show contents of keytab."
232 }
233 command = {
234         name = "purge"
235         option = {
236                 long = "age"
237                 type = "string"
238                 help = "age to retiere"
239                 default = "1 week";
240                 argument = "time"
241         }
242         max_args = "0"
243         function = "kt_purge"
244         help = "Remove superceded keys from keytab."
245 }
246 command = {
247         name = "remove"
248         name = "delete"
249         option = {
250                 long = "principal"
251                 short = "p"
252                 type = "string"
253                 help = "principal to remove"
254                 argument = "principal"
255         }
256         option = {
257                 long = "kvno"
258                 short = "V"
259                 type = "integer"
260                 help = "key version to remove"
261                 argument = "kvno"
262                 default = "0"
263         }
264         option = {
265                 long = "enctype"
266                 short = "e"
267                 type = "string"
268                 help = "enctype to remove"
269                 argument = "enctype"
270         }
271         max_args = "0"
272         function = "kt_remove"
273         help = "Remove keys from keytab."
274 }
275 command = {
276         name = "rename"
277         function = "kt_rename"
278         argument = "from to"
279         min_args = "2"
280         max_args = "2"
281         help = "Renames an entry in the keytab."
282         option = {
283                 long = "delete"
284                 type = "-flag"
285                 help = "don't delete orignal entry"
286         }
287 }
288 command = {
289         name = "destroy"
290         function = "kt_destroy"
291         max_args = "0"
292         help = "Destroy (remove) the keytab."
293 }
294 command = {
295         name = "help"
296         argument = "command"
297         max_args = "1"
298         function = "help"
299 }