coverity 745495
[heimdal.git] / kuser / kgetcred.1
blob5bc5762903fe7b68256d84361300dee77d0725a6
1 .\" Copyright (c) 1999, 2001 - 2002 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" $Id$
33 .\"
34 .Dd March 12, 2004
35 .Dt KGETCRED 1
36 .Os HEIMDAL
37 .Sh NAME
38 .Nm kgetcred
39 .Nd "get a ticket for a particular service"
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl Fl canonicalize
43 .Op Fl Fl canonical
44 .Oo Fl c cache \*(Ba Xo
45 .Fl Fl cache= Ns Ar cache
46 .Xc
47 .Oc
48 .Oo Fl e Ar enctype \*(Ba Xo
49 .Fl Fl enctype= Ns Ar enctype
50 .Xc
51 .Oc
52 .Op Fl Fl debug
53 .Oo Fl H \*(Ba Xo
54 .Fl Fl hostbased
55 .Xc
56 .Oc
57 .Op Fl Fl name-type= Ns Ar name-type
58 .Op Fl Fl no-transit-check
59 .Op Fl Fl no-store
60 .Op Fl Fl cached-only
61 .Op Fl Fl version
62 .Op Fl Fl help
63 .Ar principal
64 .Nm
65 .Op options
66 .Fl Fl hostbased
67 .Ar principal
68 .Nm
69 .Op options
70 .Fl Fl hostbased
71 .Ar service
72 .Ar hostname
73 .Ar [extra-components]
74 .Sh DESCRIPTION
75 .Nm
76 obtains a ticket for the given service principal.
77 Usually tickets for services are obtained automatically when needed
78 but sometimes for some odd reason you want to obtain a particular
79 ticket or of a special type.
80 .Pp
82 .Fl Fl hostbased
83 is given then the given service principal name will be canonicalized
84 (see below).
85 .Pp
86 The third form constructs a host-based principal from the given service
87 name and hostname.  The service name "host" is used if the given
88 .Ar service
89 name in the third usage is the empty string.
90 .Pp
91 For host-based names, the local host's hostname is used if the given
92 .Ar hostname
93 is the empty string or if the
94 .Ar principal
95 has a single component.
96 .Pp
97 Any additional components will be included, even for host-based service
98 principal names, but there are no defaults nor local canonicalization
99 rules for additional components.
101 Local name canonicalization rules are applied unless the
102 .Fl Fl canonical
103 option is given.  Currently local name canonicalization rules are
104 supported only for host-based principal names' hostname component.
106 The principal's realm name may be canonicalized by following Kerberos
107 referrals from the client principal's home realm if the
108 .Fl Fl canonicalize
109 option is given or if the local name canonicalization rules are
110 configured to use referrals.
112 Supported options:
113 .Bl -tag -width Ds
114 .It Fl Fl canonicalize
115 requests that the KDC canonicalize the principal.  Currently this only
116 canonicalizes the realm by chasing referrals from the user's start
117 realm, but in the future this may also enable the KDC to canonicalize
118 the complete principal name.
119 .It Fl Fl canonical
120 turns off local canonicalization of the principal name.
121 .It Fl Fl name-type= Ns Ar name-type
122 the name-type to use when parsing the principal name.
123 .It Fl Fl hostbased
124 is short for
125 .Fl Fl name-type=srv_hst .
126 .It Fl c Ar cache , Fl Fl cache= Ns Ar cache
127 the credential cache to use.
128 .It Fl Fl delegation-credential-cache= Ns Ar cache
129 the credential cache to use for delegation.
130 .It Fl e Ar enctype , Fl Fl enctype= Ns Ar enctype
131 encryption type to use.
132 .It Fl Fl no-transit-check
133 requests that the KDC doesn't do transit checking.
134 .It Fl Fl no-store
135 do not store tickets in the ccache.
136 .It Fl Fl cached-only
137 do not talk the TGS, search only the ccache.
138 .It Fl Fl forwardable
139 .It Fl Fl debug
140 enables debug output to stderr.
141 .It Fl Fl version
142 .It Fl Fl help
145 If the
146 .Fl Fl canonical
147 option is used, then no further canonicalization should be done locally
148 by the client (for example, DNS), but if
149 .Fl Fl canonicalize
150 is used, then the client will ask that the KDC canonicalize the name.
152 If the
153 .Fl Fl canonicalize
154 option is used with
155 .Fl Fl hostbased
156 a host-based name-type, and
157 .Fl Fl canonical
158 is not used, then the hostname will be canonicalized according to the
159 name canonicalization rules in
160 .Va krb5.conf .
162 GSS-API initiator applications with host-based services will get the
163 same behavior as using the
164 .Fl Fl canonicalize
165 .Fl Fl hostbased
166 options here.
167 .Sh SEE ALSO
168 .Xr kinit 1 ,
169 .Xr klist 1 ,
170 .Xr krb5.conf 5 ,
171 .Xr krb5_openlog 3