xref: /freebsd/crypto/heimdal/kuser/kinit.1 (revision c19800e8cd5640693f36f2040db4ab5e8d738146)
1c19800e8SDoug Rabson.\" Copyright (c) 1998 - 2003, 2006 Kungliga Tekniska H�gskolan
2bbd80c28SJacques Vidrine.\" (Royal Institute of Technology, Stockholm, Sweden).
3bbd80c28SJacques Vidrine.\" All rights reserved.
4bbd80c28SJacques Vidrine.\"
5bbd80c28SJacques Vidrine.\" Redistribution and use in source and binary forms, with or without
6bbd80c28SJacques Vidrine.\" modification, are permitted provided that the following conditions
7bbd80c28SJacques Vidrine.\" are met:
8bbd80c28SJacques Vidrine.\"
9bbd80c28SJacques Vidrine.\" 1. Redistributions of source code must retain the above copyright
10bbd80c28SJacques Vidrine.\"    notice, this list of conditions and the following disclaimer.
11bbd80c28SJacques Vidrine.\"
12bbd80c28SJacques Vidrine.\" 2. Redistributions in binary form must reproduce the above copyright
13bbd80c28SJacques Vidrine.\"    notice, this list of conditions and the following disclaimer in the
14bbd80c28SJacques Vidrine.\"    documentation and/or other materials provided with the distribution.
15bbd80c28SJacques Vidrine.\"
16bbd80c28SJacques Vidrine.\" 3. Neither the name of the Institute nor the names of its contributors
17bbd80c28SJacques Vidrine.\"    may be used to endorse or promote products derived from this software
18bbd80c28SJacques Vidrine.\"    without specific prior written permission.
19bbd80c28SJacques Vidrine.\"
20bbd80c28SJacques Vidrine.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21bbd80c28SJacques Vidrine.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22bbd80c28SJacques Vidrine.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23bbd80c28SJacques Vidrine.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24bbd80c28SJacques Vidrine.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25bbd80c28SJacques Vidrine.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26bbd80c28SJacques Vidrine.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27bbd80c28SJacques Vidrine.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28bbd80c28SJacques Vidrine.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29bbd80c28SJacques Vidrine.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30bbd80c28SJacques Vidrine.\" SUCH DAMAGE.
31bbd80c28SJacques Vidrine.\"
32c19800e8SDoug Rabson.\" $Id: kinit.1 17822 2006-07-10 14:46:58Z lha $
33b528cefcSMark Murray.\"
34c19800e8SDoug Rabson.Dd April 25, 2006
3513e3f4d6SMark Murray.Dt KINIT 1
36b528cefcSMark Murray.Os HEIMDAL
37b528cefcSMark Murray.Sh NAME
384137ff4cSJacques Vidrine.Nm kinit
39b528cefcSMark Murray.Nm kauth
4045524cd7SAssar Westerlund.Nd acquire initial tickets
41b528cefcSMark Murray.Sh SYNOPSIS
4213e3f4d6SMark Murray.Nm kinit
435e9cd1aeSAssar Westerlund.Op Fl 4 | Fl -524init
444137ff4cSJacques Vidrine.Op Fl 9 | Fl -524convert
45b528cefcSMark Murray.Op Fl -afslog
465e9cd1aeSAssar Westerlund.Oo Fl c Ar cachename \*(Ba Xo
47adb0ddaeSAssar Westerlund.Fl -cache= Ns Ar cachename
485e9cd1aeSAssar Westerlund.Xc
49adb0ddaeSAssar Westerlund.Oc
505e9cd1aeSAssar Westerlund.Op Fl f | Fl -forwardable
515e9cd1aeSAssar Westerlund.Oo Fl t Ar keytabname \*(Ba Xo
52adb0ddaeSAssar Westerlund.Fl -keytab= Ns Ar keytabname
535e9cd1aeSAssar Westerlund.Xc
54adb0ddaeSAssar Westerlund.Oc
555e9cd1aeSAssar Westerlund.Oo Fl l Ar time \*(Ba Xo
56adb0ddaeSAssar Westerlund.Fl -lifetime= Ns Ar time
575e9cd1aeSAssar Westerlund.Xc
58adb0ddaeSAssar Westerlund.Oc
595e9cd1aeSAssar Westerlund.Op Fl p | Fl -proxiable
605e9cd1aeSAssar Westerlund.Op Fl R | Fl -renew
61b528cefcSMark Murray.Op Fl -renewable
625e9cd1aeSAssar Westerlund.Oo Fl r Ar time \*(Ba Xo
63adb0ddaeSAssar Westerlund.Fl -renewable-life= Ns Ar time
645e9cd1aeSAssar Westerlund.Xc
65adb0ddaeSAssar Westerlund.Oc
665e9cd1aeSAssar Westerlund.Oo Fl S Ar principal \*(Ba Xo
67adb0ddaeSAssar Westerlund.Fl -server= Ns Ar principal
685e9cd1aeSAssar Westerlund.Xc
69adb0ddaeSAssar Westerlund.Oc
705e9cd1aeSAssar Westerlund.Oo Fl s Ar time \*(Ba Xo
71adb0ddaeSAssar Westerlund.Fl -start-time= Ns Ar time
725e9cd1aeSAssar Westerlund.Xc
73adb0ddaeSAssar Westerlund.Oc
745e9cd1aeSAssar Westerlund.Op Fl k | Fl -use-keytab
755e9cd1aeSAssar Westerlund.Op Fl v | Fl -validate
764137ff4cSJacques Vidrine.Oo Fl e Ar enctypes \*(Ba Xo
774137ff4cSJacques Vidrine.Fl -enctypes= Ns Ar enctypes
785e9cd1aeSAssar Westerlund.Xc
79adb0ddaeSAssar Westerlund.Oc
808373020dSJacques Vidrine.Oo Fl a Ar addresses \*(Ba Xo
818373020dSJacques Vidrine.Fl -extra-addresses= Ns Ar addresses
828373020dSJacques Vidrine.Xc
838373020dSJacques Vidrine.Oc
84c19800e8SDoug Rabson.Op Fl -password-file= Ns Ar filename
85c19800e8SDoug Rabson.Op Fl -fcache-version= Ns Ar version-number
86c19800e8SDoug Rabson.Op Fl A | Fl -no-addresses
875e9cd1aeSAssar Westerlund.Op Fl -anonymous
88b528cefcSMark Murray.Op Fl -version
89b528cefcSMark Murray.Op Fl -help
90adb0ddaeSAssar Westerlund.Op Ar principal Op Ar command
91b528cefcSMark Murray.Sh DESCRIPTION
92b528cefcSMark Murray.Nm
93bbd80c28SJacques Vidrineis used to authenticate to the Kerberos server as
94b528cefcSMark Murray.Ar principal ,
955e9cd1aeSAssar Westerlundor if none is given, a system generated default (typically your login
965e9cd1aeSAssar Westerlundname at the default realm), and acquire a ticket granting ticket that
975e9cd1aeSAssar Westerlundcan later be used to obtain tickets for other services.
985e9cd1aeSAssar Westerlund.Pp
994137ff4cSJacques VidrineIf you have compiled
1004137ff4cSJacques Vidrine.Nm kinit
1014137ff4cSJacques Vidrinewith Kerberos 4 support and you have a
1025e9cd1aeSAssar WesterlundKerberos 4 server,
1035e9cd1aeSAssar Westerlund.Nm
1045e9cd1aeSAssar Westerlundwill detect this and get you Kerberos 4 tickets.
1055e9cd1aeSAssar Westerlund.Pp
106b528cefcSMark MurraySupported options:
107b528cefcSMark Murray.Bl -tag -width Ds
108b528cefcSMark Murray.It Xo
109b528cefcSMark Murray.Fl c Ar cachename
110b528cefcSMark Murray.Fl -cache= Ns Ar cachename
111b528cefcSMark Murray.Xc
112b528cefcSMark MurrayThe credentials cache to put the acquired ticket in, if other than
113b528cefcSMark Murraydefault.
114b528cefcSMark Murray.It Xo
1158373020dSJacques Vidrine.Fl f ,
116b528cefcSMark Murray.Fl -forwardable
117b528cefcSMark Murray.Xc
118b528cefcSMark MurrayGet ticket that can be forwarded to another host.
119b528cefcSMark Murray.It Xo
1208373020dSJacques Vidrine.Fl t Ar keytabname ,
121b528cefcSMark Murray.Fl -keytab= Ns Ar keytabname
122b528cefcSMark Murray.Xc
123b528cefcSMark MurrayDon't ask for a password, but instead get the key from the specified
124b528cefcSMark Murraykeytab.
125b528cefcSMark Murray.It Xo
126bbd80c28SJacques Vidrine.Fl l Ar time ,
1275e9cd1aeSAssar Westerlund.Fl -lifetime= Ns Ar time
128b528cefcSMark Murray.Xc
129c19800e8SDoug RabsonSpecifies the lifetime of the ticket.
130c19800e8SDoug RabsonThe argument can either be in seconds, or a more human readable string
131c19800e8SDoug Rabsonlike
1325e9cd1aeSAssar Westerlund.Sq 1h .
133b528cefcSMark Murray.It Xo
1348373020dSJacques Vidrine.Fl p ,
135b528cefcSMark Murray.Fl -proxiable
136b528cefcSMark Murray.Xc
137b528cefcSMark MurrayRequest tickets with the proxiable flag set.
138b528cefcSMark Murray.It Xo
1398373020dSJacques Vidrine.Fl R ,
140b528cefcSMark Murray.Fl -renew
141b528cefcSMark Murray.Xc
142c19800e8SDoug RabsonTry to renew ticket.
143c19800e8SDoug RabsonThe ticket must have the
144b528cefcSMark Murray.Sq renewable
145b528cefcSMark Murrayflag set, and must not be expired.
146b528cefcSMark Murray.It Fl -renewable
147b528cefcSMark MurrayThe same as
148b528cefcSMark Murray.Fl -renewable-life ,
149b528cefcSMark Murraywith an infinite time.
150b528cefcSMark Murray.It Xo
1518373020dSJacques Vidrine.Fl r Ar time ,
1525e9cd1aeSAssar Westerlund.Fl -renewable-life= Ns Ar time
153b528cefcSMark Murray.Xc
154b528cefcSMark MurrayThe max renewable ticket life.
155b528cefcSMark Murray.It Xo
1568373020dSJacques Vidrine.Fl S Ar principal ,
157b528cefcSMark Murray.Fl -server= Ns Ar principal
158b528cefcSMark Murray.Xc
159b528cefcSMark MurrayGet a ticket for a service other than krbtgt/LOCAL.REALM.
160b528cefcSMark Murray.It Xo
1618373020dSJacques Vidrine.Fl s Ar time ,
1625e9cd1aeSAssar Westerlund.Fl -start-time= Ns Ar time
163b528cefcSMark Murray.Xc
1645e9cd1aeSAssar WesterlundObtain a ticket that starts to be valid
1655e9cd1aeSAssar Westerlund.Ar time
1665e9cd1aeSAssar Westerlund(which can really be a generic time specification, like
1675e9cd1aeSAssar Westerlund.Sq 1h )
1685e9cd1aeSAssar Westerlundseconds into the future.
169b528cefcSMark Murray.It Xo
1708373020dSJacques Vidrine.Fl k ,
171b528cefcSMark Murray.Fl -use-keytab
172b528cefcSMark Murray.Xc
173b528cefcSMark MurrayThe same as
174b528cefcSMark Murray.Fl -keytab ,
175b528cefcSMark Murraybut with the default keytab name (normally
176b528cefcSMark Murray.Ar FILE:/etc/krb5.keytab ) .
177b528cefcSMark Murray.It Xo
1788373020dSJacques Vidrine.Fl v ,
179b528cefcSMark Murray.Fl -validate
180b528cefcSMark Murray.Xc
181b528cefcSMark MurrayTry to validate an invalid ticket.
182b528cefcSMark Murray.It Xo
183b528cefcSMark Murray.Fl e ,
184b528cefcSMark Murray.Fl -enctypes= Ns Ar enctypes
185b528cefcSMark Murray.Xc
186b528cefcSMark MurrayRequest tickets with this particular enctype.
187b528cefcSMark Murray.It Xo
188c19800e8SDoug Rabson.Fl -password-file= Ns Ar filename
189c19800e8SDoug Rabson.Xc
190c19800e8SDoug Rabsonread the password from the first line of
191c19800e8SDoug Rabson.Ar filename .
192c19800e8SDoug RabsonIf the
193c19800e8SDoug Rabson.Ar filename
194c19800e8SDoug Rabsonis
195c19800e8SDoug Rabson.Ar STDIN ,
196c19800e8SDoug Rabsonthe password will be read from the standard input.
197c19800e8SDoug Rabson.It Xo
198c19800e8SDoug Rabson.Fl -fcache-version= Ns Ar version-number
199b528cefcSMark Murray.Xc
200b528cefcSMark MurrayCreate a credentials cache of version
201c19800e8SDoug Rabson.Ar version-number .
202b528cefcSMark Murray.It Xo
2038373020dSJacques Vidrine.Fl a ,
2048373020dSJacques Vidrine.Fl -extra-addresses= Ns Ar enctypes
2058373020dSJacques Vidrine.Xc
2068373020dSJacques VidrineAdds a set of addresses that will, in addition to the systems local
207c19800e8SDoug Rabsonaddresses, be put in the ticket.
208c19800e8SDoug RabsonThis can be useful if all addresses a client can use can't be
209c19800e8SDoug Rabsonautomatically figured out.
210c19800e8SDoug RabsonOne such example is if the client is behind a firewall.
211c19800e8SDoug RabsonAlso settable via
2128373020dSJacques Vidrine.Li libdefaults/extra_addresses
2138373020dSJacques Vidrinein
2148373020dSJacques Vidrine.Xr krb5.conf 5 .
2158373020dSJacques Vidrine.It Xo
216c19800e8SDoug Rabson.Fl A ,
21713e3f4d6SMark Murray.Fl -no-addresses
218b528cefcSMark Murray.Xc
219b528cefcSMark MurrayRequest a ticket with no addresses.
2205e9cd1aeSAssar Westerlund.It Xo
2215e9cd1aeSAssar Westerlund.Fl -anonymous
2225e9cd1aeSAssar Westerlund.Xc
2235e9cd1aeSAssar WesterlundRequest an anonymous ticket (which means that the ticket will be
2245e9cd1aeSAssar Westerlundissued to an anonymous principal, typically
2255e9cd1aeSAssar Westerlund.Dq anonymous@REALM ) .
226b528cefcSMark Murray.El
2275e9cd1aeSAssar Westerlund.Pp
228b528cefcSMark MurrayThe following options are only available if
229b528cefcSMark Murray.Nm
2304137ff4cSJacques Vidrinehas been compiled with support for Kerberos 4.
231b528cefcSMark Murray.Bl -tag -width Ds
232b528cefcSMark Murray.It Xo
2338373020dSJacques Vidrine.Fl 4 ,
234b528cefcSMark Murray.Fl -524init
235b528cefcSMark Murray.Xc
2364137ff4cSJacques VidrineTry to convert the obtained Kerberos 5 krbtgt to a version 4
237c19800e8SDoug Rabsoncompatible ticket.
238c19800e8SDoug RabsonIt will store this ticket in the default Kerberos 4 ticket file.
2394137ff4cSJacques Vidrine.It Xo
2408373020dSJacques Vidrine.Fl 9 ,
2414137ff4cSJacques Vidrine.Fl -524convert
2424137ff4cSJacques Vidrine.Xc
2434137ff4cSJacques Vidrineonly convert ticket to version 4
244b528cefcSMark Murray.It Fl -afslog
245b528cefcSMark MurrayGets AFS tickets, converts them to version 4 format, and stores them
246c19800e8SDoug Rabsonin the kernel.
247c19800e8SDoug RabsonOnly useful if you have AFS.
248b528cefcSMark Murray.El
2495e9cd1aeSAssar Westerlund.Pp
2505e9cd1aeSAssar WesterlundThe
2515e9cd1aeSAssar Westerlund.Ar forwardable ,
2525e9cd1aeSAssar Westerlund.Ar proxiable ,
2535e9cd1aeSAssar Westerlund.Ar ticket_life ,
2545e9cd1aeSAssar Westerlundand
2555e9cd1aeSAssar Westerlund.Ar renewable_life
2565e9cd1aeSAssar Westerlundoptions can be set to a default value from the
2575e9cd1aeSAssar Westerlund.Dv appdefaults
2585e9cd1aeSAssar Westerlundsection in krb5.conf, see
2595e9cd1aeSAssar Westerlund.Xr krb5_appdefault 3 .
260adb0ddaeSAssar Westerlund.Pp
261adb0ddaeSAssar WesterlundIf  a
262adb0ddaeSAssar Westerlund.Ar command
263adb0ddaeSAssar Westerlundis given,
264adb0ddaeSAssar Westerlund.Nm kinit
265adb0ddaeSAssar Westerlundwill set up new credentials caches, and AFS PAG, and then run the given
266c19800e8SDoug Rabsoncommand.
267c19800e8SDoug RabsonWhen it finishes the credentials will be removed.
268b528cefcSMark Murray.Sh ENVIRONMENT
269b528cefcSMark Murray.Bl -tag -width Ds
270b528cefcSMark Murray.It Ev KRB5CCNAME
2714137ff4cSJacques VidrineSpecifies the default credentials cache.
272b528cefcSMark Murray.It Ev KRB5_CONFIG
2734137ff4cSJacques VidrineThe file name of
274c19800e8SDoug Rabson.Pa krb5.conf ,
275c19800e8SDoug Rabsonthe default being
2764137ff4cSJacques Vidrine.Pa /etc/krb5.conf .
277b528cefcSMark Murray.It Ev KRBTKFILE
278b528cefcSMark MurraySpecifies the Kerberos 4 ticket file to store version 4 tickets in.
279b528cefcSMark Murray.El
280b528cefcSMark Murray.\".Sh FILES
281b528cefcSMark Murray.\".Sh EXAMPLES
282b528cefcSMark Murray.\".Sh DIAGNOSTICS
283b528cefcSMark Murray.Sh SEE ALSO
2845e9cd1aeSAssar Westerlund.Xr kdestroy 1 ,
285b528cefcSMark Murray.Xr klist 1 ,
2864137ff4cSJacques Vidrine.Xr krb5_appdefault 3 ,
2874137ff4cSJacques Vidrine.Xr krb5.conf 5
288b528cefcSMark Murray.\".Sh STANDARDS
289b528cefcSMark Murray.\".Sh HISTORY
290b528cefcSMark Murray.\".Sh AUTHORS
291b528cefcSMark Murray.\".Sh BUGS
292