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" 58 } 59 option = { 60 long = "pw-file" 61 type = "string" 62 help = "path or STDIN where password is read from" 63 } 64 option = { 65 long = "password" 66 short = "w" 67 type = "string" 68 help = "password for key" 69 } 70 option = { 71 long = "salt" 72 short = "s" 73 type = "-flag" 74 help = "use unsalted keys" 75 default = "1" 76 } 77 option = { 78 long = "random" 79 short = "r" 80 type = "flag" 81 help = "generate random key" 82 } 83 option = { 84 long = "hex" 85 short = "H" 86 type = "flag" 87 help = "password is a hexadecimal string" 88 } 89 function = "kt_add" 90 help = "Adds a key to a keytab." 91 max_args = "0" 92 } 93 command = { 94 name = "change" 95 option = { 96 long = "realm" 97 short = "r" 98 type = "string" 99 argument = "realm" 100 help = "realm to use" 101 } 102 option = { 103 long = "admin-server" 104 short = "a" 105 type = "string" 106 argument = "host" 107 help = "server to contact" 108 } 109 option = { 110 long = "server-port" 111 short = "s" 112 type = "integer" 113 argument = "port number" 114 help = "port number on server" 115 } 116 function = "kt_change" 117 argument = "[principal...]" 118 help = "Change keys for specified principals (default all)." 119 } 120 command = { 121 option = { 122 long = "match-principal" 123 type = "string" 124 help = "copy only matching principals" 125 argument = "principal" 126 } 127 name = "copy" 128 function = "kt_copy" 129 argument = "source destination" 130 min_args = "2" 131 max_args = "2" 132 help = "Copies content of one keytab into another." 133 } 134 command = { 135 name = "get" 136 option = { 137 long = "principal" 138 short = "p" 139 type = "string" 140 help = "admin principal" 141 argument = "principal" 142 } 143 option = { 144 long = "enctypes" 145 short = "e" 146 type = "strings" 147 help = "encryption types to use" 148 argument = "enctype" 149 } 150 option = { 151 long = "realm" 152 short = "r" 153 type = "string" 154 argument = "realm" 155 help = "realm to use" 156 } 157 option = { 158 long = "admin-server" 159 short = "a" 160 type = "string" 161 argument = "host" 162 help = "server to contact" 163 } 164 option = { 165 long = "server-port" 166 short = "s" 167 type = "integer" 168 argument = "port number" 169 help = "port number on server" 170 } 171 function = "kt_get" 172 min_args = "1" 173 argument = "principal..." 174 help = "Change keys for specified principals, and add them to the keytab." 175 } 176 command = { 177 name = "list" 178 option = { 179 long = "keys" 180 type = "flag" 181 help = "show key values" 182 } 183 option = { 184 long = "timestamp" 185 type = "flag" 186 help = "show timestamps" 187 } 188 function = "kt_list" 189 help = "Show contents of keytab." 190 } 191 command = { 192 name = "purge" 193 option = { 194 long = "age" 195 type = "string" 196 help = "age to retiere" 197 default = "1 week"; 198 argument = "time" 199 } 200 max_args = "0" 201 function = "kt_purge" 202 help = "Remove superceded keys from keytab." 203 } 204 command = { 205 name = "remove" 206 name = "delete" 207 option = { 208 long = "principal" 209 short = "p" 210 type = "string" 211 help = "principal to remove" 212 argument = "principal" 213 } 214 option = { 215 long = "kvno" 216 short = "V" 217 type = "integer" 218 help = "key version to remove" 219 argument = "enctype" 220 default = "0" 221 } 222 option = { 223 long = "enctype" 224 short = "e" 225 type = "string" 226 help = "enctype to remove" 227 argument = "enctype" 228 } 229 max_args = "0" 230 function = "kt_remove" 231 help = "Remove keys from keytab." 232 } 233 command = { 234 name = "rename" 235 function = "kt_rename" 236 argument = "from to" 237 min_args = "2" 238 max_args = "2" 239 help = "Renames an entry in the keytab." 240 option = { 241 long = "delete" 242 type = "-flag" 243 help = "don't delete orignal entry" 244 } 245 } 246 command = { 247 name = "destroy" 248 function = "kt_destroy" 249 help = "Destroy (remove) the keytab." 250 } 251 command = { 252 name = "help" 253 argument = "command" 254 max_args = "1" 255 function = "help" 256 }