[Kerberos] User Ticket Management
Kerberos客户端常用命令包括 kinit, klist, kdestroy, and kpasswd,用户使用这些命令管理自己的 ticket。
此外,每台运行Kerberos的机器应该都配置/etc/krb5.conf,At a minimum, it should define a default_realm setting in [libdefaults]. If you are not using DNS SRV records, it must also contain a [realms] section containing information for your realm’s KDCs.
Ticket 管理
Kerberos Ticket的若干属性:
- forwardable 简单来讲,KDC可以基于该类型TGT发放新的TGT,即使 network address不同。这样不需要再次输入密码。
- proxiable 类似于forwardable,但是不同的是只允许service继承client的认证
- proxy
- postdated
- Renewable 用户不需要重新输入密码就可以获得新的 session key. 但是这种TGT有过期时间。
- invalid
- hardware authentication 申请使用硬件的Ticket认证
- okay as delegate ticket指定的服务器可以用作delegate determined by the policy of that realm
- anonymous ticket is one in which the named principal is a generic principal for that realm; it does not actually specify the individual that will be using the ticket. This ticket is meant only to securely distribute a session key.
用 kinit 获得Ticket
如果你的登录系统集成了Kerberos v5,那么登录时自动获得kerberos ticket. 否则,必须显示获取,比如用 kinit。类似,如果 ticket过期了,kinit可以申请新的ticket.
By default, kinit假设你想要默认realm里与自己名字相同的principal的ticket。
shell% kinit
Password for jennifer@ATHENA.MIT.EDU: <-- [Type jennifer's password here.]
shell%
如果想要申请 forwardable ticket,可以
shell% kinit -f
Password for jennifer@ATHENA.MIT.EDU: <-- [Type your password here.]
shell%
shell% kinit -f -l 3h david@EXAMPLE.COM
Password for david@EXAMPLE.COM: <-- [Type david's password here.]
shell%
用 klist 查看 ticket
当你第一次获得 ticket, 那么只能是TGT,看起来如下:
shell% klist
Ticket cache: /tmp/krb5cc_ttypa
Default principal: jennifer@ATHENA.MIT.EDU Valid starting Expires Service principal
// :: // :: krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
shell%
如果连接到其他机器上,比如:daffodil.mit.edu,但是在同一个realm,klist会得到
shell% klist
Ticket cache: /tmp/krb5cc_ttypa
Default principal: jennifer@ATHENA.MIT.EDU Valid starting Expires Service principal
// :: // :: krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
// :: // :: host/daffodil.mit.edu@ATHENA.MIT.EDU
shell%
当jennifer用ssh程序登陆主机daffodil.mit.edu,ssh程序将jennifer的TGT给KDC,并请求主机ticket,这样jennifer不用再输入密码。
klist有各种flag,具体可以通过 man klist 查看。
用 kdestory 销毁ticket.
由于ticket可能被偷走,这样离开机器的时候可以顺便销毁ticket.
shell% kdestroy
shell%
其他客户端命令
- kdestroy: kdestroy utility destroys the user’s active Kerberos authorization tickets by overwriting and deleting the credentials cache that contains them
- kinit: kinit obtains and caches an initial ticket-granting ticket(TGT) for principal
- klist: klist lists the Kerberos principal and Kerberos tickets held in a credentials cache, or the keys held in a keytab file.
- kpasswd: kpasswd command is used to change a Kerberos principal’s password
- krb5-config
- ksu
- kswitch
- kvno
- sclient
[Kerberos] User Ticket Management的更多相关文章
- FIM 2010: Kerberos Authentication Setup
The goal of this article is to provide some background information regarding the Kerberos related co ...
- KERBEROS PROTOCOL TUTORIAL
KERBEROS PROTOCOL TUTORIAL This tutorial was written by Fulvio Ricciardi and is reprinted here wit ...
- Magic Quadrant for Security Information and Event Management
https://www.gartner.com/doc/reprints?id=1-4LC8PAW&ct=171130&st=sb Summary Security and risk ...
- Kerberos主从配置文档
Kerberos主从配置文档 1. Kerberos主从同步机制 在Master上通过以下命令同步数据: kdb5_util dump /var/kerberos/krb5kdc/slave_db ...
- kafka Enabling Kerberos Authentication
CDK 2.0 and higher Powered By Apache Kafka supports Kerberos authentication, but it is supported onl ...
- 票据传递攻击(Pass the Ticket,PtT)
目录 黄金票据 生成票据并导入 查看票据 验证是否成功 黄金票据和白银票据的不同 票据传递攻击(PtT)是一种使用Kerberos票据代替明文密码或NTLM哈希的方法.PtT最常见的用途可能是使用黄金 ...
- httpcomponents-client-4.4.x
Chapter 1. Fundamentals Prev Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...
- httpcomponents-client-ga(4.5)
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/ Chapter 1. Fundamentals Prev Next ...
- httpcomponents-client-4.3.x DOC
Chapter 1. Fundamentals Prev Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...
随机推荐
- WPF Prism
简介 图解 参考 Using the Model-View-ViewModel Pattern
- 一种可实时处理 O(1)复杂度图像去雾算法的实现。
在我博文的一系列的文章,有不少算法都于去雾有关,比如限制对比度自适应直方图均衡化算法原理.实现及效果.局部自适应自动色阶/对比度算法在图像增强上的应用这两个增强算法都有一定的去雾能力,而最直接的就是& ...
- Caffe源码解析4: Data_layer
转载请注明出处,楼燚(yì)航的blog,http://home.cnblogs.com/louyihang-loves-baiyan/ data_layer应该是网络的最底层,主要是将数据送给blo ...
- 当我学完Python时我学了些什么
本文是本人学完Python后的一遍回顾,加深理解而已,Python大神请过~ 学习Python的这几天来,觉得Python还是比较简单,容易上手的,就基本语法而言,但是有些高级特性掌握起来还是有些难度 ...
- [bzoj1013][JSOI2008][球形空间产生器sphere] (高斯消元)
Description 有一个球形空间产生器能够在n维空间中产生一个坚硬的球体.现在,你被困在了这个n维球体中,你只知道球 面上n+1个点的坐标,你需要以最快的速度确定这个n维球体的球心坐标,以便于摧 ...
- 关于SIGSEGV错误及处理方法(转)
转自:http://blog.csdn.net/brace/article/details/1102422 今天编程遇到了SIGSEGV错误,比较困惑,所以找了些资料,总结一下: (1)官方说法是 ...
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
现象: shell脚本中source aaa.sh时提示 source: not found 原因: ls -l `which sh` 提示/bin/sh -> dash 这说明是用dash来进 ...
- jquery更改输入框type为密码框password
很蛋疼的一个问题: <input type="text" id="e1" value="123" /> 用juqery将文本框变 ...
- Win7下mysql root账户登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
ERROR 1045 (28000): Ac-- password: YES)这个意思是密码不正确,那就修改密码: 如果你是服务器是 windows xp/2000/2003/nt 都可以使用这个方法 ...
- .Net 闭包理解
.Net 闭包理解 这个东西初看是比较难懂,但是一旦理解之后就很容易了,做笔记以加深印象.且看这题 example.1 class Program { static void Main(string[ ...