xref: /illumos-gate/usr/src/man/man1/ktutil.1 (revision 16b76d3cb933ff92018a2a75594449010192eacb)
te
Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
KTUTIL 1 "November 22, 2021"
NAME
ktutil - Kerberos keytab maintenance utility
SYNOPSIS
/usr/bin/ktutil
DESCRIPTION
The ktutil command is an interactive command-line interface utility for managing the keylist in keytab files. You must read in a keytab's keylist before you can manage it. Also, the user running the ktutil command must have read/write permissions on the keytab. For example, if a keytab is owned by root, which it typically is, ktutil must be run as root to have the appropriate permissions.
COMMANDS
clear_list

clear

Clears the current keylist.

read_kt file

rkt file

Reads a keytab into the current keylist. You must specify a keytab file to read.

write_kt file

wkt file

Writes the current keylist to a keytab file. You must specify a keytab file to write. If the keytab file already exists, the current keylist is appended to the existing keytab file.

add_entry number

addent number

Adds an entry to the current keylist. Specify the entry by the keylist slot number.

delete_entry number

delent number

Deletes an entry from the current keylist. Specify the entry by the keylist slot number.

list

l

Lists the current keylist.

list_request

lr

Lists available requests (commands).

quit

exit

q

Exits utility.

EXAMPLES
Example 1 Deleting a principal from a file

The following example deletes the host/denver@EXAMPLE.com principal from the /etc/krb5/krb5.keytab file. Notice that if you want to delete an entry from an existing keytab, you must first write the keylist to a temporary keytab and then overwrite the existing keytab with the temporary keytab. This is because the wkt command actually appends the current keylist to an existing keytab, so you can't use it to overwrite a keytab.

example# /usr/krb5/bin/ktutil
 ktutil: rkt /etc/krb5/krb5.keytab
 ktutil: list
slot KVNO Principal
---- ---- ---------------------------------------
 1 8 host/vail@EXAMPLE.COM
 2 5 host/denver@EXAMPLE.COM
 ktutil:delent 2
 ktutil:l
slot KVNO Principal
---- ---- --------------------------------------
 1 8 host/vail@EXAMPLE.COM
 ktutil:wkt /tmp/krb5.keytab
 ktutil:q
example# mv /tmp/krb5.keytab /etc/krb5/krb5.keytab
FILES
/etc/krb5/krb5.keytab

keytab file for Kerberos clients

ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability See below.

The command arguments are Evolving. The command output is Unstable.

SEE ALSO
attributes (7), kerberos (7), k5srvutil (8), kadmin (8)