Imported Upstream version 1.10.2
[platform/upstream/krb5.git] / doc / rst_source / krb_users / tkt_mgmt / view_klist.rst
1 .. _vytwk_label:
2
3 Viewing tickets with *klist*
4 ================================
5
6
7 The klist command shows your tickets. When you first obtain tickets, you will have only the ticket-granting ticket. The listing would look like this::
8
9      shell% klist
10      Ticket cache: /tmp/krb5cc_ttypa
11      Default principal: jennifer@ATHENA.MIT.EDU
12      
13      Valid starting     Expires            Service principal
14      06/07/04 19:49:21  06/08/04 05:49:19  krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
15      shell%
16
17 The ticket cache is the location of your ticket file. In the above example, this file is named */tmp/krb5cc_ttypa*. The default principal is your kerberos principal.
18
19 The *valid starting* and *expires* fields describe the period of time during which the ticket is valid. The service principal describes each ticket. The ticket-granting ticket has the primary *krbtgt*, and the instance is the realm name.
20
21 Now, if *jennifer* connected to the machine *daffodil.mit.edu*, and then typed *klist* again, she would have gotten the following result::
22
23      shell% klist
24      Ticket cache: /tmp/krb5cc_ttypa
25      Default principal: jennifer@ATHENA.MIT.EDU
26      
27      Valid starting     Expires            Service principal
28      06/07/04 19:49:21  06/08/04 05:49:19  krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
29      06/07/04 20:22:30  06/08/04 05:49:19  host/daffodil.mit.edu@ATHENA.MIT.EDU
30      shell%
31
32 Here's what happened: when *jennifer* used telnet to connect to the host *daffodil.mit.edu*, the telnet program presented her ticket-granting ticket to the KDC and requested a host ticket for the host *daffodil.mit.edu*. The KDC sent the host ticket, which telnet then presented to the host *daffodil.mit.edu*, and she was allowed to log in without typing her password.
33
34 Suppose your Kerberos tickets allow you to log into a host in another domain, such as *trillium.example.com*, which is also in another Kerberos realm, *EXAMPLE.COM*. If you telnet to this host, you will receive a ticket-granting ticket for the realm *EXAMPLE.COM*, plus the new host ticket for *trillium.example.com*. *klist* will now show::
35
36      shell% klist
37      Ticket cache: /tmp/krb5cc_ttypa
38      Default principal: jennifer@ATHENA.MIT.EDU
39      
40      Valid starting     Expires            Service principal
41      06/07/04 19:49:21  06/08/04 05:49:19  krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
42      06/07/04 20:22:30  06/08/04 05:49:19  host/daffodil.mit.edu@ATHENA.MIT.EDU
43      06/07/04 20:24:18  06/08/04 05:49:19  krbtgt/EXAMPLE.COM@ATHENA.MIT.EDU
44      06/07/04 20:24:18  06/08/04 05:49:19  host/trillium.example.com@EXAMPLE.COM
45      shell%
46
47 You can use the **-f** option to view the flags that apply to your tickets. The flags are:
48
49 ===== =========================
50   F   Forwardable
51   f   forwarded
52   P   Proxiable
53   p   proxy
54   D   postDateable
55   d   postdated
56   R   Renewable
57   I   Initial
58   i   invalid
59   H   Hardware authenticated
60   A   preAuthenticated
61   T   Transit policy checked
62   O   Okay as delegate
63   a   anonymous
64 ===== =========================
65
66 Here is a sample listing. In this example, the user *jennifer* obtained her initial tickets (**I**), which are forwardable (**F**) and postdated (**d**) but not yet validated (**i**)::
67
68      shell% klist -f
69      Ticket cache: /tmp/krb5cc_320
70      Default principal: jennifer@ATHENA.MIT.EDU
71      
72      Valid starting      Expires             Service principal
73      31/07/05 19:06:25  31/07/05 19:16:25  krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU
74              Flags: FdiI
75      shell%
76
77
78 In the following example, the user *david*'s tickets were forwarded (**f**) to this host from another host. The tickets are reforwardable (**F**)::
79
80      shell% klist -f
81      Ticket cache: /tmp/krb5cc_p11795
82      Default principal: david@EXAMPLE.COM
83      
84      Valid starting     Expires            Service principal
85      07/31/05 11:52:29  07/31/05 21:11:23  krbtgt/EXAMPLE.COM@EXAMPLE.COM
86              Flags: Ff
87      07/31/05 12:03:48  07/31/05 21:11:23  host/trillium.example.com@EXAMPLE.COM
88              Flags: Ff
89      shell%
90
91 ------------------
92
93 Feedback:
94
95 Please, provide your feedback at krb5-bugs@mit.edu?subject=Documentation___users_tkt_mgmt
96
97