[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 ...
随机推荐
- nginx简易入门(转)
相信很多人都听过nginx,这个小巧的东西慢慢地在吞食apache和IIS的份额.那究竟它有什么作用呢?可能很多人未必了解. 说到反向代理,可能很多人都听说,但具体什么是反向代理,很多人估计就不清楚了 ...
- java设计模式之外观模式
外观模式概念 外观模式又称为门面模式,为子系统中的一组接口提供一个一致的界面,此模式定义了一个搞层次接口,使得这一个子系统更加容易使用.这一模式完美的体现了依赖倒转原则和迪米特法则的思想,所以是非常常 ...
- NOIP2010pj三国游戏[博弈论]
题目描述 小涵很喜欢电脑游戏,这些天他正在玩一个叫做<三国>的游戏. 在游戏中,小涵和计算机各执一方,组建各自的军队进行对战.游戏中共有 N 位武将(N为偶数且不小于 4),任意两个武将之 ...
- Spring基础[IOC/DI、AOP]
一.Spring作用:管理项目中各种业务Bean(service类.Dao类.Action类),实例化类,属性赋值 二.Spring IOC(Inversion of Control )控制反转,也被 ...
- [No000082]Convert和Parse的区别/Convert.ToInt32()与int.Parse()的区别
(1)这两个方法的最大不同是它们对null值的处理方法: Convert.ToInt32(null)会返回0而不会产生任何异常,但int.Parse(null)则会产生异常. 没搞清楚Convert. ...
- .net Global.asax文件使用
一.Application_start: 第一个访问网站的用户会触发该方法. 通常会在该方法里定义一些系统变量,如聊天室的在线总人数统计,历史访问人数统计的初始化等等均可在这里定义. Applicat ...
- HTML5入门(CSS样式-------------------(CSS基础知识点----------------------------))
CSS继承性+层叠性+盒子+浮动 一.CSS继承性 eg: <style> div{ ...
- IO(四)----对象的序列化
对象的序列化: 将内存中的对象直接写入到文件设备中. 对象的反序列化: 将文件设备中持久化的数据转换为内存对象. 自定义类只要实现了Serializable接口,便可以通过对象输入输出流对对象进行 ...
- 基于SoCkit的opencl实验1-基础例程
基于SoCkit的opencl实验1-基础例程 准备软硬件 Arrow SoCkit Board 4GB or larger microSD Card Quartus II v14.1 SoCEDS ...
- Sniffer的完整代码,基于winpcap抓包统计吞吐量
using System; using System.Net; using System.Net.Sockets; using System.Net.NetworkInformation; using ...