xref: /minix3/crypto/external/bsd/heimdal/dist/admin/ktutil-commands.in (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc/*
2*ebfedea0SLionel Sambuc * Copyright (c) 2004 Kungliga Tekniska Högskolan
3*ebfedea0SLionel Sambuc * (Royal Institute of Technology, Stockholm, Sweden).
4*ebfedea0SLionel Sambuc * All rights reserved.
5*ebfedea0SLionel Sambuc *
6*ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without
7*ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions
8*ebfedea0SLionel Sambuc * are met:
9*ebfedea0SLionel Sambuc *
10*ebfedea0SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
11*ebfedea0SLionel Sambuc *    notice, this list of conditions and the following disclaimer.
12*ebfedea0SLionel Sambuc *
13*ebfedea0SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright
14*ebfedea0SLionel Sambuc *    notice, this list of conditions and the following disclaimer in the
15*ebfedea0SLionel Sambuc *    documentation and/or other materials provided with the distribution.
16*ebfedea0SLionel Sambuc *
17*ebfedea0SLionel Sambuc * 3. Neither the name of the Institute nor the names of its contributors
18*ebfedea0SLionel Sambuc *    may be used to endorse or promote products derived from this software
19*ebfedea0SLionel Sambuc *    without specific prior written permission.
20*ebfedea0SLionel Sambuc *
21*ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22*ebfedea0SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*ebfedea0SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*ebfedea0SLionel Sambuc * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25*ebfedea0SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*ebfedea0SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*ebfedea0SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*ebfedea0SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*ebfedea0SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*ebfedea0SLionel Sambuc * SUCH DAMAGE.
32*ebfedea0SLionel Sambuc */
33*ebfedea0SLionel Sambuc/* Id */
34*ebfedea0SLionel Sambuc
35*ebfedea0SLionel Sambuccommand = {
36*ebfedea0SLionel Sambuc	name = "add"
37*ebfedea0SLionel Sambuc	option = {
38*ebfedea0SLionel Sambuc		long = "principal"
39*ebfedea0SLionel Sambuc		short = "p"
40*ebfedea0SLionel Sambuc		type = "string"
41*ebfedea0SLionel Sambuc		help = "principal to add"
42*ebfedea0SLionel Sambuc		argument = "principal"
43*ebfedea0SLionel Sambuc		default = ""
44*ebfedea0SLionel Sambuc	}
45*ebfedea0SLionel Sambuc	option = {
46*ebfedea0SLionel Sambuc		long = "kvno"
47*ebfedea0SLionel Sambuc		short = "V"
48*ebfedea0SLionel Sambuc		type = "integer"
49*ebfedea0SLionel Sambuc		help = "key version number"
50*ebfedea0SLionel Sambuc		default = "-1"
51*ebfedea0SLionel Sambuc	}
52*ebfedea0SLionel Sambuc	option = {
53*ebfedea0SLionel Sambuc		long = "enctype"
54*ebfedea0SLionel Sambuc		short = "e"
55*ebfedea0SLionel Sambuc		type = "string"
56*ebfedea0SLionel Sambuc		argument = "enctype"
57*ebfedea0SLionel Sambuc		help = "encryption type"
58*ebfedea0SLionel Sambuc	}
59*ebfedea0SLionel Sambuc	option = {
60*ebfedea0SLionel Sambuc		long = "password"
61*ebfedea0SLionel Sambuc		short = "w"
62*ebfedea0SLionel Sambuc		type = "string"
63*ebfedea0SLionel Sambuc		help = "password for key"
64*ebfedea0SLionel Sambuc	}
65*ebfedea0SLionel Sambuc	option = {
66*ebfedea0SLionel Sambuc		long = "salt"
67*ebfedea0SLionel Sambuc		short = "s"
68*ebfedea0SLionel Sambuc		type = "-flag"
69*ebfedea0SLionel Sambuc		help = "use unsalted keys"
70*ebfedea0SLionel Sambuc		default = "1"
71*ebfedea0SLionel Sambuc	}
72*ebfedea0SLionel Sambuc	option = {
73*ebfedea0SLionel Sambuc		long = "random"
74*ebfedea0SLionel Sambuc		short = "r"
75*ebfedea0SLionel Sambuc		type = "flag"
76*ebfedea0SLionel Sambuc		help = "generate random key"
77*ebfedea0SLionel Sambuc	}
78*ebfedea0SLionel Sambuc	option = {
79*ebfedea0SLionel Sambuc		long = "hex"
80*ebfedea0SLionel Sambuc		short = "H"
81*ebfedea0SLionel Sambuc		type = "flag"
82*ebfedea0SLionel Sambuc		help = "password is a hexadecimal string"
83*ebfedea0SLionel Sambuc	}
84*ebfedea0SLionel Sambuc	function = "kt_add"
85*ebfedea0SLionel Sambuc	help = "Adds a key to a keytab."
86*ebfedea0SLionel Sambuc	max_args = "0"
87*ebfedea0SLionel Sambuc}
88*ebfedea0SLionel Sambuccommand = {
89*ebfedea0SLionel Sambuc	name = "change"
90*ebfedea0SLionel Sambuc	option = {
91*ebfedea0SLionel Sambuc		long = "realm"
92*ebfedea0SLionel Sambuc		short = "r"
93*ebfedea0SLionel Sambuc		type = "string"
94*ebfedea0SLionel Sambuc		argument = "realm"
95*ebfedea0SLionel Sambuc		help = "realm to use"
96*ebfedea0SLionel Sambuc	}
97*ebfedea0SLionel Sambuc	option = {
98*ebfedea0SLionel Sambuc		long = "admin-server"
99*ebfedea0SLionel Sambuc		short = "a"
100*ebfedea0SLionel Sambuc		type = "string"
101*ebfedea0SLionel Sambuc		argument = "host"
102*ebfedea0SLionel Sambuc		help = "server to contact"
103*ebfedea0SLionel Sambuc	}
104*ebfedea0SLionel Sambuc	option = {
105*ebfedea0SLionel Sambuc		long = "server-port"
106*ebfedea0SLionel Sambuc		short = "s"
107*ebfedea0SLionel Sambuc		type = "integer"
108*ebfedea0SLionel Sambuc		argument = "port number"
109*ebfedea0SLionel Sambuc		help = "port number on server"
110*ebfedea0SLionel Sambuc	}
111*ebfedea0SLionel Sambuc	function = "kt_change"
112*ebfedea0SLionel Sambuc	argument = "[principal...]"
113*ebfedea0SLionel Sambuc	help = "Change keys for specified principals (default all)."
114*ebfedea0SLionel Sambuc}
115*ebfedea0SLionel Sambuccommand = {
116*ebfedea0SLionel Sambuc	name = "copy"
117*ebfedea0SLionel Sambuc	function = "kt_copy"
118*ebfedea0SLionel Sambuc	argument = "source destination"
119*ebfedea0SLionel Sambuc	min_args = "2"
120*ebfedea0SLionel Sambuc	max_args = "2"
121*ebfedea0SLionel Sambuc	help = "Copies one keytab to another."
122*ebfedea0SLionel Sambuc}
123*ebfedea0SLionel Sambuccommand = {
124*ebfedea0SLionel Sambuc	name = "get"
125*ebfedea0SLionel Sambuc	option = {
126*ebfedea0SLionel Sambuc		long = "principal"
127*ebfedea0SLionel Sambuc		short = "p"
128*ebfedea0SLionel Sambuc		type = "string"
129*ebfedea0SLionel Sambuc		help = "admin principal"
130*ebfedea0SLionel Sambuc		argument = "principal"
131*ebfedea0SLionel Sambuc	}
132*ebfedea0SLionel Sambuc	option = {
133*ebfedea0SLionel Sambuc		long = "enctypes"
134*ebfedea0SLionel Sambuc		short = "e"
135*ebfedea0SLionel Sambuc		type = "strings"
136*ebfedea0SLionel Sambuc		help = "encryption types to use"
137*ebfedea0SLionel Sambuc		argument = "enctype"
138*ebfedea0SLionel Sambuc	}
139*ebfedea0SLionel Sambuc	option = {
140*ebfedea0SLionel Sambuc		long = "realm"
141*ebfedea0SLionel Sambuc		short = "r"
142*ebfedea0SLionel Sambuc		type = "string"
143*ebfedea0SLionel Sambuc		argument = "realm"
144*ebfedea0SLionel Sambuc		help = "realm to use"
145*ebfedea0SLionel Sambuc	}
146*ebfedea0SLionel Sambuc	option = {
147*ebfedea0SLionel Sambuc		long = "admin-server"
148*ebfedea0SLionel Sambuc		short = "a"
149*ebfedea0SLionel Sambuc		type = "string"
150*ebfedea0SLionel Sambuc		argument = "host"
151*ebfedea0SLionel Sambuc		help = "server to contact"
152*ebfedea0SLionel Sambuc	}
153*ebfedea0SLionel Sambuc	option = {
154*ebfedea0SLionel Sambuc		long = "server-port"
155*ebfedea0SLionel Sambuc		short = "s"
156*ebfedea0SLionel Sambuc		type = "integer"
157*ebfedea0SLionel Sambuc		argument = "port number"
158*ebfedea0SLionel Sambuc		help = "port number on server"
159*ebfedea0SLionel Sambuc	}
160*ebfedea0SLionel Sambuc	function = "kt_get"
161*ebfedea0SLionel Sambuc	min_args = "1"
162*ebfedea0SLionel Sambuc	argument = "principal..."
163*ebfedea0SLionel Sambuc	help = "Change keys for specified principals, and add them to the keytab."
164*ebfedea0SLionel Sambuc}
165*ebfedea0SLionel Sambuccommand = {
166*ebfedea0SLionel Sambuc	name = "list"
167*ebfedea0SLionel Sambuc	option = {
168*ebfedea0SLionel Sambuc		long = "keys"
169*ebfedea0SLionel Sambuc		type = "flag"
170*ebfedea0SLionel Sambuc		help = "show key values"
171*ebfedea0SLionel Sambuc	}
172*ebfedea0SLionel Sambuc	option = {
173*ebfedea0SLionel Sambuc		long = "timestamp"
174*ebfedea0SLionel Sambuc		type = "flag"
175*ebfedea0SLionel Sambuc		help = "show timestamps"
176*ebfedea0SLionel Sambuc	}
177*ebfedea0SLionel Sambuc	max_args = "0"
178*ebfedea0SLionel Sambuc	function = "kt_list"
179*ebfedea0SLionel Sambuc	help = "Show contents of keytab."
180*ebfedea0SLionel Sambuc}
181*ebfedea0SLionel Sambuccommand = {
182*ebfedea0SLionel Sambuc	name = "purge"
183*ebfedea0SLionel Sambuc	option = {
184*ebfedea0SLionel Sambuc		long = "age"
185*ebfedea0SLionel Sambuc		type = "string"
186*ebfedea0SLionel Sambuc		help = "age to retiere"
187*ebfedea0SLionel Sambuc		default = "1 week";
188*ebfedea0SLionel Sambuc		argument = "time"
189*ebfedea0SLionel Sambuc	}
190*ebfedea0SLionel Sambuc	max_args = "0"
191*ebfedea0SLionel Sambuc	function = "kt_purge"
192*ebfedea0SLionel Sambuc	help = "Remove superceded keys from keytab."
193*ebfedea0SLionel Sambuc}
194*ebfedea0SLionel Sambuccommand = {
195*ebfedea0SLionel Sambuc	name = "remove"
196*ebfedea0SLionel Sambuc	name = "delete"
197*ebfedea0SLionel Sambuc	option = {
198*ebfedea0SLionel Sambuc		long = "principal"
199*ebfedea0SLionel Sambuc		short = "p"
200*ebfedea0SLionel Sambuc		type = "string"
201*ebfedea0SLionel Sambuc		help = "principal to remove"
202*ebfedea0SLionel Sambuc		argument = "principal"
203*ebfedea0SLionel Sambuc	}
204*ebfedea0SLionel Sambuc	option = {
205*ebfedea0SLionel Sambuc		long = "kvno"
206*ebfedea0SLionel Sambuc		short = "V"
207*ebfedea0SLionel Sambuc		type = "integer"
208*ebfedea0SLionel Sambuc		help = "key version to remove"
209*ebfedea0SLionel Sambuc		argument = "enctype"
210*ebfedea0SLionel Sambuc		default = "0"
211*ebfedea0SLionel Sambuc	}
212*ebfedea0SLionel Sambuc	option = {
213*ebfedea0SLionel Sambuc		long = "enctype"
214*ebfedea0SLionel Sambuc		short = "e"
215*ebfedea0SLionel Sambuc		type = "string"
216*ebfedea0SLionel Sambuc		help = "enctype to remove"
217*ebfedea0SLionel Sambuc		argument = "enctype"
218*ebfedea0SLionel Sambuc	}
219*ebfedea0SLionel Sambuc	max_args = "0"
220*ebfedea0SLionel Sambuc	function = "kt_remove"
221*ebfedea0SLionel Sambuc	help = "Remove keys from keytab."
222*ebfedea0SLionel Sambuc}
223*ebfedea0SLionel Sambuccommand = {
224*ebfedea0SLionel Sambuc	name = "rename"
225*ebfedea0SLionel Sambuc	function = "kt_rename"
226*ebfedea0SLionel Sambuc	argument = "from to"
227*ebfedea0SLionel Sambuc	min_args = "2"
228*ebfedea0SLionel Sambuc	max_args = "2"
229*ebfedea0SLionel Sambuc	help = "Renames an entry in the keytab."
230*ebfedea0SLionel Sambuc	option = {
231*ebfedea0SLionel Sambuc		long = "delete"
232*ebfedea0SLionel Sambuc		type = "-flag"
233*ebfedea0SLionel Sambuc		help = "don't delete orignal entry"
234*ebfedea0SLionel Sambuc	}
235*ebfedea0SLionel Sambuc}
236*ebfedea0SLionel Sambuccommand = {
237*ebfedea0SLionel Sambuc	name = "destroy"
238*ebfedea0SLionel Sambuc	function = "kt_destroy"
239*ebfedea0SLionel Sambuc	max_args = "0"
240*ebfedea0SLionel Sambuc	help = "Destroy (remove) the keytab."
241*ebfedea0SLionel Sambuc}
242*ebfedea0SLionel Sambuccommand = {
243*ebfedea0SLionel Sambuc	name = "help"
244*ebfedea0SLionel Sambuc	argument = "command"
245*ebfedea0SLionel Sambuc	max_args = "1"
246*ebfedea0SLionel Sambuc	function = "help"
247*ebfedea0SLionel Sambuc}
248