'\" 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) 2004, Sun Microsystems, Inc. All Rights Reserved .TH klist 1 "2006 年 11 月 16 日" "SunOS 5.11" "用户命令" .SH 名称 klist \- 列出当前保留的 Kerberos 票证 .SH 用法概要 .LP .nf \fB/usr/bin/klist\fR [\fB-e\fR] [ [\fB-c\fR] [\fB-f\fR] [\fB-s\fR] [\fB-a\fR [\fB-n\fR]] [\fIcache_name\fR]] [\fB-k\fR [\fB-t\fR] [\fB-K\fR] [\fIkeytab_file\fR]] .fi .SH 描述 .sp .LP \fBklist\fR 实用程序列显凭证高速缓存的名称、票证适用于的主体(在票证文件中列出)的标识、用户当前持有的所有 Kerberos 票证的主体名称,以及每个认证者的问题和到期时间。主体名称以 \fIname\fR\fB/\fR\fIinstance\fR\fB@\fR\fIrealm\fR 形式列出,如果不包括 instance 则忽略 "\fB/\fR",如果不包括 realm 则忽略 "\fB@\fR"。 .sp .LP 如果未指定 \fIcache_file\fR 或 \fIkeytab_name\fR,\fBklist\fR 将根据情况显示缺省凭证高速缓存或密钥表文件中的凭证。缺省情况下,您的票证存储在文件 \fB/tmp/krb5cc_\fIuid\fR\fR 中,其中 \fIuid\fR 是用户的当前用户 ID。 .SH 选项 .sp .LP 支持以下选项: .sp .ne 2 .mk .na \fB\fB-a\fR\fR .ad .RS 20n .rt 显示凭证中地址的列表。使用所配置的名称服务,将数字网络地址转换为关联的主机名(如果可能)。 .RE .sp .ne 2 .mk .na \fB\fB-c\fR [\fIcache_name\fR]\fR .ad .RS 20n .rt 列出凭证高速缓存中保留的票证。如果 \fB-c\fR 或 \fB-k\fR 均未指定,则此为缺省值。 .RE .sp .ne 2 .mk .na \fB\fB-e\fR\fR .ad .RS 20n .rt 显示凭证高速缓存中每个凭证的会话密钥和票证的加密类型,或密钥表文件中的每个密钥的加密类型。 .RE .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .RS 20n .rt 显示凭证中存在的标识,使用下列缩写: .sp .ne 2 .mk .na \fBa\fR .ad .RS 5n .rt 匿名 .RE .sp .ne 2 .mk .na \fBA\fR .ad .RS 5n .rt 已预验证 .RE .sp .ne 2 .mk .na \fBd\fR .ad .RS 5n .rt 以后生效的 .RE .sp .ne 2 .mk .na \fBD\fR .ad .RS 5n .rt 可以后生效的 .RE .sp .ne 2 .mk .na \fBf\fR .ad .RS 5n .rt 已转发 .RE .sp .ne 2 .mk .na \fBF\fR .ad .RS 5n .rt 可转发 .RE .sp .ne 2 .mk .na \fBH\fR .ad .RS 5n .rt 已通过硬件验证 .RE .sp .ne 2 .mk .na \fBi\fR .ad .RS 5n .rt 无效 .RE .sp .ne 2 .mk .na \fBI\fR .ad .RS 5n .rt 初始 .RE .sp .ne 2 .mk .na \fBO\fR .ad .RS 5n .rt 可以委托 .RE .sp .ne 2 .mk .na \fBp\fR .ad .RS 5n .rt 代理 .RE .sp .ne 2 .mk .na \fBP\fR .ad .RS 5n .rt 可代理 .RE .sp .ne 2 .mk .na \fBR\fR .ad .RS 5n .rt 可续租 .RE .sp .ne 2 .mk .na \fBT\fR .ad .RS 5n .rt 已检查传输策略 .RE .RE .sp .ne 2 .mk .na \fB\fB-k\fR [\fIkeytab_file\fR]\fR .ad .RS 20n .rt 列出 \fBkeytab\fR 文件中保留的密钥。 .RE .sp .ne 2 .mk .na \fB\fB-K\fR\fR .ad .RS 20n .rt 显示密钥表文件中每个密钥表条目中加密密钥的值。 .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 20n .rt 显示数字 \fBIP\fR 地址而不是反向解析地址。仅在与 \fB-a\fR 选项一起使用时有效。 .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 20n .rt 使 \fBklist\fR 无提示地运行(不生成任何输出),但仍然根据是否找到凭证高速缓存来设置退出状态。如果 \fBklist\fR 找到了某个凭证高速缓存,则退出状态为 \fB0\fR;如果未找到凭证高速缓存或本地领域 TGT 已过期,则退出状态为 \fB1\fR。 .RE .sp .ne 2 .mk .na \fB\fB-t\fR\fR .ad .RS 20n .rt 显示密钥表文件中每个密钥表条目的时间条目时间戳。 .RE .SH 环境变量 .sp .LP \fBklist\fR 使用以下环境变量: .sp .ne 2 .mk .na \fB\fBKRB5CCNAME\fR\fR .ad .RS 14n .rt 凭证(票证)高速缓存的位置。有关语法和详细信息,请参见 \fBkrb5envvar\fR(5)。 .RE .SH 文件 .sp .ne 2 .mk .na \fB\fB/tmp/krb5cc_\fIuid\fR\fR\fR .ad .RS 25n .rt 缺省凭证高速缓存(\fIuid\fR 是用户的十进制 \fBUID\fR)。 .RE .sp .ne 2 .mk .na \fB\fB/etc/krb5/krb5.keytab\fR\fR .ad .RS 25n .rt 本地主机的 \fBkeytab\fR 文件的缺省位置。 .RE .sp .ne 2 .mk .na \fB\fB/etc/krb5/krb5.conf\fR\fR .ad .RS 25n .rt 本地主机的配置文件的缺省位置。请参见 \fBkrb5.conf\fR(4)。 .RE .SH 属性 .sp .LP 有关下列属性的说明,请参见 \fBattributes\fR(5): .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性service/security/kerberos-5 _ 接口稳定性请参见下文。 .TE .sp .LP 命令参数是 "Committed"(已确定)。命令输出是 "Uncommitted"(未确定)。 .SH 另请参见 .sp .LP \fBkdestroy\fR(1)、\fBkinit\fR(1)、\fBkrb5.conf\fR(4)、\fBattributes\fR(5)、\fBkrb5envvar\fR(5)、\fBkerberos\fR(5) .SH 已知问题 .sp .LP 读取某个文件作为服务密钥文件时,几乎不执行错误检查。