2 .\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
3 .\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH KINIT 1 "Nov 12, 2008"
9 kinit \- obtain and cache Kerberos ticket-granting ticket
13 \fB/usr/bin/kinit\fR [\fB-ARvV\fR] [\fB-p\fR | \fB-P\fR] [\fB-f\fR | \fB-F\fR] [\fB-a\fR] [\fB-c\fR \fIcache_name\fR]
14 [\fB-k\fR [\fB-t\fR \fIkeytab_file\fR]] [\fB-l\fR \fIlifetime\fR]
15 [\fB-r\fR \fIrenewable_life\fR] [\fB-s\fR \fIstart_time\fR] [\fB-S\fR \fIservice_name\fR]
22 The \fBkinit\fR command is used to obtain and cache an initial ticket-granting
23 ticket (credential) for \fIprincipal\fR. This ticket is used for authentication
24 by the Kerberos system. Only users with Kerberos principals can use the
25 Kerberos system. For information about Kerberos principals, see
29 When you use \fBkinit\fR without options, the utility prompts for your
30 \fIprincipal\fR and Kerberos password, and tries to authenticate your login
31 with the local Kerberos server. The \fIprincipal\fR can be specified on the
32 command line if desired.
35 If Kerberos authenticates the login attempt, \fBkinit\fR retrieves your initial
36 ticket-granting ticket and puts it in the ticket cache. By default your ticket
37 is stored in the file \fB/tmp/krb5cc_\fIuid\fR\fR, where \fIuid\fR specifies
38 your user identification number. Tickets expire after a specified lifetime,
39 after which \fBkinit\fR must be run again. Any existing contents of the cache
40 are destroyed by \fBkinit\fR.
43 Values specified in the command line override the values specified in the
44 Kerberos configuration file for \fIlifetime\fR and \fIrenewable_life\fR.
47 The \fBkdestroy\fR(1) command can be used to destroy any active tickets before
48 you end your login session.
52 The following options are supported:
59 Requests tickets with the local addresses.
68 Requests address-less tickets.
74 \fB\fB-c\fR \fIcache_name\fR\fR
77 Uses \fIcache_name\fR as the credentials (ticket) cache name and location. If
78 this option is not used, the default cache name and location are used.
87 Requests forwardable tickets.
96 Not forwardable. Does not request forwardable tickets.
98 Tickets that have been acquired on one host cannot normally be used on another
99 host. A client can request that the ticket be marked forwardable. Once the
100 \fBTKT_FLG_FORWARDABLE\fR flag is set on a ticket, the user can use this ticket
101 to request a new ticket, but with a different \fBIP\fR address. Thus, users can
102 use their current credentials to get credentials valid on another machine. This
103 option allows a user to explicitly obtain a non-forwardable ticket.
109 \fB\fB-k\fR [\fB-t\fR \fIkeytab_file\fR]\fR
112 Requests a host ticket, obtained from a key in the local host's \fIkeytab\fR
113 file. The name and location of the keytab file can be specified with the
114 \fB-t\fR \fIkeytab_file\fR option. Otherwise, the default name and location is
121 \fB\fB-l\fR \fIlifetime\fR\fR
124 Requests a ticket with the lifetime \fIlifetime\fR. If the \fB-l\fR option is
125 not specified, the default ticket lifetime (configured by each site) is used.
126 Specifying a ticket lifetime longer than the maximum ticket lifetime
127 (configured by each site) results in a ticket with the maximum lifetime. See
128 the \fBTime\fR \fBFormats\fR section for the valid time duration formats that
129 you can specify for \fIlifetime\fR. See \fBkdc.conf\fR(4) and \fBkadmin\fR(1M)
130 (for \fBgetprinc\fR command to verify the lifetime values for the server
133 The lifetime of the tickets returned is the minimum of the following:
138 Value specified in the command line.
144 Value specified in the \fBKDC\fR configuration file.
150 Value specified in the Kerberos data base for the server principal. In the case
151 of \fBkinit\fR, it is \fBkrbtgt/\fIrealm name\fR\fR.
157 Value specified in the Kerberos database for the user principal.
167 Requests proxiable tickets.
176 Not proxiable. Does not request proxiable tickets.
178 A proxiable ticket is a ticket that allows you to get a ticket for a service
179 with \fBIP\fR addresses other than the ones in the Ticket Granting Ticket. This
180 option allows a user to explicitly obtain a non-proxiable ticket.
186 \fB\fB-r\fR \fIrenewable_life\fR\fR
189 Requests renewable tickets, with a total lifetime of \fIrenewable_life\fR. See
190 the \fBTime\fR \fBFormats\fR section for the valid time duration formats that
191 you can specify for \fIrenewable_life\fR. See \fBkdc.conf\fR(4) and
192 \fBkadmin\fR(1M) (for \fBgetprinc\fR command to verify the lifetime values for
193 the server principal).
195 The renewable lifetime of the tickets returned is the minimum of the following:
200 Value specified in the command line.
206 Value specified in the \fBKDC\fR configuration file.
212 Value specified in the Kerberos data base for the server principal. In the case
213 of \fBkinit\fR, it is \fBkrbtgt/\fIrealm name\fR\fR.
219 Value specified in the Kerberos database for the user principal.
229 Requests renewal of the ticket-granting ticket. Notice that an expired ticket
230 cannot be renewed, even if the ticket is still within its renewable life.
236 \fB\fB-s\fR \fIstart_time\fR\fR
239 Requests a postdated ticket, valid starting at \fIstart_time\fR. Postdated
240 tickets are issued with the \fIinvalid\fR flag set, and need to be fed back to
241 the \fBKDC\fR before use. See the \fBTime\fR \fBFormats\fR section for either
242 the valid absolute time or time duration formats that you can specify for
243 \fIstart_time\fR. \fBkinit\fR attempts to match an absolute time first before
244 trying to match a time duration.
250 \fB\fB-S\fR \fIservice_name\fR\fR
253 Specifies an alternate service name to use when getting initial tickets.
262 Requests that the ticket granting ticket in the cache (with the \fIinvalid\fR
263 flag set) be passed to the \fBKDC\fR for validation. If the ticket is within
264 its requested time range, the cache is replaced with the validated ticket.
273 Verbose output. Displays further information to the user, such as confirmation
274 of authentication and version.
280 \fB\fB-X\fR \fB\fIattribute\fR[=\fIvalue\fR]\fR\fR
283 Specifies a pre-authentication attribute and value to be passed to
284 pre-authentication plugins. The acceptable \fIattribute\fR and \fIvalue\fR
285 values vary from pre-authentication plugin to plugin. This option can be
286 specified multiple times to specify multiple attributes. If no value is
287 specified, it is assumed to be \fByes\fR.
289 The following attributes are recognized by the OpenSSL \fBpkinit\fR
290 pre-authentication mechanism:
294 \fB\fBX509_user_identity=URI\fR\fR
297 Specifies where to find user's X509 identity information.
299 Valid URI types are \fBFILE\fR, \fBDIR\fR, \fBPKCS11\fR, \fBPKCS12\fR, and
300 \fBENV\fR. See the \fBPKINIT URI Types\fR section for details.
306 \fB\fBX509_anchors=URI\fR\fR
309 Specifies where to find trusted X509 anchor information.
311 Valid URI types are \fBFILE\fR and \fBDIR\fR. See the\fBPKINIT URI Types\fR
318 \fB\fBflag_RSA_PROTOCOL[=yes]\fR\fR
321 Specifies the use of RSA, rather than the default Diffie-Hellman protoco.
326 .SS "PKINIT URI Types"
330 \fBFILE:\fIfile-name\fR[,\fIkey-file-name\fR]\fR
334 This option has context-specific behavior.
338 \fBX509_user_identity\fR
341 \fIfile-name\fR specifies the name of a PEM-format file containing the user's
342 certificate. If \fIkey-file-name\fR is not specified, the user's private key is
343 expected to be in \fIfile-name\fR as well. Otherwise, \fIkey-file-name\fR is
344 the name of the file containing the private key.
353 \fIfile-name\fR is assumed to be the name of an OpenSSL-style ca-bundle file.
354 The \fBca-bundle\fR file should be base-64 encoded.
362 \fBDIR:\fIdirectory-name\fR\fR
366 This option has context-specific behavior.
370 \fBX509_user_identity\fR
373 \fIdirectory-name\fR specifies a directory with files named \fB*.crt\fR and
374 \fB*.key\fR, where the first part of the file name is the same for matching
375 pairs of certificate and private key files. When a file with a name ending with
376 \fB\&.crt\fR is found, a matching file ending with \fB\&.key\fR is assumed to
377 contain the private key. If no such file is found, then the certificate in the
378 \fB\&.crt\fR is not used.
387 \fIdirectory-name\fR is assumed to be an OpenSSL-style hashed CA directory
388 where each CA cert is stored in a file named \fBhash-of-ca-cert.\fR\fI#\fR.
389 This infrastructure is encouraged, but all files in the directory are examined
390 and if they contain certificates (in PEM format), and are used.
398 \fBPKCS12:\fIpkcs12-file-name\fR\fR
402 \fIpkcs12-file-nam\fRe is the name of a \fBPKCS #12\fR format file, containing
403 the user's certificate and private key.
409 \fBPKCS11:[slotid=\fIslot-id\fR][:token=\fItoken-label\fR][:certid=\fIcert-id\fR][:certlabel=\fIcert-label\fR]\fR
413 All keyword and values are optional. PKCS11 modules (for example,
414 \fBopensc-pkcs11.so\fR) must be installed as a crypto provider
415 under\fBlibpkcs11\fR(3LIB). \fBslotid=\fR and/or \fBtoken=\fR can be specified
416 to force the use of a particular smard card reader or token if there is more
417 than one available. \fBcertid=\fR and/or \fBcertlabel=\fR can be specified to
418 force the selection of a particular certificate on the device. See the
419 \fBpkinit_cert_match\fR configuration option for more ways to select a
420 particular certificate to use for \fBpkinit\fR.
426 \fBENV:\fIenvironment-variable-name\fR\fR
430 \fIenvironment-variable-name\fR specifies the name of an environment variable
431 which has been set to a value conforming to one of the previous values. For
432 example, \fBENV:X509_PROXY\fR, where environment variable \fBX509_PROXY\fR has
433 been set to \fBFILE:/tmp/my_proxy.pem\fR.
439 The following absolute time formats can be used for the \fB-s\fR
440 \fIstart_time\fR option. The examples are based on the date and time of July 2,
449 Absolute Time Format Example
450 \fIyymmddhhmm\fR[\fIss\fR] 990702133530
451 \fIhhmm\fR[\fIss\fR] 133530
452 \fIyy\fR.\fImm\fR.\fBdd\fR.\fIhh\fR.\fImm\fR.\fIss\fR 99:07:02:13:35:30
453 \fIhh\fR:\fImm\fR[:\fIss\fR] 13:35:30
454 \fIldate\fR:\fIltime\fR 07-07-99:13:35:30
455 \fBdd\fR-\fImonth\fR-\fIyyyy\fR:\fIhh\fR:\fImm\fR[:\fIss\fR] 02-july-1999:13:35:30
466 \fIhh\fR hour (24-hour clock)
470 year within century (0-68 is 2000 to 2068; 69-99 is 1969 to 1999)
472 \fIyyyy\fR year including century
473 \fImonth\fR locale's full or abbreviated month name
474 \fIldate\fR locale's appropriate date representation
475 \fIltime\fR locale's appropriate time representation
480 The following time duration formats can be used for the \fB-l\fR
481 \fIlifetime\fR, \fB-r\fR \fIrenewable_life\fR, and \fB-s\fR \fIstart_time\fR
482 options. The examples are based on the time duration of 14 days, 7 hours, 5
483 minutes, and 30 seconds.
491 Time Duration Format Example
496 \fI#\fRd\fI#\fRh\fI#\fRm\fI#\fRs 14d7h5m30s
497 \fI#\fRh\fI#\fRm[\fI#\fRs] 7h5m30s
498 \fIdays\fR-\fIhh\fR:\fImm\fR:\fIss\fR 14-07:05:30
499 \fIhours\fR:\fImm\fR[:\fIss\fR] 7:05:30
508 Delimiter Description
523 \fIdays\fR number of days
524 \fIhours\fR number of hours
525 \fIhh\fR hour (24-hour clock)
530 .SH ENVIRONMENT VARIABLES
533 \fBkinit\fR uses the following environment variable:
537 \fB\fBKRB5CCNAME\fR\fR
540 Location of the credentials (ticket) cache. See \fBkrb5envvar\fR(5) for syntax
548 \fB\fB/tmp/krb5cc_\fIuid\fR\fR\fR
551 Default credentials cache (\fIuid\fR is the decimal \fBUID\fR of the user).
557 \fB\fB/etc/krb5/krb5.keytab\fR\fR
560 Default location for the local host's \fBkeytab\fR file.
566 \fB\fB/etc/krb5/krb5.conf\fR\fR
569 Default location for the local host's configuration file. See
576 See \fBattributes\fR(5) for descriptions of the following attributes:
584 ATTRIBUTE TYPE ATTRIBUTE VALUE
586 Interface Stability See below.
591 The command arguments are Evolving. The command output is Unstable.
595 \fBkdestroy\fR(1), \fBklist\fR(1), \fBkadmin\fR(1M), \fBktkt_warnd\fR(1M),
596 \fBlibpkcs11\fR(3LIB), \fBkdc.conf\fR(4), \fBkrb5.conf\fR(4),
597 \fBattributes\fR(5), \fBkerberos\fR(5), \fBkrb5envvar\fR(5), \fBpam_krb5\fR(5)
601 On success, \fBkinit\fR notifies \fBktkt_warnd\fR(1M) to alert the user when
602 the initial credentials (ticket-granting ticket) are about to expire.