1 .\" Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
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.
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.
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
32 .\" $Heimdal: ktutil.8 14792 2005-04-14 16:43:57Z lha $
33 .\" $NetBSD: ktutil.8,v 1.9 2009/10/14 23:37:33 joerg Exp $
40 .Nd manage Kerberos keytabs
43 .Oo Fl k Ar keytab \*(Ba Xo
44 .Fl -keytab= Ns Ar keytab
47 .Op Fl v | Fl -verbose
54 is a program for managing keytabs.
57 .It Fl v , Fl -verbose
62 can be one of the following:
63 .Bl -tag -width srvconvert
64 .It add Oo Fl p Ar principal Oc Oo Fl -principal= Ns Ar principal Oc \
65 Oo Fl V Ar kvno Oc Oo Fl -kvno= Ns Ar kvno Oc Oo Fl e Ar enctype Oc \
66 Oo Fl -enctype= Ns Ar enctype Oc Oo Fl w Ar password Oc \
67 Oo Fl -password= Ns Ar password Oc Oo Fl r Oc Oo Fl -random Oc \
68 Oo Fl s Oc Oo Fl -no-salt Oc Oo Fl H Oc Op Fl -hex
69 Adds a key to the keytab. Options that are not specified will be
70 prompted for. This requires that you know the password or the hex key of the
71 principal to add; if what you really want is to add a new principal to
72 the keytab, you should consider the
74 command, which talks to the kadmin server.
75 .It change Oo Fl r Ar realm Oc Oo Fl -realm= Ns Ar realm Oc \
76 Oo Fl -a Ar host Oc Oo Fl -admin-server= Ns Ar host Oc \
77 Oo Fl -s Ar port Oc Op Fl -server-port= Ns Ar port
78 Update one or several keys to new versions. By default, use the admin
79 server for the realm of a keytab entry. Otherwise it will use the
80 values specified by the options.
82 If no principals are given, all the ones in the keytab are updated.
83 .It copy Ar keytab-src Ar keytab-dest
84 Copies all the entries from
88 .It get Oo Fl p Ar admin principal Oc \
89 Oo Fl -principal= Ns Ar admin principal Oc Oo Fl e Ar enctype Oc \
90 Oo Fl -enctypes= Ns Ar enctype Oc Oo Fl r Ar realm Oc \
91 Oo Fl -realm= Ns Ar realm Oc Oo Fl a Ar admin server Oc \
92 Oo Fl -admin-server= Ns Ar admin server Oc Oo Fl s Ar server port Oc \
93 Oo Fl -server-port= Ns Ar server port Oc Ar principal ...
96 generate a new key for it (creating it if it doesn't already exist),
97 and put that key in the keytab.
101 is specified, the realm to operate on is taken from the first
103 .It list Oo Fl -keys Oc Op Fl -timestamp
104 List the keys stored in the keytab.
105 .It remove Oo Fl p Ar principal Oc Oo Fl -principal= Ns Ar principal Oc \
106 Oo Fl V kvno Oc Oo Fl -kvno= Ns Ar kvno Oc Oo Fl e enctype Oc \
107 Oo Fl -enctype= Ns Ar enctype Oc
108 Removes the specified key or keys. Not specifying a
110 removes keys with any version number. Not specifying an
112 removes keys of any type.
113 .It rename Ar from-principal Ar to-principal
114 Renames all entries in the keytab that match the
118 .It purge Op Fl -age= Ns Ar age
119 Removes all old versions of a key for which there is a newer version
122 (default one week) old.
124 .It srv2keytab Oo Fl s Ar srvtab Oc Op Fl -srvtab= Ns Ar srvtab
125 Converts the version 4 srvtab in
127 to a version 5 keytab and stores it in
130 .Bd -ragged -offset indent
132 .Li krb4: Ns Ar srvtab
136 .It key2srvtab Oo Fl s Ar srvtab Oc Op Fl -srvtab= Ns Ar srvtab
137 Converts the version 5 keytab in
139 to a version 4 srvtab and stores it in
142 .Bd -ragged -offset indent
145 .Li krb4: Ns Ar srvtab