| 1 |
<!DOCTYPE html> |
| 2 |
|
| 3 |
<html lang="en" data-content_root="../../"> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8" /> |
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 7 |
|
| 8 |
<title>kinit — MIT Kerberos Documentation</title> |
| 9 |
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" /> |
| 10 |
<link rel="stylesheet" type="text/css" href="../../_static/agogo.css?v=879f3c71" /> |
| 11 |
<link rel="stylesheet" type="text/css" href="../../_static/kerb.css?v=6a0b3979" /> |
| 12 |
<script src="../../_static/documentation_options.js?v=6dbce55c"></script> |
| 13 |
<script src="../../_static/doctools.js?v=888ff710"></script> |
| 14 |
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> |
| 15 |
<link rel="author" title="About these documents" href="../../about.html" /> |
| 16 |
<link rel="index" title="Index" href="../../genindex.html" /> |
| 17 |
<link rel="search" title="Search" href="../../search.html" /> |
| 18 |
<link rel="copyright" title="Copyright" href="../../copyright.html" /> |
| 19 |
<link rel="next" title="klist" href="klist.html" /> |
| 20 |
<link rel="prev" title="kdestroy" href="kdestroy.html" /> |
| 21 |
</head><body> |
| 22 |
<div class="header-wrapper"> |
| 23 |
<div class="header"> |
| 24 |
|
| 25 |
|
| 26 |
<h1><a href="../../index.html">MIT Kerberos Documentation</a></h1> |
| 27 |
|
| 28 |
<div class="rel"> |
| 29 |
|
| 30 |
<a href="../../index.html" title="Full Table of Contents" |
| 31 |
accesskey="C">Contents</a> | |
| 32 |
<a href="kdestroy.html" title="kdestroy" |
| 33 |
accesskey="P">previous</a> | |
| 34 |
<a href="klist.html" title="klist" |
| 35 |
accesskey="N">next</a> | |
| 36 |
<a href="../../genindex.html" title="General Index" |
| 37 |
accesskey="I">index</a> | |
| 38 |
<a href="../../search.html" title="Enter search criteria" |
| 39 |
accesskey="S">Search</a> | |
| 40 |
<a href="mailto:[email protected]?subject=Documentation__kinit">feedback</a> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div class="content-wrapper"> |
| 46 |
<div class="content"> |
| 47 |
<div class="document"> |
| 48 |
|
| 49 |
<div class="documentwrapper"> |
| 50 |
<div class="bodywrapper"> |
| 51 |
<div class="body" role="main"> |
| 52 |
|
| 53 |
<section id="kinit"> |
| 54 |
<span id="kinit-1"></span><h1>kinit<a class="headerlink" href="#kinit" title="Link to this heading">¶</a></h1> |
| 55 |
<section id="synopsis"> |
| 56 |
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Link to this heading">¶</a></h2> |
| 57 |
<p><strong>kinit</strong> |
| 58 |
[<strong>-V</strong>] |
| 59 |
[<strong>-l</strong> <em>lifetime</em>] |
| 60 |
[<strong>-s</strong> <em>start_time</em>] |
| 61 |
[<strong>-r</strong> <em>renewable_life</em>] |
| 62 |
[<strong>-p</strong> | -<strong>P</strong>] |
| 63 |
[<strong>-f</strong> | -<strong>F</strong>] |
| 64 |
[<strong>-a</strong>] |
| 65 |
[<strong>-A</strong>] |
| 66 |
[<strong>-C</strong>] |
| 67 |
[<strong>-E</strong>] |
| 68 |
[<strong>-v</strong>] |
| 69 |
[<strong>-R</strong>] |
| 70 |
[<strong>-k</strong> [<strong>-i</strong> | -<strong>t</strong> <em>keytab_file</em>]] |
| 71 |
[<strong>-c</strong> <em>cache_name</em>] |
| 72 |
[<strong>-n</strong>] |
| 73 |
[<strong>-S</strong> <em>service_name</em>] |
| 74 |
[<strong>-I</strong> <em>input_ccache</em>] |
| 75 |
[<strong>-T</strong> <em>armor_ccache</em>] |
| 76 |
[<strong>-X</strong> <em>attribute</em>[=<em>value</em>]] |
| 77 |
[<strong>–request-pac</strong> | <strong>–no-request-pac</strong>] |
| 78 |
[<em>principal</em>]</p> |
| 79 |
</section> |
| 80 |
<section id="description"> |
| 81 |
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Link to this heading">¶</a></h2> |
| 82 |
<p>kinit obtains and caches an initial ticket-granting ticket for |
| 83 |
<em>principal</em>. If <em>principal</em> is absent, kinit chooses an appropriate |
| 84 |
principal name based on existing credential cache contents or the |
| 85 |
local username of the user invoking kinit. Some options modify the |
| 86 |
choice of principal name.</p> |
| 87 |
</section> |
| 88 |
<section id="options"> |
| 89 |
<h2>OPTIONS<a class="headerlink" href="#options" title="Link to this heading">¶</a></h2> |
| 90 |
<dl> |
| 91 |
<dt><strong>-V</strong></dt><dd><p>display verbose output.</p> |
| 92 |
</dd> |
| 93 |
<dt><strong>-l</strong> <em>lifetime</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> string.) Requests a ticket with the lifetime |
| 94 |
<em>lifetime</em>.</p> |
| 95 |
<p>For example, <code class="docutils literal notranslate"><span class="pre">kinit</span> <span class="pre">-l</span> <span class="pre">5:30</span></code> or <code class="docutils literal notranslate"><span class="pre">kinit</span> <span class="pre">-l</span> <span class="pre">5h30m</span></code>.</p> |
| 96 |
<p>If the <strong>-l</strong> option is not specified, the default ticket lifetime |
| 97 |
(configured by each site) is used. Specifying a ticket lifetime |
| 98 |
longer than the maximum ticket lifetime (configured by each site) |
| 99 |
will not override the configured maximum ticket lifetime.</p> |
| 100 |
</dd> |
| 101 |
<dt><strong>-s</strong> <em>start_time</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> string.) Requests a postdated ticket. Postdated |
| 102 |
tickets are issued with the <strong>invalid</strong> flag set, and need to be |
| 103 |
resubmitted to the KDC for validation before use.</p> |
| 104 |
<p><em>start_time</em> specifies the duration of the delay before the ticket |
| 105 |
can become valid.</p> |
| 106 |
</dd> |
| 107 |
<dt><strong>-r</strong> <em>renewable_life</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> string.) Requests renewable tickets, with a total |
| 108 |
lifetime of <em>renewable_life</em>.</p> |
| 109 |
</dd> |
| 110 |
<dt><strong>-f</strong></dt><dd><p>requests forwardable tickets.</p> |
| 111 |
</dd> |
| 112 |
<dt><strong>-F</strong></dt><dd><p>requests non-forwardable tickets.</p> |
| 113 |
</dd> |
| 114 |
<dt><strong>-p</strong></dt><dd><p>requests proxiable tickets.</p> |
| 115 |
</dd> |
| 116 |
<dt><strong>-P</strong></dt><dd><p>requests non-proxiable tickets.</p> |
| 117 |
</dd> |
| 118 |
<dt><strong>-a</strong></dt><dd><p>requests tickets restricted to the host’s local address[es].</p> |
| 119 |
</dd> |
| 120 |
<dt><strong>-A</strong></dt><dd><p>requests tickets not restricted by address.</p> |
| 121 |
</dd> |
| 122 |
<dt><strong>-C</strong></dt><dd><p>requests canonicalization of the principal name, and allows the |
| 123 |
KDC to reply with a different client principal from the one |
| 124 |
requested.</p> |
| 125 |
</dd> |
| 126 |
<dt><strong>-E</strong></dt><dd><p>treats the principal name as an enterprise name.</p> |
| 127 |
</dd> |
| 128 |
<dt><strong>-v</strong></dt><dd><p>requests that the ticket-granting ticket in the cache (with the |
| 129 |
<strong>invalid</strong> flag set) be passed to the KDC for validation. If the |
| 130 |
ticket is within its requested time range, the cache is replaced |
| 131 |
with the validated ticket.</p> |
| 132 |
</dd> |
| 133 |
<dt><strong>-R</strong></dt><dd><p>requests renewal of the ticket-granting ticket. Note that an |
| 134 |
expired ticket cannot be renewed, even if the ticket is still |
| 135 |
within its renewable life.</p> |
| 136 |
<p>Note that renewable tickets that have expired as reported by |
| 137 |
<a class="reference internal" href="klist.html#klist-1"><span class="std std-ref">klist</span></a> may sometimes be renewed using this option, |
| 138 |
because the KDC applies a grace period to account for client-KDC |
| 139 |
clock skew. See <a class="reference internal" href="../../admin/conf_files/krb5_conf.html#krb5-conf-5"><span class="std std-ref">krb5.conf</span></a> <strong>clockskew</strong> setting.</p> |
| 140 |
</dd> |
| 141 |
<dt><strong>-k</strong> [<strong>-i</strong> | <strong>-t</strong> <em>keytab_file</em>]</dt><dd><p>requests a ticket, obtained from a key in the local host’s keytab. |
| 142 |
The location of the keytab may be specified with the <strong>-t</strong> |
| 143 |
<em>keytab_file</em> option, or with the <strong>-i</strong> option to specify the use |
| 144 |
of the default client keytab; otherwise the default keytab will be |
| 145 |
used. By default, a host ticket for the local host is requested, |
| 146 |
but any principal may be specified. On a KDC, the special keytab |
| 147 |
location <code class="docutils literal notranslate"><span class="pre">KDB:</span></code> can be used to indicate that kinit should open |
| 148 |
the KDC database and look up the key directly. This permits an |
| 149 |
administrator to obtain tickets as any principal that supports |
| 150 |
authentication based on the key.</p> |
| 151 |
</dd> |
| 152 |
<dt><strong>-n</strong></dt><dd><p>Requests anonymous processing. Two types of anonymous principals |
| 153 |
are supported.</p> |
| 154 |
<p>For fully anonymous Kerberos, configure pkinit on the KDC and |
| 155 |
configure <strong>pkinit_anchors</strong> in the client’s <a class="reference internal" href="../../admin/conf_files/krb5_conf.html#krb5-conf-5"><span class="std std-ref">krb5.conf</span></a>. |
| 156 |
Then use the <strong>-n</strong> option with a principal of the form <code class="docutils literal notranslate"><span class="pre">@REALM</span></code> |
| 157 |
(an empty principal name followed by the at-sign and a realm |
| 158 |
name). If permitted by the KDC, an anonymous ticket will be |
| 159 |
returned.</p> |
| 160 |
<p>A second form of anonymous tickets is supported; these |
| 161 |
realm-exposed tickets hide the identity of the client but not the |
| 162 |
client’s realm. For this mode, use <code class="docutils literal notranslate"><span class="pre">kinit</span> <span class="pre">-n</span></code> with a normal |
| 163 |
principal name. If supported by the KDC, the principal (but not |
| 164 |
realm) will be replaced by the anonymous principal.</p> |
| 165 |
<p>As of release 1.8, the MIT Kerberos KDC only supports fully |
| 166 |
anonymous operation.</p> |
| 167 |
</dd> |
| 168 |
</dl> |
| 169 |
<p><strong>-I</strong> <em>input_ccache</em></p> |
| 170 |
<blockquote> |
| 171 |
<div><p>Specifies the name of a credentials cache that already contains a |
| 172 |
ticket. When obtaining that ticket, if information about how that |
| 173 |
ticket was obtained was also stored to the cache, that information |
| 174 |
will be used to affect how new credentials are obtained, including |
| 175 |
preselecting the same methods of authenticating to the KDC.</p> |
| 176 |
</div></blockquote> |
| 177 |
<dl> |
| 178 |
<dt><strong>-T</strong> <em>armor_ccache</em></dt><dd><p>Specifies the name of a credentials cache that already contains a |
| 179 |
ticket. If supported by the KDC, this cache will be used to armor |
| 180 |
the request, preventing offline dictionary attacks and allowing |
| 181 |
the use of additional preauthentication mechanisms. Armoring also |
| 182 |
makes sure that the response from the KDC is not modified in |
| 183 |
transit.</p> |
| 184 |
</dd> |
| 185 |
<dt><strong>-c</strong> <em>cache_name</em></dt><dd><p>use <em>cache_name</em> as the Kerberos 5 credentials (ticket) cache |
| 186 |
location. If this option is not used, the default cache location |
| 187 |
is used.</p> |
| 188 |
<p>The default cache location may vary between systems. If the |
| 189 |
<strong>KRB5CCNAME</strong> environment variable is set, its value is used to |
| 190 |
locate the default cache. If a principal name is specified and |
| 191 |
the type of the default cache supports a collection (such as the |
| 192 |
DIR type), an existing cache containing credentials for the |
| 193 |
principal is selected or a new one is created and becomes the new |
| 194 |
primary cache. Otherwise, any existing contents of the default |
| 195 |
cache are destroyed by kinit.</p> |
| 196 |
</dd> |
| 197 |
<dt><strong>-S</strong> <em>service_name</em></dt><dd><p>specify an alternate service name to use when getting initial |
| 198 |
tickets.</p> |
| 199 |
</dd> |
| 200 |
<dt><strong>-X</strong> <em>attribute</em>[=<em>value</em>]</dt><dd><p>specify a pre-authentication <em>attribute</em> and <em>value</em> to be |
| 201 |
interpreted by pre-authentication modules. The acceptable |
| 202 |
attribute and value values vary from module to module. This |
| 203 |
option may be specified multiple times to specify multiple |
| 204 |
attributes. If no value is specified, it is assumed to be “yes”.</p> |
| 205 |
<p>The following attributes are recognized by the PKINIT |
| 206 |
pre-authentication mechanism:</p> |
| 207 |
<dl class="simple"> |
| 208 |
<dt><strong>X509_user_identity</strong>=<em>value</em></dt><dd><p>specify where to find user’s X509 identity information</p> |
| 209 |
</dd> |
| 210 |
<dt><strong>X509_anchors</strong>=<em>value</em></dt><dd><p>specify where to find trusted X509 anchor information</p> |
| 211 |
</dd> |
| 212 |
<dt><strong>disable_freshness</strong>[<strong>=yes</strong>]</dt><dd><p>disable sending freshness tokens (for testing purposes only)</p> |
| 213 |
</dd> |
| 214 |
</dl> |
| 215 |
</dd> |
| 216 |
<dt><strong>–request-pac</strong> | <strong>–no-request-pac</strong></dt><dd><p>mutually exclusive. If <strong>–request-pac</strong> is set, ask the KDC to |
| 217 |
include a PAC in authdata; if <strong>–no-request-pac</strong> is set, ask the |
| 218 |
KDC not to include a PAC; if neither are set, the KDC will follow |
| 219 |
its default, which is typically is to include a PAC if doing so is |
| 220 |
supported.</p> |
| 221 |
</dd> |
| 222 |
</dl> |
| 223 |
</section> |
| 224 |
<section id="environment"> |
| 225 |
<h2>ENVIRONMENT<a class="headerlink" href="#environment" title="Link to this heading">¶</a></h2> |
| 226 |
<p>See <a class="reference internal" href="../user_config/kerberos.html#kerberos-7"><span class="std std-ref">kerberos</span></a> for a description of Kerberos environment |
| 227 |
variables.</p> |
| 228 |
</section> |
| 229 |
<section id="files"> |
| 230 |
<h2>FILES<a class="headerlink" href="#files" title="Link to this heading">¶</a></h2> |
| 231 |
<dl class="simple"> |
| 232 |
<dt><a class="reference internal" href="../../mitK5defaults.html#paths"><span class="std std-ref">DEFCCNAME</span></a></dt><dd><p>default location of Kerberos 5 credentials cache</p> |
| 233 |
</dd> |
| 234 |
<dt><a class="reference internal" href="../../mitK5defaults.html#paths"><span class="std std-ref">DEFKTNAME</span></a></dt><dd><p>default location for the local host’s keytab.</p> |
| 235 |
</dd> |
| 236 |
</dl> |
| 237 |
</section> |
| 238 |
<section id="see-also"> |
| 239 |
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Link to this heading">¶</a></h2> |
| 240 |
<p><a class="reference internal" href="klist.html#klist-1"><span class="std std-ref">klist</span></a>, <a class="reference internal" href="kdestroy.html#kdestroy-1"><span class="std std-ref">kdestroy</span></a>, <a class="reference internal" href="../user_config/kerberos.html#kerberos-7"><span class="std std-ref">kerberos</span></a></p> |
| 241 |
</section> |
| 242 |
</section> |
| 243 |
|
| 244 |
|
| 245 |
<div class="clearer"></div> |
| 246 |
</div> |
| 247 |
</div> |
| 248 |
</div> |
| 249 |
</div> |
| 250 |
<div class="sidebar"> |
| 251 |
|
| 252 |
<h2>On this page</h2> |
| 253 |
<ul> |
| 254 |
<li><a class="reference internal" href="#">kinit</a><ul> |
| 255 |
<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li> |
| 256 |
<li><a class="reference internal" href="#description">DESCRIPTION</a></li> |
| 257 |
<li><a class="reference internal" href="#options">OPTIONS</a></li> |
| 258 |
<li><a class="reference internal" href="#environment">ENVIRONMENT</a></li> |
| 259 |
<li><a class="reference internal" href="#files">FILES</a></li> |
| 260 |
<li><a class="reference internal" href="#see-also">SEE ALSO</a></li> |
| 261 |
</ul> |
| 262 |
</li> |
| 263 |
</ul> |
| 264 |
|
| 265 |
<br/> |
| 266 |
<h2>Table of contents</h2> |
| 267 |
<ul class="current"> |
| 268 |
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">For users</a><ul class="current"> |
| 269 |
<li class="toctree-l2"><a class="reference internal" href="../pwd_mgmt.html">Password management</a></li> |
| 270 |
<li class="toctree-l2"><a class="reference internal" href="../tkt_mgmt.html">Ticket management</a></li> |
| 271 |
<li class="toctree-l2"><a class="reference internal" href="../user_config/index.html">User config files</a></li> |
| 272 |
<li class="toctree-l2 current"><a class="reference internal" href="index.html">User commands</a><ul class="current"> |
| 273 |
<li class="toctree-l3"><a class="reference internal" href="kdestroy.html">kdestroy</a></li> |
| 274 |
<li class="toctree-l3 current"><a class="current reference internal" href="#">kinit</a></li> |
| 275 |
<li class="toctree-l3"><a class="reference internal" href="klist.html">klist</a></li> |
| 276 |
<li class="toctree-l3"><a class="reference internal" href="kpasswd.html">kpasswd</a></li> |
| 277 |
<li class="toctree-l3"><a class="reference internal" href="krb5-config.html">krb5-config</a></li> |
| 278 |
<li class="toctree-l3"><a class="reference internal" href="ksu.html">ksu</a></li> |
| 279 |
<li class="toctree-l3"><a class="reference internal" href="kswitch.html">kswitch</a></li> |
| 280 |
<li class="toctree-l3"><a class="reference internal" href="kvno.html">kvno</a></li> |
| 281 |
<li class="toctree-l3"><a class="reference internal" href="sclient.html">sclient</a></li> |
| 282 |
</ul> |
| 283 |
</li> |
| 284 |
</ul> |
| 285 |
</li> |
| 286 |
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">For administrators</a></li> |
| 287 |
<li class="toctree-l1"><a class="reference internal" href="../../appdev/index.html">For application developers</a></li> |
| 288 |
<li class="toctree-l1"><a class="reference internal" href="../../plugindev/index.html">For plugin module developers</a></li> |
| 289 |
<li class="toctree-l1"><a class="reference internal" href="../../build/index.html">Building Kerberos V5</a></li> |
| 290 |
<li class="toctree-l1"><a class="reference internal" href="../../basic/index.html">Kerberos V5 concepts</a></li> |
| 291 |
<li class="toctree-l1"><a class="reference internal" href="../../formats/index.html">Protocols and file formats</a></li> |
| 292 |
<li class="toctree-l1"><a class="reference internal" href="../../mitK5features.html">MIT Kerberos features</a></li> |
| 293 |
<li class="toctree-l1"><a class="reference internal" href="../../build_this.html">How to build this documentation from the source</a></li> |
| 294 |
<li class="toctree-l1"><a class="reference internal" href="../../about.html">Contributing to the MIT Kerberos Documentation</a></li> |
| 295 |
<li class="toctree-l1"><a class="reference internal" href="../../resources.html">Resources</a></li> |
| 296 |
</ul> |
| 297 |
|
| 298 |
<br/> |
| 299 |
<h4><a href="../../index.html">Full Table of Contents</a></h4> |
| 300 |
<h4>Search</h4> |
| 301 |
<form class="search" action="../../search.html" method="get"> |
| 302 |
<input type="text" name="q" size="18" /> |
| 303 |
<input type="submit" value="Go" /> |
| 304 |
<input type="hidden" name="check_keywords" value="yes" /> |
| 305 |
<input type="hidden" name="area" value="default" /> |
| 306 |
</form> |
| 307 |
|
| 308 |
</div> |
| 309 |
<div class="clearer"></div> |
| 310 |
</div> |
| 311 |
</div> |
| 312 |
|
| 313 |
<div class="footer-wrapper"> |
| 314 |
<div class="footer" > |
| 315 |
<div class="right" ><i>Release: 1.22.1</i><br /> |
| 316 |
© <a href="../../copyright.html">Copyright</a> 1985-2025, MIT. |
| 317 |
</div> |
| 318 |
<div class="left"> |
| 319 |
|
| 320 |
<a href="../../index.html" title="Full Table of Contents" |
| 321 |
>Contents</a> | |
| 322 |
<a href="kdestroy.html" title="kdestroy" |
| 323 |
>previous</a> | |
| 324 |
<a href="klist.html" title="klist" |
| 325 |
>next</a> | |
| 326 |
<a href="../../genindex.html" title="General Index" |
| 327 |
>index</a> | |
| 328 |
<a href="../../search.html" title="Enter search criteria" |
| 329 |
>Search</a> | |
| 330 |
<a href="mailto:[email protected]?subject=Documentation__kinit">feedback</a> |
| 331 |
</div> |
| 332 |
</div> |
| 333 |
</div> |
| 334 |
|
| 335 |
</body> |
| 336 |
</html> |