Kerberos客户端常用命令包括 kinitklistkdestroy, 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的更多相关文章

  1. FIM 2010: Kerberos Authentication Setup

    The goal of this article is to provide some background information regarding the Kerberos related co ...

  2. KERBEROS PROTOCOL TUTORIAL

    KERBEROS PROTOCOL TUTORIAL   This tutorial was written by Fulvio Ricciardi and is reprinted here wit ...

  3. 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 ...

  4. Kerberos主从配置文档

    Kerberos主从配置文档   1. Kerberos主从同步机制 在Master上通过以下命令同步数据: kdb5_util dump /var/kerberos/krb5kdc/slave_db ...

  5. kafka Enabling Kerberos Authentication

    CDK 2.0 and higher Powered By Apache Kafka supports Kerberos authentication, but it is supported onl ...

  6. 票据传递攻击(Pass the Ticket,PtT)

    目录 黄金票据 生成票据并导入 查看票据 验证是否成功 黄金票据和白银票据的不同 票据传递攻击(PtT)是一种使用Kerberos票据代替明文密码或NTLM哈希的方法.PtT最常见的用途可能是使用黄金 ...

  7. httpcomponents-client-4.4.x

    Chapter 1. Fundamentals Prev     Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...

  8. httpcomponents-client-ga(4.5)

    http://hc.apache.org/httpcomponents-client-ga/tutorial/html/   Chapter 1. Fundamentals Prev     Next ...

  9. httpcomponents-client-4.3.x DOC

    Chapter 1. Fundamentals Prev     Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...

随机推荐

  1. 每天一个linux命令(3):pwd命令

    Linux中用 pwd 命令来查看”当前工作目录“的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确定当前位置时,就会使用pwd来判定当前目录在文件系统内的确切位置. ...

  2. C# 扩展方法集

    语法注意点 可以使用扩展方法来扩展类或接口. 不能重写扩展方法. 扩展方法只能在非嵌套.非泛型静态类内部定义. 扩展方法必须定义在静态类中. 扩展方法的第一个参数的类型用于指定被扩展的类型,它限制该扩 ...

  3. 浅谈Java中的equals和==

    浅谈Java中的equals和== 在初学Java时,可能会经常碰到下面的代码: String str1 = new String("hello"); String str2 = ...

  4. PHP数组操作

    PHP数组 1.数字索引数组 1.1创建一个数组 php中最常用的两个类型是:数组,字符串.数组也分为两种,一种是数字索引,一种是关键是索引,关键字索引有点像python中字典的意思.数字索引类型的数 ...

  5. IO(三)----序列流

    SequenceInputStream 表示其他输入流的逻辑串联.它从输入流的有序集合开始,并从第一个输入流开始读取,直到到达文件末尾,接着从第二个输入流读取,依次类推,直到到达包含的最后一个输入流的 ...

  6. [Django 1]安装Django并创建虚拟虚拟环境项目

    1)安装Django 使用pip来安装,命令如下: pip3 install Djangopip install Django(安装到python2)python3 -m pip install Dj ...

  7. 覆盖问题:最大覆盖问题(Maximum Covering Location Problem,MCLP)和集覆盖问题(Location Set Covering Problem,LSCP)

    集覆盖问题研究满足覆盖所有需求点顾客的前提下,服务站总的建站个数或建 设费用最小的问题.集覆盖问题最早是由 Roth和 Toregas等提出的,用于解决消防中心和救护车等的应急服务设施的选址问题,他们 ...

  8. RSVP协议的基本概念介绍

    2010-06-12 14:12 佚名 互联网 字号:T | T 对于RSVP协议的简单介绍和图解.通过文章,我们将对这个含义的基本概念和结构,以及工作方式等方面的知识有所了解.希望对大家有所帮助. ...

  9. 代码生成工具——Entity Framework Power Tools

    Entity Framework Power Tools是VS上的一个根据数据库生成Model的Code First映射工具.在VS里面右键即可看到.什么,没有? 别慌,可以单独下载的,见 https ...

  10. E - Super Jumping! Jumping! Jumping!

    /* Nowadays, a kind of chess game called "Super Jumping! Jumping! Jumping!" is very popula ...