Updated env variable sections, formating and other corrections
[krb5.git] / doc / admin.texinfo
1 \input texinfo-suppl.tex        % contains @doubleleftarrow{} definition
2                                 % this line must come *before* \input texinfo
3 \input texinfo @c -*-texinfo-*-
4 @c %**start of header
5 @c guide
6 @setfilename krb5-admin.info
7 @settitle Kerberos V5 System Administrator's Guide
8 @setchapternewpage odd                  @c chapter begins on next odd page
9 @c @setchapternewpage on                   @c chapter begins on next page
10 @c @smallbook                              @c Format for 7" X 9.25" paper
11 @documentencoding UTF-8
12 @c %**end of header
13 @copying
14 Copyright @copyright{} 1985-2010 by the Massachusetts Institute of Technology.
15 @end copying
16
17 @paragraphindent 0
18 @iftex
19 @parskip 6pt plus 6pt
20 @end iftex
21
22 @dircategory Kerberos
23 @direntry
24 * krb5-admin: (krb5-admin).             Kerberos V5 Administrator's Guide
25 @end direntry
26
27 @include definitions.texinfo
28 @set EDITION 1.0
29 @set UPDATED June 14, 2007
30
31 @finalout                               @c don't print black warning boxes
32
33 @titlepage
34 @title @value{PRODUCT} System Administrator's Guide
35 @subtitle Release:  @value{RELEASE}
36 @subtitle Document Edition:  @value{EDITION}
37 @subtitle Last updated:  @value{UPDATED}
38 @author @value{COMPANY}
39
40 @page
41 @vskip 0pt plus 1filll
42 @insertcopying
43 @end titlepage
44
45 @comment  node-name,  next,  previous,  up
46 @node Top, Introduction, (dir), (dir)
47
48 @ifinfo
49 This document describes how to administrate a @value{PRODUCT}
50 installation.
51
52 @insertcopying
53 @end ifinfo
54
55 @c The master menu is updated using emacs19's M-x texinfo-all-menus-update
56 @c function.  Don't forget to run M-x texinfo-every-node-update after
57 @c you add a new section or subsection, or after you've rearranged the
58 @c order of sections or subsections.  Also, don't forget to add an @node
59 @c comand before each @section or @subsection!  All you need to enter
60 @c is:
61 @c
62 @c @node New Section Name
63 @c @section New Section Name
64 @c
65 @c M-x texinfo-every-node-update will take care of calculating the
66 @c node's forward and back pointers.
67 @c
68 @c ---------------------------------------------------------------------
69
70 @menu
71 * Introduction::                
72 * How Kerberos Works::          
73 * Configuration Files::         
74 * Using DNS::                   
75 * Administrating the Kerberos Database::  
76 * Configuring Kerberos with OpenLDAP back-end::  
77 * Application Servers::         
78 * Backups of Secure Hosts::     
79 * Bug Reporting::               
80 * Appendix::                    
81 * Copyright::                   
82 @end menu
83
84 @node Introduction, How Kerberos Works, Top, Top
85 @chapter Introduction
86
87 @menu
88 * Why Should I use Kerberos?::  
89 * Documentation for Kerberos V5::  
90 * Overview of This Guide::      
91 @end menu
92
93 @node Why Should I use Kerberos?, Documentation for Kerberos V5, Introduction, Introduction
94 @section Why Should I use Kerberos?
95
96 Since Kerberos negotiates authenticated, and optionally encrypted,
97 communications between two points anywhere on the internet, it provides
98 a layer of security that is not dependent on which side of a firewall
99 either client is on.  Since studies have shown that half of the computer
100 security breaches in industry happen from @i{inside} firewalls,
101 @value{PRODUCT} from @value{COMPANY} will play a vital role in the
102 security of your network.
103
104 @node Documentation for Kerberos V5, Overview of This Guide, Why Should I use Kerberos?, Introduction
105 @section Documentation for @value{PRODUCT}
106
107 @include document-list.texinfo
108
109 @node Overview of This Guide,  , Documentation for Kerberos V5, Introduction
110 @section Overview of This Guide
111
112 The next chapter describes how Kerberos works.
113
114 Chapter three describes administration of the principals in the Kerberos
115 database.
116
117 Chapter four describes how you can use DNS in configuring your Kerberos realm.
118
119 Chapter five describes administrative programs for manipulating the
120 Kerberos database as a whole.
121
122 Chapter six describes OpenLDAP Configuration steps.
123
124 Chapter seven describes issues to consider when adding an application
125 server to the database.
126
127 Chapter eight describes our problem reporting system.
128
129 The appendices include the list of Kerberos error messages, and a
130 complete list of the time zones understood by @code{kadmin}.
131
132 @node How Kerberos Works, Configuration Files, Introduction, Top
133 @chapter How Kerberos Works
134
135 This section provides a simplified description of a general user's
136 interaction with the Kerberos system.  This interaction happens
137 transparently---users don't need to know and probably don't care about
138 what's going on---but Kerberos administrators might find a schematic
139 description of the process useful.  This description glosses over a lot
140 of details; for more information, see @i{Kerberos: An Authentication
141 Service for Open Network Systems}, a paper presented at Winter USENIX
142 1988, in Dallas, Texas.  This paper can be retreived by FTP from
143 @code{athena-dist.mit.edu}, in the location:
144 @code{/pub/ATHENA/kerberos/doc/usenix.PS}.
145
146 @menu
147 * Network Services and Their Client Programs::  
148 * Kerberos Tickets::            
149 * The Kerberos Database::       
150 * Kerberos Realms::             
151 * The Ticket-Granting Ticket::  
152 * Network Services and the Master Database::  
153 * The User/Kerberos Interaction::  
154 * Definitions::                 
155 @end menu
156
157 @node Network Services and Their Client Programs, Kerberos Tickets, How Kerberos Works, How Kerberos Works
158 @section Network Services and Their Client Programs
159
160 In an environment that provides network services, you use @dfn{client}
161 programs to request @dfn{services} from @dfn{server} programs that are
162 somewhere on the network.  Suppose you have logged in to a workstation
163 and you want to @samp{rlogin} to a typical UNIX host.  You use the local
164 @samp{rlogin} client program to contact the remote machine's
165 @samp{rlogind} daemon.
166
167 @node Kerberos Tickets, The Kerberos Database, Network Services and Their Client Programs, How Kerberos Works
168 @section Kerberos Tickets
169
170 Under Kerberos, the @samp{klogind} daemon allows you to login to a
171 remote machine if you can provide @samp{klogind} a Kerberos ticket
172 which proves your identity.  In addition to the ticket, you must also
173 have possession of the corresponding ticket session key. The
174 combination of a ticket and the ticket's session key is known as a credential.
175
176 Typically, a client program automatically obtains credentials
177 identifying the person using the client program.  The credentials are
178 obtained from a Kerberos server that resides somewhere on the network.
179 A Kerberos server maintains a database of user, server, and password
180 information.
181
182 @node The Kerberos Database, Kerberos Realms, Kerberos Tickets, How Kerberos Works
183 @section The Kerberos Database
184
185 Kerberos will give you credentials only if you have an entry in the
186 Kerberos server's @dfn{Kerberos database}.  Your database entry includes
187 your Kerberos @dfn{principal} (an identifying string, which is often
188 just your username), and your Kerberos password.  Every Kerberos user
189 must have an entry in this database.
190
191 @node Kerberos Realms, The Ticket-Granting Ticket, The Kerberos Database, How Kerberos Works
192 @section Kerberos Realms
193
194 Each administrative domain will have its own Kerberos database, which
195 contains information about the users and services for that particular
196 site or administrative domain.  This administrative domain is the
197 @dfn{Kerberos realm}.
198
199 Each Kerberos realm will have at least one Kerberos server, where the
200 master Kerberos database for that site or administrative domain is
201 stored.  A Kerberos realm may also have one or more @dfn{slave servers},
202 which have read-only copies of the Kerberos database that are
203 periodically propagated from the master server.  For more details on how
204 this is done, see the ``Set Up the Slave KDCs for Database Propagation''
205 and ``Propagate the Database to Each Slave KDC'' sections of the
206 @value{PRODUCT} Installation Guide.
207
208 @node The Ticket-Granting Ticket, Network Services and the Master Database, Kerberos Realms, How Kerberos Works
209 @section The Ticket-Granting Ticket
210
211 The @samp{kinit} command prompts for your password.  If you enter it
212 successfully, you will obtain a @dfn{ticket-granting ticket} and a
213 @dfn{ticket session key} which gives you the right to use the ticket.
214 This combination of the ticket and its associated key is known as your
215 @dfn{credentials}.  As illustrated below, client programs use your
216 ticket-granting ticket credentials in order to obtain client-specific
217 credentials as needed.
218
219 Your credentials are stored in a @dfn{credentials cache}, which is often
220 just a file in @code{/tmp}.  The credentials cache is also called the
221 @dfn{ticket file}, especially in Kerberos V4 documentation.  Note,
222 however, that a credentials cache does not have to be stored in a file.
223
224 @node Network Services and the Master Database, The User/Kerberos Interaction, The Ticket-Granting Ticket, How Kerberos Works
225 @section Network Services and the Master Database
226
227 The master database also contains entries for all network services that
228 require Kerberos authentication.  Suppose that your site has a machine,
229 @samp{laughter.@value{PRIMARYDOMAIN}}, that requires Kerberos
230 authentication from anyone who wants to @samp{rlogin} to it.  The host's
231 Kerberos realm is @samp{@value{PRIMARYREALM}}.
232
233 This service must be registered in the Kerberos database, using the
234 proper service name, which in this case is the @dfn{principal}:
235
236 @smallexample
237 host/laughter.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}
238 @end smallexample
239
240 @noindent
241 The @samp{/} character separates the Kerberos @dfn{primary} (in this
242 case, @samp{host}) from the @dfn{instance} (in this case,
243 @samp{laughter.@value{PRIMARYDOMAIN}}); the @samp{@@} character separates
244 the realm name (in this case, @samp{@value{PRIMARYREALM}}) from the rest
245 of the principal.  The primary, @samp{host}, denotes the name or type of
246 the service that is being offered:  generic host-level access to the
247 machine.  The instance, @samp{laughter.@value{PRIMARYDOMAIN}}, names the
248 specific machine that is offering this service.  There will generally be
249 many different machines, each offering one particular type of service,
250 and the instance serves to give each one of these servers a different
251 Kerberos principal.
252
253 @menu
254 * The Keytab File::             
255 @end menu
256
257 @node The Keytab File,  , Network Services and the Master Database, Network Services and the Master Database
258 @subsection The Keytab File
259
260 For each service, there must also be a @dfn{service key} known only by
261 Kerberos and the service.  On the Kerberos server, the service key is
262 stored in the Kerberos database.
263
264 On the server host, these service keys are stored in @dfn{key tables},
265 which are files known as @dfn{keytabs}.@footnote{Keytabs were called
266 @dfn{srvtabs} in Kerberos V4.}  For example, the service keys used by
267 services that run as root are usually stored in the keytab file
268 @code{/etc/krb5.keytab}.  @b{N.B.:} This service key is the equivalent
269 of the service's password, and must be kept secure.  Data which is meant
270 to be read only by the service is encrypted using this key.
271
272 @node The User/Kerberos Interaction, Definitions, Network Services and the Master Database, How Kerberos Works
273 @section The User/Kerberos Interaction
274
275 Suppose that you walk up to a host intending to login to it, and then
276 @samp{rlogin} to the machine @samp{laughter}.  Here's what happens:
277
278 @enumerate
279 @item
280 You login to the workstation and use the @samp{kinit} command to get a
281 ticket-granting ticket.  This command prompts you for your Kerberos
282 password.  (On systems running the @value{PRODUCT} @samp{login} program,
283 this may be done as part of the login process, not requiring the user to
284 run a separate program.)
285
286 @enumerate A
287 @item
288 The @samp{kinit} command sends your request to the Kerberos master
289 server machine.  The server software looks for your principal name's
290 entry in the Kerberos database.
291
292 @item
293 If this entry exists, the Kerberos server creates and returns a
294 ticket-granting ticket and the key which allows you to use it, encrypted
295 by your password.  If @samp{kinit} can decrypt the Kerberos reply using
296 the password you provide, it stores this ticket in a credentials cache
297 on your local machine for later use.  The name of the credentials cache
298 can be specified in the @samp{KRB5CCNAME} environment variable.  If this
299 variable is not set, the name of the file will be
300 @file{/tmp/krb5cc_<uid>}, where <uid> is your UNIX user-id, represented
301 in decimal format.
302 @end enumerate
303
304 @need 1500
305 @item
306 Now you use the @samp{rlogin} client to access the machine
307 @samp{laughter}.
308
309 @example
310 host% @b{rlogin laughter}
311 @end example
312
313 @enumerate A
314 @item
315 The @samp{rlogin} client checks your ticket file to see if you have a
316 ticket for the @samp{host} service for @samp{laughter}.  You don't, so
317 @samp{rlogin} uses the credential cache's ticket-granting ticket to make
318 a request to the master server's ticket-granting service.
319
320 @item
321 This ticket-granting service receives the request for a ticket for
322 @samp{host/laughter.@value{PRIMARYDOMAIN}}, and looks in the master
323 database for an entry for @samp{host/laughter.@value{PRIMARYDOMAIN}}.
324 If the entry exists, the ticket-granting service issues you a ticket for
325 that service.  That ticket is also cached in your credentials cache.
326
327 @item
328 The @samp{rlogin} client now sends that ticket to the @samp{laughter}
329 @samp{klogind} service program.  The service program checks the ticket
330 by using its own service key.  If the ticket is valid, it now knows your
331 identity.  If you are allowed to login to @samp{laughter} (because your
332 username matches one in /etc/passwd, or your Kerberos principal is in
333 the appropriate @file{.k5login} file), @code{klogind} will let you
334 login.
335 @end enumerate
336 @end enumerate
337
338 @node Definitions,  , The User/Kerberos Interaction, How Kerberos Works
339 @section Definitions
340
341 Following are definitions of some of the Kerberos terminology.
342
343 @include glossary.texinfo
344
345 @node Configuration Files, Using DNS, How Kerberos Works, Top
346 @chapter Configuration Files
347
348 @menu
349 * Supported Encryption Types::  
350 * Salts::                       
351 * krb5.conf::                   
352 * kdc.conf::                    
353 @end menu
354
355 @node Supported Encryption Types, Salts, Configuration Files, Configuration Files
356 @section Supported Encryption Types
357
358 Any tag in the configuration files which requires a list of encryption
359 types can be set to some combination of the following strings.
360 Encryption types marked as ``weak'' are available for compatibility
361 but not recommended for use.
362
363 @include support-enc.texinfo
364
365 The string DEFAULT can be used to refer to the default set of types for
366 the variable in question.  Types or families can be removed from the
367 current list by prefixing them with a minus sign (``-'').  Types or
368 families can be prefixed with a plus sign (``+'') for symmetry; it has
369 the same meaning as just listing the type or family.  For example,
370 ``DEFAULT -des'' would be the default set of encryption types with DES
371 types removed, and ``des3 DEFAULT'' would be the default set of
372 encryption types with triple DES types moved to the front.
373
374 While aes128-cts and aes256-cts are supported for all Kerberos
375 operations, they are not supported by older versions of our GSSAPI
376 implementation (krb5-1.3.1 and earlier).
377
378 By default, AES is enabled in this release.  Sites wishing to use AES
379 encryption types on their KDCs need to be careful not to give GSSAPI
380 services AES keys if the servers have not been updated.  If older
381 GSSAPI services are given AES keys, then services may fail when
382 clients supporting AES for GSSAPI are used.  Sites may wish to use AES
383 for user keys and for the ticket granting ticket key, although doing
384 so requires specifying what encryption types are used as each
385 principal is created.
386
387 If all GSSAPI-based services have been updated before or with the KDC,
388 this is not an issue.
389
390 @node Salts, krb5.conf, Supported Encryption Types, Configuration Files
391 @section Salts
392
393 Your Kerberos key is derived from your password.  To ensure that people
394 who happen to pick the same password do not have the same key, Kerberos
395 5 incorporates more information into the key using something called a
396 salt.  The supported values for salts are as follows.
397
398 @include salts.texinfo
399
400 @node krb5.conf, kdc.conf, Salts, Configuration Files
401 @section krb5.conf
402
403 @include krb5conf.texinfo
404
405 @menu
406 * libdefaults::                 
407 * appdefaults::                 
408 * login::                       
409 * realms (krb5.conf)::          
410 * domain_realm::                
411 * logging::                     
412 * capaths::                     
413 * dbdefaults::                  
414 * dbmodules::                   
415 * plugins::                     
416 * pkinit client options::       
417 * Sample krb5.conf File::       
418 @end menu
419
420 @node libdefaults, appdefaults, krb5.conf, krb5.conf
421 @subsection [libdefaults]
422
423 The @code{libdefaults} section may contain any of the following
424 relations:
425
426 @table @b
427 @itemx default_keytab_name
428 This relation specifies the default keytab name to be used by
429 application servers such as telnetd and rlogind.  The default is
430 @value{DefaultDefaultKeytabName}.
431
432 @itemx default_realm
433 Identifies the default Kerberos realm for the client.  Set its value to
434 your Kerberos realm.  If this is not specified and the TXT record
435 lookup is enabled (see @ref{Using DNS}), then that information will be
436 used to determine the default realm.  If this tag is not set in this
437 configuration file and there is no DNS information found, then an error
438 will be returned.
439
440 @itemx default_tgs_enctypes
441 Identifies the supported list of session key encryption types that
442 should be returned by the KDC.  The list may be delimited with commas
443 or whitespace.  Kerberos supports many different encryption types, and
444 support for more is planned in the future. (see @ref{Supported Encryption
445 Types} for a list of the accepted values for this tag).  The default
446 value is @value{DefaultDefaultTgsEnctypes}.
447
448 @itemx default_tkt_enctypes
449 Identifies the supported list of session key encryption types that
450 should be requested by the client.  The format is the same as for
451 @emph{default_tgs_enctypes}.  The default value for this tag is
452 @value{DefaultDefaultTktEnctypes}.
453
454 @itemx permitted_enctypes 
455 Identifies all encryption types that are permitted for use in session
456 key encryption.  The default value for this tag is
457 @value{DefaultPermittedEnctypes}.
458
459 @itemx allow_weak_crypto
460 If this is set to 0 (for false), then weak encryption types will be
461 filtered out of the previous three lists (as noted in @ref{Supported
462 Encryption Types}).  The default value for this tag is false, which
463 may cause authentication failures in existing Kerberos infrastructures
464 that do not support strong crypto.  Users in affected environments
465 should set this tag to true until their infrastructure adopts stronger
466 ciphers.
467
468 @itemx clockskew
469 Sets the maximum allowable amount of clockskew in seconds that the
470 library  will tolerate before assuming that a Kerberos message is
471 invalid.  The default value is @value{DefaultClockskew}.
472
473 @itemx ignore_acceptor_hostname
474 When accepting GSSAPI or krb5 security contexts for host-based service
475 principals, ignore any hostname passed by the calling application and
476 allow any service principal present in the keytab which matches the
477 service name and realm name (if given).  This option can improve
478 the administrative flexibility of server applications multi-homed hosts,
479 but can compromise the security of virtual hosting environments.  The
480 default value is false.
481
482 @itemx k5login_authoritative
483 If the value of this relation is true (the default), principals must
484 be listed in a local user's k5login file to be granted login access,
485 if a k5login file exists.  If the value of this relation is false, a
486 principal may still be granted login access through other mechanisms
487 even if a k5login file exists but does not list the principal.
488
489 @itemx k5login_directory
490 If set, the library will look for a local user's k5login file within the
491 named directory, with a filename corresponding to the local username.
492 If not set, the library will look for k5login files in the user's home
493 directory, with the filename @code{.k5login}.  For security reasons,
494 k5login files must be owned by the local user or by root.
495
496 @itemx kdc_timesync
497 If this is set to 1 (for true), then client machines will compute the
498 difference between their time and the time returned by the KDC in the
499 timestamps in the tickets and use this value to correct for an
500 inaccurate system clock.  This corrective factor is only used by the
501 Kerberos library.  The default is @value{DefaultKDCTimesync}.
502
503 @itemx kdc_req_checksum_type
504
505 @itemx ap_req_checksum_type
506
507 @itemx safe_checksum_type
508 An integer which specifies the type of checksum to use.  Used for
509 compatability with DCE security servers which do not support the
510 default @value{DefaultChecksumType} used by this version of Kerberos.
511 The
512 kdc_req_checksum_type is only used for DES keys.   The ap_req_checksum_type defaults to the preferred checksum for the encryption type being used if unset.  If set, then the selected checksum is used regardless of the type of key being used.  The possible values and their meanings are as follows.
513
514 @comment taken from krb5/src/include/krb5.h[in]
515 @table @b
516 @item 1
517 CRC32
518 @item 2
519 RSA MD4
520 @item 3
521 RSA MD4 DES
522 @item 4
523 DES CBC
524 @item 7
525 RSA MD5
526 @item 8
527 RSA MD5 DES
528 @item 9
529 NIST SHA
530 @item 12
531 HMAC SHA1 DES3
532 @item -138
533 Microsoft MD5 HMAC checksum type
534 @end table
535
536 @itemx preferred_preauth_types
537 This allows you to set the preferred preauthentication types which the
538 client will attempt before others which may be advertised by a KDC.  The
539 default value for this setting is "17, 16, 15, 14", which forces libkrb5
540 to attempt to use PKINIT if it is supported.
541
542 @comment see lib/krb5/ccache/fcc.h
543 @itemx ccache_type
544 Use this parameter on systems which are DCE clients, to specify the
545 type of cache to be created by kinit, or when forwarded tickets are
546 received.  DCE and Kerberos can share the cache, but some versions of
547 DCE do not support the default cache as created by this version of
548 Kerberos.  Use a value of 1 on DCE 1.0.3a systems, and a value of 2 on
549 DCE 1.1 systems.  The default value is @value{DefaultCcacheType}.
550
551 @itemx dns_lookup_kdc
552 Indicate whether DNS SRV records should be used to locate the KDCs and
553 other servers for a realm, if they are not listed in the information for
554 the realm.  (Note that the @samp{admin_server} entry must be in the
555 file, because the DNS implementation for it is incomplete.)
556
557 Enabling this option does open up a type of denial-of-service attack, if
558 someone spoofs the DNS records and redirects you to another server.
559 However, it's no worse than a denial of service, because that fake KDC
560 will be unable to decode anything you send it (besides the initial
561 ticket request, which has no encrypted data), and anything the fake KDC
562 sends will not be trusted without verification using some secret that it
563 won't know.
564
565 If this option is not specified but @samp{dns_fallback} is, that value
566 will be used instead.  If neither option is specified, the behavior
567 depends on configure-time options; if none were given, the default is to
568 enable this option.  If the DNS support is not compiled in, this entry
569 has no effect.
570
571 @itemx dns_lookup_realm
572 Indicate whether DNS TXT records should be used to determine the
573 Kerberos realm of a host.
574
575 Enabling this option may permit a redirection attack, where spoofed DNS
576 replies persuade a client to authenticate to the wrong realm, when
577 talking to the wrong host (either by spoofing yet more DNS records or by
578 intercepting the net traffic).  Depending on how the client software
579 manages hostnames, however, it could already be vulnerable to such
580 attacks.  We are looking at possible ways to minimize or eliminate this
581 exposure.  For now, we encourage more adventurous sites to try using
582 Secure DNS.
583
584 If this option is not specified but @samp{dns_fallback} is, that value
585 will be used instead.  If neither option is specified, the behavior
586 depends on configure-time options; if none were given, the default is to
587 disable this option.  If the DNS support is not compiled in, this entry
588 has no effect.
589
590 @itemx dns_fallback
591 General flag controlling the use of DNS for Kerberos information.  If
592 both of the preceding options are specified, this option has no effect.
593
594 @itemx realm_try_domains
595 Indicate whether a host's domain components should be used to determine
596 the Kerberos realm of the host.  The value of this variable is an
597 integer: -1 means not to search, 0 means to try the host's domain
598 itself, 1 means to also try the domain's immediate parent, and so forth.
599 The library's usual mechanism for locating Kerberos realms is used to
600 determine whether a domain is a valid realm--which may involve
601 consulting DNS if dns_lookup_kdc is set.  The default is not to search
602 domain components.
603
604 @itemx extra_addresses
605 This allows a computer to use multiple local addresses, in order to
606 allow Kerberos to work in a network that uses NATs.  The addresses
607 should be in a comma-separated list.
608
609 @itemx udp_preference_limit
610 When sending a message to the KDC, the library will try using TCP before
611 UDP if the size of the message is above @code{udp_preference_list}.
612 If the message is smaller than @code{udp_preference_list}, then UDP
613 will be tried before TCP.  Regardless of the size, both protocols will
614 be tried if the first attempt fails.
615
616 @itemx verify_ap_req_nofail
617 If this flag is set, then an attempt to get initial credentials will
618 fail if the client machine does not have a keytab.  The default for the
619 flag is @value{DefaultVerifyApReqNofail}.
620
621 @itemx ticket_lifetime
622 The value of this tag is the default lifetime for
623 initial tickets.  The default value for the tag is
624 @value{DefaultTktLifetime}.
625
626 @itemx renew_lifetime
627 The value of this tag is the default renewable lifetime for
628 initial tickets.  The default value for the tag is
629 @value{DefaultRenewLifetime}.
630
631 @itemx noaddresses
632 Setting this flag causes the initial Kerberos ticket to be addressless.
633 The default for the flag is @value{DefaultNoaddresses}.
634
635 @itemx forwardable
636 If this flag is set, initial tickets by default will be forwardable.
637 The default value for this flag is @value{DefaultForwardable}.
638
639 @itemx proxiable
640 If this flag is set, initial tickets by default will be proxiable.
641 The default value for this flag is @value{DefaultProxiable}.
642
643 @itemx rdns
644 If set to false, prevent the use of reverse DNS resolution when
645 translating hostnames into service principal names.  Defaults to
646 true.  Setting this flag to false is more secure, but may force
647 users to exclusively use fully qualified domain names when
648 authenticating to services.
649
650 @end table
651
652
653
654 @node appdefaults, login, libdefaults, krb5.conf
655 @subsection [appdefaults]
656
657 Each tag in the [appdefaults] section names a Kerberos V5 application
658 or an option that is used by some Kerberos V5 application[s].  The
659 value of the tag defines the default behaviors for that application.
660
661 For example:
662
663 @smallexample
664 @group
665 [appdefaults]
666     telnet = @{
667         @value{PRIMARYREALM} = @{
668              option1 = false
669         @}
670     @}
671     telnet = @{
672         option1 = true
673         option2 = true
674     @}
675     @value{PRIMARYREALM} = @{
676         option2 = false
677     @}
678     option2 = true
679
680 @end group
681 @end smallexample
682
683 The above four ways of specifying the value of an option are shown
684 in order of decreasing precedence.   In this example, if telnet is
685 running in the realm @value{SECONDREALM}, it should, by default, have
686 option1 and option2 set to true.  However, a telnet program in the realm
687 @value{PRIMARYREALM} should have option1 set to false and option2 set
688 to true.  Any other programs in @value{PRIMARYREALM} should have option2
689 set to false by default.  Any programs running in other realms should
690 have option2 set to true.
691
692 The list of specifiable options for each application may be found in
693 that application's man pages.  The application defaults specified here
694 are overridden by those specified in the [realms] section.
695
696
697 @node login, realms (krb5.conf), appdefaults, krb5.conf
698 @subsection [login]
699
700 Each tag in the [login] section of the file is an option for
701 login.krb5.  This section may contain any of the following relations:
702
703 @table @b
704 @itemx krb5_get_tickets
705 Indicate whether or not to use a user's password to get V5 tickets.
706 The default value is @value{DefaultKrb5GetTickets}.
707
708 @itemx krb_run_aklog
709 Indicate whether or not to run aklog.  The default value is
710 @value{DefaultKrbRunAklog}.
711
712 @itemx aklog_path
713 Indicate where to find aklog.  The default value is
714 @value{DefaultAklogPath}.
715
716 @itemx accept_passwd
717 A true value will cause login not to accept plaintext passwords.  The
718 default value is @value{DefaultAcceptPasswd}.  This is not yet
719 implemented.
720 @end table
721
722 @node realms (krb5.conf), domain_realm, login, krb5.conf
723 @subsection [realms]
724
725 Each tag in the [realms] section of the file is the name of a Kerberos
726 realm.  The value of the tag is a subsection with relations that define
727 the properties of that particular realm.  For each realm, the following
728 tags may be specified in the realm's subsection:
729
730 @table @b
731 @itemx kdc
732 The name or address of a host running a KDC for that realm.  An optional
733 port number, separated from the hostname by a colon, may be included.
734 If the name or address contains colons (for example, if it is an IPv6
735 address), enclose it in square brackets to distinguish the colon from a
736 port separator.  For your computer to be able to communicate with the
737 KDC for each realm, this tag must be given a value in each realm
738 subsection in the configuration file, or there must be DNS SRV records
739 specifying the KDCs (see @ref{Using DNS}).
740
741 @itemx master_kdc
742 Identifies the master KDC(s).  Currently, this tag is used in only one
743 case: If an attempt to get credentials fails because of an invalid
744 password, the client software will attempt to contact the master KDC,
745 in case the user's password has just been changed, and the updated
746 database has not been propagated to the slave servers yet.
747
748 @itemx database_module
749
750 This relation indicates the name of the configuration section under [dbmodules] for database specific parameters used by the loadable database library.
751
752
753 @itemx admin_server
754 Identifies the host where the administration server is running.
755 Typically, this is the master Kerberos server.  This tag must be given
756 a value in order to communicate with the kadmin server for the realm.
757
758 @ignore
759 this doesn't seem to be used in the code
760 @itemx application defaults
761 Application defaults that are specific to a particular realm may be
762 specified within that realm's tag.  Realm-specific application defaults
763 override the global defaults specified in the [appdefaults] section.
764 @end ignore
765
766 @itemx default_domain
767 This tag is used for Kerberos 4 compatibility.  Kerberos 4 does not
768 require the entire hostname of a server to be in its principal like
769 Kerberos 5 does.  This tag provides the domain name needed to produce a
770 full hostname when translating V4 principal names into V5 principal
771 names.  All servers in this realm are assumed to be in the domain given
772 as the value of this tag
773
774 @itemx v4_instance_convert
775 This subsection allows the administrator to configure exceptions to the
776 default_domain mapping rule.  It contains V4 instances (the tag name)
777 which should be translated to some specific hostname (the tag value) as
778 the second component in a Kerberos V5 principal name.
779
780 @itemx v4_realm
781 This relation is used by the krb524 library routines when converting a
782 V5 principal name to a V4 principal name.  It is used when the V4 realm
783 name and the V5 realm name are not the same, but still share the same
784 principal names and passwords.  The tag value is the Kerberos V4 realm
785 name.
786
787 @itemx auth_to_local_names
788 This subsection allows you to set explicit mappings from principal
789 names to local user names.  The tag is the mapping name, and the value
790 is the corresponding local user name.
791
792 @itemx auth_to_local
793 This tag allows you to set a general rule for mapping principal names
794 to local user names.  It will be used if there is not an explicit
795 mapping for the principal name that is being translated.  The possible
796 values are:
797
798 @table @b
799
800 @item DB:@i{filename}
801 The principal will be looked up in the database @i{filename}.  Support
802 for this is not currently compiled in by default.
803
804 @item RULE:@i{exp}
805 The local name will be formulated from @i{exp}.
806
807 The format for @i{exp} is
808 @code{[@i{n}:@i{string}](@i{regexp})s/@i{pattern}/@i{replacement}/g}.
809 The integer @i{n} indicates how many components the target principal
810 should have.  If this matches, then a string will be formed from
811 @i{string}, substituting the realm of the principal for @code{$0} and
812 the @i{n}'th component of the principal for @code{$@i{n}} (e.g. if the
813 principal was @value{RANDOMUSER}/admin then [2:$2$1foo] would result in
814 the string "admin@value{RANDOMUSER}foo").  If this string matches
815 @i{regexp}, then the @code{s//[g]} substitution command will be run over
816 the string.  The optional g will cause the substitution to be global
817 over the string, instead of replacing only the first match in the
818 string.
819
820 @item DEFAULT
821 The principal name will be used as the local user name.  If the
822 principal has more than one component or is not in the default realm,
823 this rule is not applicable and the conversion will fail.
824
825 @end table
826
827 For example:
828
829 @smallexample
830 @group
831 [realms]
832     @value{PRIMARYREALM} = @{
833         auth_to_local = RULE:[2:$1](@value{RANDOMUSER})s/^.*$/guest/
834         auth_to_local = RULE:[2:$1;$2](^.*;admin$)s/;admin$//
835         auth_to_local = RULE:[2:$2](^.*;root)s/^.*$/root/
836         auto_to_local = DEFAULT
837     @}
838 @end group
839 @end smallexample
840
841 would result in any principal without @code{root} or @code{admin} as
842 the second component to be translated with the default rule.  A
843 principal with a second component of @code{admin} will become its first
844 component.  @code{root} will be used as the local name for any
845 principal with a second component of @code{root}.  The exception to
846 these two rules are any principals @value{RANDOMUSER}/*, which will
847 always get the local name @code{guest}.
848
849 @end table
850
851 @node domain_realm, logging, realms (krb5.conf), krb5.conf
852 @subsection [domain_realm]
853
854 The [domain_realm] section provides a translation from a domain name or
855 hostname to a Kerberos realm name.  The tag name can be a host name, or
856 a domain name, where domain names are indicated by a prefix of a period
857 (@samp{.}).  The value of the relation is the Kerberos realm name for
858 that particular host or domain.  Host names and domain names should be
859 in lower case.
860
861 If no translation entry applies, the host's realm is considered to be
862 the hostname's domain portion converted to upper case.  For example, the
863 following [domain_realm] section:
864
865 @smallexample
866 @group
867 [domain_realm]
868 @ifset MIT
869     .mit.edu = ATHENA.MIT.EDU
870 @end ifset
871     @value{PRIMARYDOMAIN} = @value{PRIMARYREALM}
872     crash.@value{PRIMARYDOMAIN} = TEST.@value{PRIMARYREALM}
873     @value{SECONDDOMAIN} = @value{SECONDREALM}
874 @end group
875 @end smallexample
876
877 @noindent
878 maps crash.@value{PRIMARYDOMAIN} into the TEST.@value{PRIMARYREALM}
879 realm.  All other hosts in the @value{PRIMARYDOMAIN} domain will map by
880 default to the @value{PRIMARYREALM} realm, and all hosts in the
881 @value{SECONDDOMAIN} domain will map by default into the
882 @value{SECONDREALM} realm.  Note the entries for the hosts
883 @value{PRIMARYDOMAIN} and @value{SECONDDOMAIN}.  Without these entries,
884 @ifset CYGNUS
885 these hosts would be mapped into the Kerberos realms @samp{COM} and
886 @end ifset
887 @ifclear CYGNUS
888 these hosts would be mapped into the Kerberos realms @samp{EDU} and
889 @end ifclear
890 @samp{ORG}, respectively.
891
892 @node logging, capaths, domain_realm, krb5.conf
893 @subsection [logging]
894 The [logging] section indicates how a particular entity is to perform
895 its logging.  The relations in this section assign one or more values to
896 the entity name.  Currently, the following entities are used:
897
898 @table @b
899
900 @itemx kdc
901 These entries specify how the KDC is to perform its logging.
902
903 @itemx admin_server
904 These entries specify how the administrative server
905 is to perform its logging.
906
907 @itemx default
908 These entries specify how to perform logging in the
909 absence of explicit specifications otherwise.
910 @end table
911
912 Values are of the following forms:
913
914 @table @b
915 @itemx FILE=<filename>
916
917 @itemx FILE:<filename> 
918 This value causes the entity's logging messages to go to the specified
919 file.  If the @samp{=} form is used, the file is overwritten.  If the
920 @samp{:} form is used, the file is appended to.
921
922 @itemx STDERR
923 This value causes the entity's logging messages to go to its standard
924 error stream.
925
926 @itemx CONSOLE
927 This value causes the entity's logging messages to go to the console, if
928 the system supports it.
929
930 @itemx DEVICE=<devicename>
931 This causes the entity's logging messages to go to the specified device.
932
933 @itemx SYSLOG[:<severity>[:<facility>]]
934 This causes the entity's logging messages to go to the system log.
935
936 The @dfn{severity} argument specifies the default severity of system log
937 messages.  This may be any of the following severities supported by the
938 @code{syslog(3)} call, minus the LOG_ prefix:  LOG_EMERG, LOG_ALERT,
939 LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG.
940 For example, a value of @samp{CRIT} would specify LOG_CRIT severity.
941
942 The facility argument specifies the facility under which the messages
943 are logged.  This may be any of the following facilities supported by
944 the syslog(3) call minus the LOG_ prefix:  LOG_KERN, LOG_USER, LOG_MAIL,
945 LOG_DAEMON, LOG_AUTH, LOG_LPR, LOG_NEWS, LOG_UUCP, LOG_CRON, and
946 LOG_LOCAL0 through LOG_LOCAL7.
947
948 If no severity is specified, the default is ERR.  If no facility is
949 specified, the default is AUTH.
950 @end table
951
952 In the following example, the logging messages from the KDC will go to
953 the console and to the system log under the facility LOG_DAEMON with
954 default severity of LOG_INFO; and the logging messages from the
955 administrative server will be appended to the file /var/adm/kadmin.log
956 and sent to the device /dev/tty04.
957
958 @smallexample
959 @group
960 [logging]
961     kdc = CONSOLE
962     kdc = SYSLOG:INFO:DAEMON
963     admin_server = FILE:/var/adm/kadmin.log
964     admin_server = DEVICE=/dev/tty04
965 @end group
966 @end smallexample
967
968 @node capaths, dbdefaults, logging, krb5.conf
969 @subsection [capaths]
970
971 In order to perform direct (non-hierarchical) cross-realm
972 authentication, a database is needed to construct the authentication
973 paths between the realms.  This section defines that database.
974
975 A client will use this section to find the authentication path between
976 its realm and the realm of the server.  The server will use this section
977 to verify the authentication path used by the client, by checking the
978 transited field of the received ticket.
979
980 There is a tag for each participating realm, and each tag has subtags
981 for each of the realms.  The value of the subtags is an intermediate
982 realm which may participate in the cross-realm authentication.  The
983 subtags may be repeated if there is more then one intermediate realm.  A
984 value of "."  means that the two realms share keys directly, and no
985 intermediate realms should be allowed to participate.
986
987 There are n**2 possible entries in this table, but only those entries
988 which will be needed on the client or the server need to be present.
989 The client needs a tag for its local realm, with subtags for all the
990 realms of servers it will need to authenticate with.  A server needs a
991 tag for each realm of the clients it will serve.
992
993 For example, ANL.GOV, PNL.GOV, and NERSC.GOV all wish to use the ES.NET
994 realm as an intermediate realm.  ANL has a sub realm of TEST.ANL.GOV
995 which will authenticate with NERSC.GOV but not PNL.GOV.  The [capaths]
996 section for ANL.GOV systems would look like this:
997
998 @smallexample
999 @group
1000 [capaths]
1001     ANL.GOV = @{
1002         TEST.ANL.GOV = .
1003         PNL.GOV = ES.NET
1004         NERSC.GOV = ES.NET
1005         ES.NET = .
1006     @}
1007     TEST.ANL.GOV = @{
1008         ANL.GOV = .
1009     @}
1010     PNL.GOV = @{
1011         ANL.GOV = ES.NET
1012     @}
1013     NERSC.GOV = @{
1014         ANL.GOV = ES.NET
1015     @}
1016     ES.NET = @{
1017         ANL.GOV = .
1018     @}
1019 @end group
1020 @end smallexample
1021
1022 The [capaths] section of the configuration file used on NERSC.GOV systems
1023 would look like this:
1024
1025 @smallexample
1026 @group
1027 [capaths]
1028     NERSC.GOV = @{
1029         ANL.GOV = ES.NET
1030         TEST.ANL.GOV = ES.NET
1031         TEST.ANL.GOV = ANL.GOV
1032         PNL.GOV = ES.NET
1033         ES.NET = .
1034     @}
1035     ANL.GOV = @{
1036         NERSC.GOV = ES.NET
1037     @}
1038     PNL.GOV = @{
1039         NERSC.GOV = ES.NET
1040     @}
1041     ES.NET = @{
1042         NERSC.GOV = .
1043     @}
1044     TEST.ANL.GOV = @{
1045         NERSC.GOV = ANL.GOV
1046         NERSC.GOV = ES.NET
1047     @}
1048 @end group
1049 @end smallexample
1050
1051 In the above examples, the ordering is not important, except when the
1052 same subtag name is used more then once.  The client will use this to
1053 determine the path.  (It is not important to the server, since the
1054 transited field is not sorted.)
1055
1056 This feature is not currently supported by DCE.  DCE security servers
1057 can be used with Kerberized clients and servers, but versions prior to
1058 DCE 1.1 did not fill in the transited field, and should be used with
1059 caution.
1060
1061 @node dbdefaults, dbmodules, capaths, krb5.conf
1062 @subsection [dbdefaults]
1063
1064 The [dbdefaults] section provides default values for the database specific parameters. It can also specify the configuration section under [dbmodules] section for database specific parameters used by the database library.(@pxref{dbmodules}). 
1065
1066 The following tags are used in this section:
1067
1068 @table @b
1069 @itemx database_module
1070 This relation indicates the name of the configuration section under the [dbmodules] for database specific parameters used by the loadable database library. 
1071
1072 @itemx ldap_kerberos_container_dn 
1073 This LDAP specific tag indicates the DN of the container object where the realm objects will be located. This value is used if the container object is not mentioned in the configuration section under [dbmodules].
1074
1075 @itemx ldap_kdc_dn
1076 This LDAP specific tag indicates the default bind DN for the KDC server. The KDC server does a login to the directory as this object. This object should have the rights to read the Kerberos data in the LDAP database. This value is used if the bind DN for the KDC is not mentioned in the configuration section under [dbmodules].
1077
1078 @itemx ldap_kadmind_dn
1079 This LDAP specific tag indicates the default bind DN for the Administration server. The administration server does a login to the directory as this object. This object should have the rights to read and write the Kerberos data in the LDAP database. This value is used if the bind DN for the Administration server is not mentioned in the configuration section under [dbmodules].
1080
1081 @itemx ldap_service_password_file
1082
1083 This LDAP specific tag indicates the file containing the stashed passwords (created by @code{kdb5_ldap_util stashsrvpw}) for the objects used by the Kerberos servers to bind to the LDAP server. This file must be kept secure. This value is used if no service password file is mentioned in the configuration section under [dbmodules].
1084
1085 @itemx ldap_servers
1086
1087 This LDAP specific tag indicates the list of LDAP servers that the Kerberos servers can connect to. The list of LDAP servers is whitespace-separated. The LDAP server is specified by a LDAP URI. This value is used if no LDAP servers are mentioned in the configuration section under [dbmodules]. It is recommended to use the ldapi:// or ldaps:// interface and not to use ldap:// interface.
1088
1089 @itemx ldap_conns_per_server
1090 This LDAP specific tag indicates the number of connections to be maintained per LDAP server. This value is used if the number of connections per LDAP server are not mentioned in the configuration section under [dbmodules]. The default value is 5.
1091 @end table
1092
1093 @node dbmodules, plugins, dbdefaults, krb5.conf
1094 @subsection [dbmodules]
1095
1096 Contains database specific parameters used by the database library. Each tag in the [dbmodules] section of the file names a configuration section for database specific parameters that can be referred to by a realm. The value of the tag is a subsection where the relations in that subsection define the database specific parameters.
1097
1098 For each section, the following tags may be specified in the subsection:
1099
1100 @table @b
1101 @itemx db_library
1102 This tag indicates the name of the loadable database library. The value should be @samp{db2} for DB2 database and @samp{kldap} for LDAP database.
1103
1104 @itemx database_name
1105 This DB2-specific tag indicates the location of the database in the
1106 filesystem.  The default is @* @code{@value{DefaultDatabaseName}}.
1107
1108 @itemx disable_last_success
1109 If set to @code{true}, suppresses KDC updates to the ``Last successful
1110 authentication'' field of principal entries requiring preauthentication.
1111 Setting this flag may improve performance.  (Principal entries which do
1112 not require preauthentication never update the ``Last successful
1113 authentication'' field.)
1114
1115 @itemx disable_lockout
1116 If set to @code{true}, suppresses KDC updates to the ``Last failed
1117 authentication'' and ``Failed password attempts'' fields of principal
1118 entries requiring preauthentication.  Setting this flag may improve
1119 performance, but also disables account lockout.
1120
1121 @itemx ldap_kerberos_container_dn 
1122 This LDAP specific tag indicates the DN of the container object where the realm objects will be located.
1123
1124 @itemx ldap_kdc_dn
1125 This LDAP specific tag indicates the default bind DN for the KDC server. The KDC server does a login to the directory as this object. This object should have the rights to read the Kerberos data in the LDAP database.
1126
1127 @itemx ldap_kadmind_dn
1128 This LDAP specific tag indicates the default bind DN for the Administration server. The administration server does a login to the directory as this object. This object should have the rights to read and write the Kerberos data in the LDAP database.
1129
1130 @itemx ldap_service_password_file
1131 This LDAP specific tag indicates the file containing the stashed passwords (created by @code{kdb5_ldap_util stashsrvpw}) for the objects used by the Kerberos servers to bind to the LDAP server. This file must be kept secure.
1132
1133 @itemx ldap_servers
1134 This LDAP specific tag indicates the list of LDAP servers that the Kerberos servers can connect to. The list of LDAP servers is whitespace-separated. The LDAP server is specified by a LDAP URI. It is recommended to use ldapi:// or ldaps:// interface to connect to the LDAP server.
1135
1136 @itemx ldap_conns_per_server
1137 This LDAP specific tags indicates the number of connections to be maintained per LDAP server. 
1138
1139 @end table
1140
1141 @node plugins, pkinit client options, dbmodules, krb5.conf
1142 @subsection Plugins
1143
1144 @menu
1145 * pwqual interface::            
1146 * kadm5_hook interface::        
1147 * clpreauth and kdcpreauth interfaces::        
1148 @end menu
1149
1150 Tags in the [plugins] section can be used to register dynamic plugin
1151 modules and to turn modules on and off.  Not every krb5 pluggable
1152 interface uses the [plugins] section; the ones that do are documented
1153 here.
1154
1155 Each pluggable interface corresponds to a subsection of [plugins].
1156 All subsections support the same tags:
1157
1158 @table @b
1159 @itemx module
1160 This tag may have multiple values.  Each value is a string of the form
1161 "modulename:pathname", which causes the shared object located at
1162 pathname to be registered as a dynamic module named modulename for the
1163 pluggable interface.  If pathname is not an absolute path, it will be
1164 treated as relative to the "krb5/plugins" subdirectory of the krb5
1165 library directory.
1166
1167 @itemx enable_only
1168 This tag may have multiple values.  If there are values for this tag,
1169 then only the named modules will be enabled for the pluggable
1170 interface.
1171
1172 @itemx disable
1173 This tag may have multiple values.  If there are values for this tag,
1174 then the named modules will be disabled for the pluggable interface.
1175 @end table
1176
1177 The following subsections are currently supported within the [plugins]
1178 section:
1179
1180 @node pwqual interface, kadm5_hook interface, plugins, plugins
1181 @subsubsection pwqual interface
1182
1183 The pwqual subsection controls modules for the password quality
1184 interface, which is used to reject weak passwords when passwords are
1185 changed.  In addition to any registered dynamic modules, the following
1186 built-in modules exist (and may be disabled with the disable tag):
1187
1188 @table @b
1189 @itemx dict
1190 Checks against the realm dictionary file
1191
1192 @itemx empty
1193 Rejects empty passwords
1194
1195 @itemx hesiod
1196 Checks against user information stored in Hesiod (only if Kerberos was
1197 built with Hesiod support)
1198
1199 @itemx princ
1200 Checks against components of the principal name
1201 @end table
1202
1203 @node kadm5_hook interface, clpreauth and kdcpreauth interfaces, pwqual interface, plugins
1204 @subsubsection kadm5_hook interface
1205 The kadm5_hook interface provides plugins with information on
1206 principal creation, modification, password changes and deletion. This
1207 interface can be used to write a plugin to synchronize MIT Kerberos
1208 with another database such as Active Directory. No plugins are built
1209 in for this interface.
1210
1211 @node clpreauth and kdcpreauth interfaces, , kadm5_hook interface, plugins
1212 @subsubsection clpreauth interface
1213
1214 The clpreauth and kdcpreauth interfaces allow plugin modules to provide
1215 client and KDC preauthentication mechanisms.  The following built-in
1216 modules exist:
1217
1218 @table @b
1219 @itemx pkinit
1220 This module implements the PKINIT preauthentication mechanism.
1221
1222 @itemx encrypted_challenge
1223 This module implements the encrypted challenge FAST factor.
1224
1225 @itemx encrypted_timestamp
1226 This module implements the encrypted timestamp mechanism.
1227 @end table
1228
1229 @node pkinit client options, Sample krb5.conf File, plugins, krb5.conf
1230 @subsection pkinit options
1231
1232 @menu
1233 * pkinit identity syntax::      
1234 * pkinit krb5.conf options::    
1235 @end menu
1236
1237 The following are @b{pkinit-specific} options.
1238 Note that these values may be specified in @code{[libdefaults]}
1239 as global defaults,
1240 or within a realm-specific subsection of @code{[libdefaults]},
1241 or may be specified as realm-specific values in the
1242 @code{[realms]} section.
1243 Also note that a realm-specific value over-rides, does not add to,
1244 a generic @code{[libdefaults]} specification.
1245 The search order is:
1246 @enumerate
1247 @item realm-specific subsection of @code{[libdefaults]}
1248 @smallexample
1249 @group
1250 [libdefaults]
1251     EXAMPLE.COM = @{
1252         pkinit_anchors = FILE:/usr/local/example.com.crt
1253     @}
1254 @end group
1255 @end smallexample
1256
1257 @item realm-specific value in the @code{[realms]} section,
1258 @smallexample
1259 @group
1260 [realms]
1261     OTHERREALM.ORG = @{
1262         pkinit_anchors = FILE:/usr/local/otherrealm.org.crt
1263     @}
1264 @end group
1265 @end smallexample
1266
1267 @item generic value in the @code{[libdefaults]} section.
1268 @smallexample
1269 @group
1270 [libdefaults]
1271     pkinit_anchors = DIR:/usr/local/generic_trusted_cas/
1272
1273 @end group
1274 @end smallexample
1275 @end enumerate
1276
1277 @node pkinit identity syntax, pkinit krb5.conf options, pkinit client options, pkinit client options
1278 @subsubsection Specifying pkinit identity information
1279
1280 The syntax for specifying Public Key identity, trust, and revocation
1281 information for pkinit is as follows: 
1282 @table @b
1283
1284 @item FILE:@i{file-name}[,@i{key-file-name}]
1285 This option has context-specific behavior.
1286 @table @b
1287 @item pkinit_identity
1288 @itemx pkinit_identities
1289 @i{file-name} specifies the name of a PEM-format file
1290 containing the user's certificate.  If @i{key-file-name} is
1291 not specified, the user's private key is expected to be
1292 in @i{file-name} as well.  Otherwise, @i{key-file-name}
1293 is the name of the file containing the private key.
1294 @item pkinit_anchors
1295 @itemx pkinit_pool
1296 @i{file-name} is assumed to be the name of an OpenSSL-style
1297 ca-bundle file.
1298 @end table
1299
1300 @item DIR:@i{directory-name}
1301 This option has context-specific behavior.
1302 @table @b
1303 @item pkinit_identity
1304 @itemx pkinit_identities
1305 @i{directory-name} specifies a directory with files named
1306 @code{*.crt} and @code{*.key}, where the first part of the
1307 file name is the same for matching pairs of certificate and
1308 private key files.  When a file with a name ending with @code{.crt}
1309 is found, a matching file ending with @code{.key} is assumed
1310 to contain the private key.  If no such file is found, then
1311 the certificate in the @code{.crt} is not used. 
1312 @item pkinit_anchors
1313 @itemx pkinit_pool
1314 @i{directory-name} is assumed to be an OpenSSL-style hashed CA directory
1315 where each CA cert is stored in a file named @i{hash-of-ca-cert}.@i{#}.
1316 This infrastructure is encouraged, but all files in the directory
1317 will be examined and if they contain certificates (in PEM format),
1318 they will be used.
1319 @item pkinit_revoke
1320 @i{directory-name} is assumed to be an OpenSSL-style hashed CA directory
1321 where each revocation list is stored in a file named @i{hash-of-ca-cert}.@b{r}@i{#}.
1322 This infrastructure is encouraged, but all files in the directory
1323 will be examined and if they contain a revocation list (in PEM format),
1324 they will be used.
1325 @end table
1326
1327 @item PKCS12:@i{pkcs12-file-name}
1328 @i{pkcs12-file-name} is the name of a @code{PKCS #12} format file, containing
1329 the user's certificate and private key.
1330
1331 @item PKCS11:[@b{module_name=}]@i{module-name}[@b{:slotid=}@i{slot-id}][@b{:token=}@i{token-label}][@b{:certid=}@i{cert-id}][@b{:certlabel=}@i{cert-label}]
1332 All keyword/values are optional.
1333 @i{module-name} specifies the location of a library implementing
1334 @code{PKCS #11}.  If a value is encountered with no keyword, it
1335 is assumed to be the @i{module-name}.  If no @i{module-name} is
1336 specified, the default is @code{opensc-pkcs11.so}. 
1337 @b{slotid=} and/or @b{token=} may be specified to force the use of a
1338 particular smard card reader or token if there is more than one
1339 available.
1340 @b{certid=} and/or @b{certlabel=} may be specified to force the selection
1341 of a particular certificate on the device.  See the @code{pkinit_cert_match}
1342 configuration option for more ways to select a particular certificate to
1343 use for pkinit.
1344
1345 @item ENV:@i{environment-variable-name}
1346 @i{environment-variable-name} specifies the name of an environment
1347 variable which has been set to a value conforming to one of the
1348 previous values.  For example, @code{ENV:X509_PROXY}, where environment
1349 variable @code{X509_PROXY} has been set to @code{FILE:/tmp/my_proxy.pem}.
1350 @end table
1351
1352 @node pkinit krb5.conf options,  , pkinit identity syntax, pkinit client options
1353 @subsubsection pkinit krb5.conf options
1354 @table @b
1355
1356 @item pkinit_identities
1357 Specifies the location(s) to be used to find the user's X.509 identity
1358 information.  This option may be specified multiple times.
1359 Each value is attempted in order until identity information is found
1360 and authentication is attempted.  Note that these values are @b{not}
1361 used if the user specifies @b{X509_user_identity} on the command line.
1362
1363 @item pkinit_anchors
1364 Specifies the location of trusted anchor (root) certificates which
1365 the client trusts to sign KDC certificates.  This option may be
1366 specified multiple times.  These values from the config file are
1367 @b{not} used if the user specifies @b{X509_anchors} on the command line.
1368
1369 @item pkinit_pool
1370 Specifies the location of intermediate certificates which may be
1371 used by the client to complete the trust chain between a KDC
1372 certificate and a trusted anchor.  This option may be specified
1373 multiple times.
1374
1375 @item pkinit_revoke
1376 Specifies the location of Certificate Revocation List (CRL) information
1377 to be used by the client when verifying the validity of the KDC
1378 certificate presented.  This option may be specified multiple times.
1379
1380 @item pkinit_require_crl_checking
1381 The default certificate verification process will always check
1382 the available revocation information to see if a certificate has
1383 been revoked.  If a match is found for the certificate in a CRL,
1384 verification fails.  If the certificate being verified is not listed
1385 in a CRL, or there is no CRL present for its issuing CA,
1386 and @code{pkinit_require_crl_checking} is @code{false},
1387 then verification succeeds.
1388
1389 However, if @code{pkinit_require_crl_checking} is @code{true} and
1390 there is no CRL information available for the issuing CA,
1391 then verification fails.
1392
1393 @code{pkinit_require_crl_checking} should be set to @code{true}
1394 if the policy is such that up-to-date CRLs @b{must} be present for
1395 every CA.
1396
1397 @item pkinit_dh_min_bits
1398 Specifies the size of the Diffie-Hellman key the client will
1399 attempt to use.  The acceptable values are currently 1024, 2048,
1400 and 4096.  The default is 2048.
1401
1402 @item pkinit_win2k
1403 This flag specifies whether the target realm is assumed
1404 to support only the @i{old}, pre-RFC version of the protocol.
1405 The default is false.
1406
1407 @item pkinit_win2k_require_binding
1408 If this flag is set to true, it expects that the target
1409 KDC is patched to return a reply with a checksum rather than a
1410 nonce.  The default is false.
1411
1412 @item pkinit_eku_checking
1413 This option specifies what Extended Key Usage value the KDC certificate
1414 presented to the client must contain.
1415 (@b{Note} that if the KDC certificate has the pkinit
1416 SubjectAlternativeName encoded as the Kerberos TGS name, EKU checking
1417 is not necessary since the issuing CA has certified this as a KDC
1418 certificate.)
1419 The values recognized in the @code{krb5.conf} file are:
1420 @table @b
1421 @item kpKDC
1422 This is the default value and specifies that the KDC must have the
1423 id-pkinit-KPKdc EKU as defined in RFC4556.
1424 @item kpServerAuth
1425 If @code{kpServerAuth} is specified, a KDC certificate with the
1426 id-kp-serverAuth EKU as used by Microsoft will be accepted.
1427 @item none
1428 If @code{none} is specified, then the KDC certificate will not be
1429 checked to verify it has an acceptable EKU.  The use of this option
1430 is @b{not recommended}.
1431 @end table
1432
1433 @item pkinit_kdc_hostname
1434 The presense of this option indicates that the client is willing to
1435 accept a KDC certificate with a dNSName SAN (Subject Alternative Name)
1436 rather than requiring the id-pkinit-san as defined in RFC4556.  This
1437 option may be specified multiple times.  Its value should contain
1438 the acceptable hostname for the KDC (as contained in its certificate).
1439
1440 @item pkinit_cert_match
1441 Specifies matching rules that the client certificate must match before
1442 it is used to attempt pkinit authentication.  If a user has multiple
1443 certificates available (on a smart card, or via other media), there
1444 must be exactly one certificate chosen before attempting pkinit
1445 authentication.  This option may be specified multiple times.  All the
1446 available certificates are checked against each rule in order until
1447 there is a match of exactly one certificate.
1448
1449 The Subject and Issuer comparison strings are the RFC2253 string
1450 representations from the certificate Subject DN and Issuer DN values.
1451
1452 The syntax of the matching rules is:
1453 @example
1454 [@i{relation-operator}]@i{component-rule} @code{...}
1455 @end example
1456 where
1457 @table @i
1458 @item relation-operator
1459 can be either @code{&&}, meaning all component rules must match,
1460 or @code{||}, meaning only one component rule must match.
1461 The default is @code{&&} if not specified.
1462
1463 @item component-rule
1464 can be one of the following.  Note that there is no punctuation
1465 or whitespace between component rules.
1466 @table @b
1467 @item @code{<SUBJECT>}@i{regular-expression}
1468 @item @code{<ISSUER>}@i{regular-expression}
1469 @item @code{<SAN>}@i{regular-expression}
1470 @item @code{<EKU>}@i{extended-key-usage-list}
1471 where @i{extended-key-usage-list} is a comma-separated list of
1472 required Extended Key Usage values.  All values in the list must
1473 be present in the certificate.
1474 @smallexample
1475 @group
1476 @code{pkinit}
1477 @code{msScLogin}
1478 @code{clientAuth}
1479 @code{emailProtection}
1480 @end group
1481 @end smallexample
1482 @item @code{<KU>}@i{key-usage-list}
1483 where @i{key-usage-list} is a comma-separated list of required
1484 Key Usage values.  All values in the list must be present in
1485 the certificate.
1486 @smallexample
1487 @group
1488 @code{digitalSignature}
1489 @code{keyEncipherment}
1490 @end group
1491 @end smallexample
1492 @end table
1493 @end table
1494 Examples:
1495 @example
1496 pkinit_cert_match = ||<SUBJECT>.*DoE.*<SAN>.*@@EXAMPLE.COM
1497 pkinit_cert_match = &&<EKU>msScLogin,clientAuth<ISSUER>.*DoE.*
1498 pkinit_cert_match = <EKU>msScLogin,clientAuth<KU>digitalSignature
1499 @end example
1500 @end table
1501
1502 @node Sample krb5.conf File,  , pkinit client options, krb5.conf
1503 @subsection Sample krb5.conf File
1504
1505 Here is an example of a generic @code{krb5.conf} file:
1506
1507 @smallexample
1508 @group
1509 [libdefaults]
1510     default_realm = @value{PRIMARYREALM}
1511     default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc
1512     default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc
1513     dns_lookup_kdc = true
1514     dns_lookup_realm = false
1515
1516 [realms]
1517     @value{PRIMARYREALM} = @{
1518         kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN}
1519         kdc = @value{KDCSLAVE1}.@value{PRIMARYDOMAIN}
1520         kdc = @value{KDCSLAVE2}.@value{PRIMARYDOMAIN}:750
1521         admin_server = @value{KDCSERVER}.@value{PRIMARYDOMAIN}
1522         master_kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN}
1523         default_domain = @value{PRIMARYDOMAIN}
1524     @}
1525     @value{SECONDREALM} = @{
1526         kdc = @value{KDCSERVER}.@value{SECONDDOMAIN}
1527         kdc = @value{KDCSLAVE1}.@value{SECONDDOMAIN}
1528         admin_server = @value{KDCSERVER}.@value{SECONDDOMAIN}
1529     @}
1530     OPENLDAP.MIT.EDU = @{
1531         kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN}
1532         admin_server = @value{KDCSERVER}.@value{PRIMARYDOMAIN}
1533         database_module = openldap_ldapconf
1534     @}
1535
1536 [domain_realm]
1537 @ifset MIT
1538     .mit.edu = ATHENA.MIT.EDU
1539 @end ifset
1540     @value{PRIMARYDOMAIN} = @value{PRIMARYREALM}
1541
1542 [capaths]
1543     @value{PRIMARYREALM} = @{
1544         @value{SECONDREALM} = .
1545     @}
1546     @value{SECONDREALM} = @{
1547         @value{PRIMARYREALM} = .
1548     @}
1549
1550 [logging]
1551     kdc = SYSLOG:INFO
1552     admin_server = FILE=/var/kadm5.log
1553 [dbdefaults]
1554     ldap_kerberos_container_dn = cn=krbcontainer,dc=example,dc=com
1555 [dbmodules]
1556     openldap_ldapconf = @{
1557         db_library = kldap
1558         ldap_kerberos_container_dn = cn=krbcontainer,dc=example,dc=com
1559         ldap_kdc_dn = "cn=krbadmin,dc=example,dc=com"
1560             # this object needs to have read rights on
1561             # the realm container and principal subtrees
1562         ldap_kadmind_dn = "cn=krbadmin,dc=example,dc=com"
1563             # this object needs to have read and write rights on
1564             # the realm container and principal subtrees
1565         ldap_service_password_file = /etc/kerberos/service.keyfile
1566         ldap_servers = ldaps://kerberos.mit.edu
1567         ldap_conns_per_server = 5
1568 @}
1569
1570
1571
1572 @end group
1573 @end smallexample
1574
1575 @iftex
1576 @vfill
1577 @end iftex
1578
1579 @node kdc.conf,  , krb5.conf, Configuration Files
1580 @section kdc.conf
1581
1582 @include kdcconf.texinfo
1583
1584 @menu
1585 * kdcdefaults::                 
1586 * realms (kdc.conf)::           
1587 * pkinit kdc options::          
1588 * Sample kdc.conf File::        
1589 @end menu
1590
1591 @node kdcdefaults, realms (kdc.conf), kdc.conf, kdc.conf
1592 @subsection [kdcdefaults]
1593
1594 The following relation is defined in the [kdcdefaults] section:
1595
1596 @table @b
1597 @itemx kdc_ports
1598 This relation lists the ports on which the Kerberos server should
1599 listen for UDP requests by default.  This list is a comma separated
1600 list of integers.
1601 If this relation is not specified, the compiled-in default is
1602 @value{DefaultKdcPorts}, the first being the assigned Kerberos port
1603 and the second which was used by Kerberos V4.
1604
1605 @itemx kdc_tcp_ports
1606 This relation lists the ports on which the Kerberos server should
1607 listen for TCP connections by default.  This list is a comma separated
1608 list of integers.
1609 If this relation is not specified, the compiled-in default is not to
1610 listen for TCP connections at all.
1611
1612 If you wish to change this (which we do not recommend, because the
1613 current implementation has little protection against denial-of-service
1614 attacks), the standard port number assigned for Kerberos TCP traffic
1615 is port 88.
1616
1617 @itemx restrict_anonymous_to_tgt
1618 This flag determines the default value of restrict_anonymous_to_tgt for
1619 realms.  The default value is @code{false}.
1620 @end table
1621
1622 @node realms (kdc.conf), pkinit kdc options, kdcdefaults, kdc.conf
1623 @subsection [realms]
1624
1625 Each tag in the [realms] section of the file names a Kerberos realm.
1626 The value of the tag is a subsection where the relations in that
1627 subsection define KDC parameters for that particular realm.
1628
1629 For each realm, the following tags may be specified in the [realms]
1630 subsection:
1631
1632 @table @b
1633 @itemx acl_file
1634 (String.)  Location of the access control list (acl) file that kadmin
1635 uses to determine which principals are allowed which permissions on the
1636 database.  The default is @code{@value{DefaultAclFile}}.
1637
1638 @itemx admin_keytab
1639 (String.)  Location of the keytab file that the legacy administration
1640 daemons @code{kadmind4} and @code{v5passwdd} use to authenticate to
1641 the database.  The default is @code{@value{DefaultAdminKeytab}}.
1642
1643 @itemx default_principal_expiration
1644 (Absolute time string.)  Specifies the default expiration date of
1645 principals created in this realm.  The default value for this tag is
1646 @value{DefaultDefaultPrincipalExpiration}.
1647
1648 @itemx default_principal_flags 
1649 (Flag string.)  Specifies the default attributes of principals created
1650 in this realm.  The format for this string is a comma-separated list of
1651 flags, with '+' before each flag that should be enabled and '-' before
1652 each flag that should be disabled.   The default is
1653 @value{DefaultDefaultPrincipalFlags}.
1654
1655 There are a number of possible flags:
1656
1657 @table @b
1658 @itemx postdateable
1659 Enabling this flag allows the principal to obtain postdateable tickets.
1660
1661 @itemx forwardable
1662 Enabling this flag allows the principal to obtain forwardable tickets.
1663
1664 @itemx tgt-based
1665 Enabling this flag allows a principal to obtain tickets based on a
1666 ticket-granting-ticket, rather than repeating the authentication
1667 process that was used to obtain the TGT.
1668
1669 @itemx renewable
1670 Enabling this flag allows the principal to obtain renewable tickets.
1671
1672 @itemx proxiable
1673 Enabling this flag allows the principal to obtain proxy tickets.
1674
1675 @itemx dup-skey
1676 Enabling this flag allows the principal to obtain a session key for
1677 another user, permitting user-to-user authentication for this principal.
1678
1679 @itemx allow-tickets
1680 Enabling this flag means that the KDC will issue tickets for this
1681 principal.  Disabling this flag essentially deactivates the principal
1682 within this realm.
1683
1684 @itemx preauth
1685 If this flag is enabled on a client principal, then that principal is
1686 required to preauthenticate to the KDC before receiving any tickets.
1687 On a service principal, enabling this flag means that service tickets
1688 for this principal will only be issued to clients with a TGT that has
1689 the preauthenticated ticket set.
1690
1691 @itemx hwauth
1692 If this flag is enabled, then the principal is required to
1693 preauthenticate using a hardware device before receiving any tickets.
1694
1695 @itemx pwchange
1696 Enabling this flag forces a password change for this principal.
1697
1698 @itemx service
1699 Enabling this flag allows the the KDC to issue service tickets for this
1700 principal.
1701
1702 @itemx pwservice
1703 If this flag is enabled, it marks this principal as a password change
1704 service.  This should only be used in special cases, for example, if a
1705 user's password has expired, then the user has to get tickets for that
1706 principal without going through the normal password authentication in
1707 order to be able to change the password.
1708
1709 @end table
1710
1711 @itemx dict_file
1712 (String.)  Location of the dictionary file containing strings that are
1713 not allowed as passwords.  If none is specified or if there is no
1714 policy assigned to the principal, no dictionary checks of passwords
1715 will be performed.
1716
1717 @itemx kadmind_port
1718 (Port number.)  Specifies the port on which the kadmind daemon is to
1719 listen for this realm.  The assigned port for kadmind is
1720 @value{DefaultKadmindPort}.
1721
1722 @itemx kpasswd_port
1723 (Port number.)  Specifies the port on which the kpasswd daemon is to
1724 listen for this realm.  The default is @value{DefaultKpasswdPort}.
1725
1726 @itemx key_stash_file
1727 (String.)  Specifies the location where the master key has been stored
1728 (via @code{kdb5_util stash}).  The default is
1729 @code{@value{DefaultKeyStashFileStub}@i{REALM}}, where @i{REALM} is the
1730 Kerberos realm.
1731
1732 @itemx kdc_ports
1733 (String.)  Specifies the list of ports that the KDC is to listen to
1734 for UDP requests for this realm.  By default, the value of kdc_ports
1735 as specified in the [kdcdefaults] section is used.
1736
1737 @itemx kdc_tcp_ports
1738 (String.)  Specifies the list of ports that the KDC is to listen to
1739 for TCP requests for this realm.  By default, the value of
1740 kdc_tcp_ports as specified in the [kdcdefaults] section is used.
1741
1742 @itemx master_key_name
1743 (String.)  Specifies the name of the principal associated with the
1744 master key.  The default is @value{DefaultMasterKeyName}.
1745
1746 @itemx master_key_type
1747 (Key type string.)  Specifies the master key's key type.  The default
1748 value for this is @value{DefaultMasterKeyType}.  For a list of all
1749 possible values, see @ref{Supported Encryption Types}.
1750
1751 @itemx max_life
1752 (Delta time string.)  Specifes the maximum time period for which a
1753 ticket may be valid in this realm.  The default value is
1754 @value{DefaultMaxLife}.
1755
1756 @itemx max_renewable_life
1757 (Delta time string.)  Specifies the maximum time period during which a
1758 valid ticket may be renewed in this realm.  The default value is
1759 @value{DefaultMaxRenewableLife}.
1760
1761 @itemx supported_enctypes
1762 List of key:salt strings.  Specifies the default key/salt combinations of
1763 principals for this realm.  Any principals created through @code{kadmin}
1764 will have keys of these types.  The default value for this tag is
1765 @value{DefaultSupportedEnctypes}. For lists of possible values, see
1766 @ref{Supported Encryption Types} and @ref{Salts}.
1767
1768 @itemx reject_bad_transit
1769 A boolean value (@code{true}, @code{false}).  If set to @code{true}, the
1770 KDC will check the list of transited realms for cross-realm tickets
1771 against the transit path computed from the realm names and the
1772 @code{capaths} section of its @code{krb5.conf} file; if the path in the
1773 ticket to be issued contains any realms not in the computed path, the
1774 ticket will not be issued, and an error will be returned to the client
1775 instead.  If this value is set to @code{false}, such tickets will be
1776 issued anyways, and it will be left up to the application server to
1777 validate the realm transit path.
1778
1779 If the @code{disable-transited-check} flag is set in the incoming
1780 request, this check is not performed at all.  Having the
1781 @code{reject_bad_transit} option will cause such ticket requests to be
1782 rejected always.
1783
1784 This transit path checking and config file option currently apply only
1785 to TGS requests.
1786
1787 Earlier versions of the MIT release (before 1.2.3) had bugs in the
1788 application server support such that the server-side checks may not be
1789 performed correctly.  We recommend turning this option on, unless you
1790 know that all application servers in this realm have been updated to
1791 fixed versions of the software, and for whatever reason, you don't want
1792 the KDC to do the validation.
1793
1794 This is a per-realm option so that multiple-realm KDCs may control it
1795 separately for each realm, in case (for example) one realm has had the
1796 software on its application servers updated but another has not.
1797
1798 This option defaults to @code{true}.
1799
1800 @itemx restrict_anonymous_to_tgt
1801 A boolean value (@code{true}, @code{false}).  If set to @code{true}, the
1802 KDC will reject ticket requests from anonymous principals to service
1803 principals other than the realm's ticket-granting service.  This option
1804 allows anonymous PKINIT to be enabled for use as FAST armor tickets
1805 without allowing anonymous authentication to services.  By default, the
1806 value of restrict_anonymous_to_tgt as specified in the [kdcdefaults]
1807 section is used.
1808
1809 @end table
1810
1811 @node pkinit kdc options, Sample kdc.conf File, realms (kdc.conf), kdc.conf
1812 @subsection pkinit options
1813
1814 @menu
1815 * pkinit kdc.conf options::     
1816 @end menu
1817
1818 The following are @b{pkinit-specific} options.
1819 Note that these values may be specified in @code{[kdcdefaults]}
1820 as global defaults,
1821 or within a realm-specific subsection of @code{[realms]}.
1822 Also note that a realm-specific value over-rides, does not add to,
1823 a generic @code{[kdcdefaults]} specification.
1824 The search order is:
1825 @enumerate
1826 @item realm-specific subsection of @code{[realms]}
1827 @smallexample
1828 @group
1829 [realms]
1830     EXAMPLE.COM = @{
1831         pkinit_anchors = FILE:/usr/local/example.com.crt
1832     @}
1833 @end group
1834 @end smallexample
1835
1836 @item generic value in the @code{[kdcdefaults]} section.
1837 @smallexample
1838 @group
1839 [kdcdefaults]
1840     pkinit_anchors = DIR:/usr/local/generic_trusted_cas/
1841 @end group
1842 @end smallexample
1843 @end enumerate
1844
1845 @node pkinit kdc.conf options,  , pkinit kdc options, pkinit kdc options
1846 @subsubsection pkinit kdc.conf options
1847
1848 For information about the syntax of some of these options,
1849 see @xref{pkinit identity syntax}.
1850
1851 @table @b
1852 @item pkinit_identity
1853 Specifies the location of the KDC's X.509 identity information.
1854 This option is @b{required} if pkinit is to be supported by the
1855 KDC.
1856
1857 @item pkinit_anchors
1858 Specifies the location of trusted anchor (root) certificates
1859 which the KDC trusts to sign client certificates.
1860 This option is @b{required} if pkinit is to be supported by the
1861 KDC.
1862 This option may be specified multiple times.
1863
1864 @item pkinit_pool
1865 Specifies the location of intermediate certificates which may be
1866 used by the KDC to complete the trust chain between a client's
1867 certificate and a trusted anchor.
1868 This option may be specified multiple times.
1869
1870 @item pkinit_revoke
1871 Specifies the location of Certificate Revocation List (CRL)
1872 information to be used by the KDC when verifying the validity
1873 of client certificates.
1874 This option may be specified multiple times.
1875
1876 @item pkinit_require_crl_checking
1877 The default certificate verification process will always check
1878 the available revocation information to see if a certificate has
1879 been revoked.  If a match is found for the certificate in a CRL,
1880 verification fails.  If the certificate being verified is not listed
1881 in a CRL, or there is no CRL present for its issuing CA,
1882 and @code{pkinit_require_crl_checking} is @code{false},
1883 then verification succeeds.
1884
1885 However, if @code{pkinit_require_crl_checking} is @code{true} and
1886 there is no CRL information available for the issuing CA,
1887 then verification fails.
1888
1889 @code{pkinit_require_crl_checking} should be set to @code{true}
1890 if the policy is such that up-to-date CRLs @b{must} be present for
1891 every CA.
1892
1893 @item pkinit_dh_min_bits
1894 Specifies the minimum number of bits the KDC is willing to accept
1895 for a client's Diffie-Hellman key.  The default is 2048.
1896
1897 @item pkinit_allow_upn
1898 Specifies that the KDC is willing to accept client certificates with
1899 the Microsoft UserPrincipalName (UPN) Subject Alternative Name
1900 (SAN).  This means the KDC accepts the binding of the UPN in the
1901 certificate to the Kerberos principal name.
1902
1903 The default is false.
1904
1905 Without this option, the KDC will only
1906 accept certificates with the id-pkinit-san as defined in RFC4556.
1907 There is currently no option to disable SAN checking in the KDC.
1908
1909 @item pkinit_eku_checking
1910 This option specifies what Extended Key Usage (EKU) values the
1911 KDC is willing to accept in client certificates.
1912 The values recognized in the @code{kdc.conf} file are:
1913 @table @b
1914 @item kpClientAuth
1915 This is the default value and specifies that client certificates must
1916 have the id-pkinit-KPClientAuth EKU as defined in RFC4556.
1917 @item scLogin
1918 If @code{scLogin} is specified, client certificates with the
1919 Microsoft Smart Card Login EKU (id-ms-kp-sc-logon) will be accepted.
1920 @item none
1921 If @code{none} is specified, then client certificates will not be
1922 checked to verify they have an acceptable EKU.
1923 The use of this option is @b{not recommended}.
1924 @end table
1925 @end table
1926
1927 @node Sample kdc.conf File,  , pkinit kdc options, kdc.conf
1928 @subsection Sample kdc.conf File
1929
1930 Here's an example of a @code{kdc.conf} file:
1931
1932 @smallexample
1933 @group
1934 [kdcdefaults]
1935     kdc_ports = 88
1936
1937 [realms]
1938     @value{PRIMARYREALM} = @{
1939         kadmind_port = 749
1940         max_life = 12h 0m 0s
1941         max_renewable_life = 7d 0h 0m 0s
1942         master_key_type = des3-hmac-sha1
1943         supported_enctypes = des3-hmac-sha1:normal des-cbc-crc:normal des-cbc-crc:v4
1944     @}
1945
1946 [logging]
1947     kdc = FILE:@value{ROOTDIR}/var/krb5kdc/kdc.log
1948     admin_server = FILE:@value{ROOTDIR}/var/krb5kdc/kadmin.log
1949
1950 @end group
1951 @end smallexample
1952
1953 @node Using DNS, Administrating the Kerberos Database, Configuration Files, Top
1954 @chapter Using DNS
1955
1956 @menu
1957 * Mapping Hostnames onto Kerberos Realms::  
1958 * Hostnames for KDCs::          
1959 @end menu
1960
1961 @node Mapping Hostnames onto Kerberos Realms, Hostnames for KDCs, Using DNS, Using DNS
1962 @section Mapping Hostnames onto Kerberos Realms
1963
1964 @include dnstxt.texinfo
1965
1966 @node Hostnames for KDCs,  , Mapping Hostnames onto Kerberos Realms, Using DNS
1967 @section Hostnames for KDCs
1968
1969 @include dnssrv.texinfo
1970
1971 @node Administrating the Kerberos Database, Configuring Kerberos with OpenLDAP back-end, Using DNS, Top
1972 @chapter Administrating the Kerberos Database
1973
1974 Your Kerberos database contains all of your realm's Kerberos principals,
1975 their passwords, and other administrative information about each
1976 principal.  For the most part, you will use the @code{kdb5_util} program
1977 to manipulate the Kerberos database as a whole, and the @code{kadmin}
1978 program to make changes to the entries in the database.  (One notable
1979 exception is that users will use the @code{kpasswd} program to change
1980 their own passwords.)  The @code{kadmin} program has its own
1981 command-line interface, to which you type the database administrating
1982 commands.
1983
1984 @code{Kdb5_util} provides a means to create, delete, load, or dump a
1985 Kerberos database.  It also includes a command to stash a copy of the
1986 master database key in a file on a KDC, so that the KDC can authenticate
1987 itself to the @code{kadmind} and @code{krb5kdc} daemons at boot time.
1988
1989 @code{Kadmin} provides for the maintenance of Kerberos principals, KADM5
1990 policies, and service key tables (keytabs).  It exists as both a
1991 Kerberos client, @code{kadmin}, using Kerberos authentication and an
1992 RPC, to operate securely from anywhere on the network, and as a local
1993 client, @code{kadmin.local}, intended to run directly on the KDC without
1994 Kerberos authentication.  @code{kadmin.local} need not run on the kdc if 
1995 the database is LDAP. Other than the fact that the remote client uses 
1996 Kerberos to authenticate the person using it, the functionalities of the two
1997 versions are identical. The local version is necessary to enable you to set up 
1998 enough of the database to be able to use the remote version. 
1999 It replaces the now obsolete @code{kdb5_edit} (except for
2000 database dump and load, which are provided by @code{kdb5_util}).
2001
2002 The remote version authenticates to the KADM5 server using the service
2003 principal @code{kadmin/admin}.  If the credentials cache contains a
2004 ticket for the @code{kadmin/admin} principal, and the @samp{-c ccache}
2005 option is specified, that ticket is used to authenticate to KADM5.
2006 Otherwise, the @samp{-p} and @samp{-k} options are used to specify the
2007 client Kerberos principal name used to authenticate.  Once kadmin has
2008 determined the principal name, it requests a @code{kadmin/admin}
2009 Kerberos service ticket from the KDC, and uses that service ticket to
2010 authenticate to KADM5.
2011
2012 @menu
2013 * Kadmin Options::              
2014 * Date Format::                 
2015 * Principals::                  
2016 * Policies::                    
2017 * Global Operations on the Kerberos Database::  
2018 * Global Operations on the Kerberos LDAP Database::  
2019 * Cross-realm Authentication::  
2020 * Changing the krbtgt Key::     
2021 @end menu
2022
2023 @node Kadmin Options, Date Format, Administrating the Kerberos Database, Administrating the Kerberos Database
2024 @section Kadmin Options
2025
2026 You can invoke @code{kadmin} or @code{kadmin.local} with any of the
2027 following options:
2028
2029 @table @b
2030 @item @b{-r} @i{REALM}
2031 Use @i{REALM} as the default Kerberos realm for the database.
2032
2033 @item @b{-p} @i{principal}
2034 Use the Kerberos principal @i{principal} to authenticate to Kerberos.
2035 If this option is not given, @code{kadmin} will append @code{admin} to
2036 either the primary principal name, the environment variable USER, or to
2037 the username obtained from @code{getpwuid}, in order of preference.
2038
2039 @item @b{-q} @i{query}
2040 Pass @i{query} directly to @code{kadmin}.  This is useful for writing
2041 scripts that pass specific queries to @code{kadmin}.
2042
2043 @noindent
2044 You can invoke @code{kadmin} with any of the following options:
2045
2046 @item @b{-k} [@b{-t} @i{keytab}]
2047 Use the keytab @i{keytab} to decrypt the KDC response instead of
2048 prompting for a password on the TTY.  In this case, the principal will
2049 be @samp{host/@i{hostname}}.  If @b{-t} is not used to specify a keytab,
2050 then the default keytab will be used.
2051
2052 @item @b{-c} @i{credentials cache}
2053 Use @i{credentials_cache} as the credentials cache.  The credentials
2054 cache should contain a service ticket for the @code{kadmin/admin}
2055 service, which can be acquired with the @code{kinit} program.  If this
2056 option is not specified, @code{kadmin} requests a new service ticket
2057 from the KDC, and stores it in its own temporary ccache.
2058
2059 @item @b{-w} @i{password}
2060 Use @i{password} as the password instead of prompting for one on the
2061 TTY.  Note:  placing the password for a Kerberos principal with
2062 administration access into a shell script can be dangerous if
2063 unauthorized users gain read access to the script.
2064
2065 @item @b{-x} @i{db_args}
2066 Specifies the database specific arguments.
2067
2068 @item @b{-x} @i{host=<hostname>}
2069 Specifies the LDAP server to connect to by a LDAP URI. It is recommend to use 
2070 ldapi:// or ldaps:// interface to connect to the LDAP server.
2071
2072 @item @b{-x} @i{binddn=<bind_dn>}
2073 Specifies the Distinguished Name (DN) of the object used by the administration server to bind to the LDAP server. This object should have the read and write rights on the realm container, principal container and realm subtree.
2074
2075 @item @b{-x} @i{bindpwd=<bind_password>}
2076 Specifies the password for the above mentioned binddn. It is recommended not to 
2077 use this option. Instead, the password can be stashed using the 
2078 stashsrvpw command of kdb5_ldap_util. 
2079
2080 Note: This database specific argument is applicable only to kadmin.local 
2081 and the KADM5 server. 
2082
2083 @item @b{-s} @i{admin_server[:port]}
2084 Specifies the admin server that kadmin should contact.
2085
2086 @noindent
2087 You can invoke @code{kadmin.local} with an of the follwing options:
2088
2089 @item @b{-d_ @i{dbname}}
2090 Specifies the name of the Kerberos database.
2091
2092 @item @b{-e} @i{"enctypes ..."}
2093 Sets the list of cryptosystem and salt types to be used for any new
2094 keys created.  See @ref{Supported Encryption Types} and @ref{Salts} for
2095 available types.
2096
2097 @item @b{-m}
2098 Do not authenticate using a keytab.  This option will cause kadmin to
2099 prompt for the master database password.
2100  
2101 @end table
2102
2103 @node Date Format, Principals, Kadmin Options, Administrating the Kerberos Database
2104 @section Date Format
2105
2106 Many of the @code{kadmin} commands take a duration or time as an
2107 argument.  The date can appear in a wide variety of formats, such as:
2108
2109 @smallexample
2110 @group
2111 "15 minutes"
2112 "7 days"
2113 "1 month"
2114 "2 hours"
2115 "400000 seconds"
2116 "next year"
2117 "this Monday"
2118 "next Monday"
2119 yesterday
2120 tomorrow
2121 now
2122 "second Monday"
2123 fortnight
2124 "3/31/1992 10:00:07 PST"
2125 "January 23, 2007 10:05pm"
2126 "22:00 GMT"
2127 @end group
2128 @end smallexample
2129
2130 Note that if the date specification contains spaces, you must enclose it
2131 in double quotes.  Note also that you cannot use a number without a
2132 unit.  (I.e., ``"60 seconds"'' is correct, but ``60'' is incorrect.)
2133 All keywords are case-insensitive.  The following is a list of all of
2134 the allowable keywords.
2135
2136 @table @b
2137 @item Months
2138 january, jan, february, feb, march, mar, april, apr, may, june, jun,
2139 july, jul, august, aug, september, sep, sept, october, oct, november,
2140 nov, december, dec
2141
2142 @item Days
2143 sunday, sun, monday, mon, tuesday, tues, tue, wednesday, wednes, wed,
2144 thursday, thurs, thur, thu, friday, fri, saturday, sat
2145
2146 @item Units
2147 year, month, fortnight, week, day, hour, minute, min, second, sec
2148
2149 @item Relative 
2150 tomorrow, yesterday, today, now, last, this, next, first, second,
2151 third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh,
2152 twelfth, ago
2153
2154 @item Time Zones
2155 @code{kadmin} recognizes abbreviations for most of the world's time
2156 zones.  A complete listing appears in @ref{kadmin Time Zones}.
2157
2158 @item 12-hour Time Delimiters
2159 am, pm
2160 @end table
2161
2162 @node Principals, Policies, Date Format, Administrating the Kerberos Database
2163 @section Principals
2164
2165 Each entry in the Kerberos database contains a Kerberos principal
2166 (@pxref{Definitions}) and the attributes and policies associated with
2167 that principal.
2168
2169 @menu
2170 * Retrieving Information About a Principal::  
2171 * Privileges::                  
2172 * Adding or Modifying Principals::  
2173 * Deleting Principals::         
2174 * Changing Passwords::          
2175 @end menu
2176
2177 @node Retrieving Information About a Principal, Privileges, Principals, Principals
2178 @subsection Retrieving Information About a Principal
2179
2180 @menu
2181 * Attributes::                  
2182 * Retrieving a List of Principals::  
2183 @end menu
2184
2185 @node Attributes, Retrieving a List of Principals, Retrieving Information About a Principal, Retrieving Information About a Principal
2186 @subsubsection Attributes
2187
2188 To retrieve a listing of the attributes and/or policies associated with
2189 a principal, use the @code{kadmin} @code{get_principal} command, which
2190 requires the ``inquire'' administrative privilege.  The syntax is:
2191
2192 @smallexample
2193 @b{get_principal} @i{principal}
2194 @end smallexample
2195
2196 @noindent 
2197 The @code{get_principal} command has the alias @code{getprinc}.
2198
2199 For example, suppose you wanted to view the attributes of the
2200 principal @* @code{@value{RANDOMUSER1}/root@@@value{PRIMARYREALM}}.
2201   You would type:
2202
2203 @smallexample
2204 @group
2205 @b{shell%} kadmin
2206 @b{kadmin:} getprinc @value{RANDOMUSER1}/root
2207 @b{Principal: @value{RANDOMUSER1}/root@@@value{PRIMARYREALM}
2208 Expiration date: [never]
2209 Last password change: Mon Jan 31 02:06:40 EDT 2002
2210 Password Expiration date: [none]
2211 Maximum ticket life: 0 days 10:00:00
2212 Maximum renewable life: 7 days 00:00:00
2213 Last modified: Wed Jul 24 14:46:25 EDT 2002 (@value{ADMINUSER}/admin@@@value{PRIMARYREALM})
2214 Last successful authentication: Mon Jul 29 18:20:17 EDT 2002
2215 Last failed authentication: Mon Jul 29 18:18:54 EDT 2002
2216 Failed password attempts: 3
2217 Number of keys: 2
2218 Key: vno 2, Triple DES cbc mode with HMAC/sha1, no salt
2219 Key: vno 2, DES cbc mode with CRC-32, no salt
2220 Attributes: DISALLOW_FORWARDABLE, DISALLOW_PROXIABLE
2221 Policy: [none]
2222 kadmin:}
2223 @end group
2224 @end smallexample
2225
2226 The @code{get_principal} command has a @code{-terse} option, which lists
2227 the fields as a quoted, tab-separated string.  For example:
2228
2229 @smallexample
2230 @group
2231 @b{kadmin:} getprinc -terse @value{RANDOMUSER1}/root
2232 @b{@value{RANDOMUSER1}/root@@@value{PRIMARYREALM}       0       1027458564
2233 0       36000    (@value{ADMINUSER}/admin@@@value{PRIMARYREALM}
2234 1027536385      18      2       0       [none]  604800  1027980137
2235 1027980054      3       2       1       2       16      0       1
2236 2       1       0
2237 kadmin:}
2238 @end group
2239 @end smallexample
2240
2241 @node Retrieving a List of Principals,  , Attributes, Retrieving Information About a Principal
2242 @subsubsection Retrieving a List of Principals
2243
2244 To generate a listing of principals, use the @code{kadmin}
2245 @code{list_principals} command, which requires the ``list'' privilege.
2246 The syntax is:
2247
2248 @smallexample
2249 @b{list_principals} [@i{expression}]
2250 @end smallexample
2251
2252 @noindent where @i{expression} is a shell-style glob expression that
2253 can contain the characters @samp{*}, @samp{?}, @samp{[}, and @samp{]}.
2254 All policy names matching the expression are displayed.  The
2255 @code{list_principals} command has the aliases @code{listprincs},
2256 @code{get_principals}, and @code{getprincs}.  For example:
2257
2258 @smallexample
2259 @group
2260 @b{kadmin:} listprincs test*
2261 @b{test3@@@value{PRIMARYREALM}
2262 test2@@@value{PRIMARYREALM}
2263 test1@@@value{PRIMARYREALM}
2264 testuser@@@value{PRIMARYREALM}
2265 kadmin:}
2266 @end group
2267 @end smallexample
2268
2269 @noindent 
2270 If no expression is provided, all principals are printed.
2271
2272 @node Privileges, Adding or Modifying Principals, Retrieving Information About a Principal, Principals
2273 @subsection Privileges
2274
2275 Administrative privileges for the Kerberos database are stored in the
2276 file @code{kadm5.acl}.  
2277
2278 @include kadm5acl.texinfo
2279
2280 @node Adding or Modifying Principals, Deleting Principals, Privileges, Principals
2281 @subsection Adding or Modifying Principals
2282
2283 To add a principal to the database, use the kadmin @code{add_principal}
2284 command, which requires the ``add'' administrative privilege.  This
2285 function creates the new principal, prompting twice for a password, and,
2286 if neither the -policy nor -clearpolicy options are specified and the
2287 policy ``default'' exists, assigns it that policy.  The syntax is:
2288
2289 @smallexample
2290 @b{kadmin:} add_principal [@i{options}] @i{principal}
2291 @end smallexample
2292
2293 To modify attributes of a principal, use the kadmin
2294 @code{modify_principal} command, which requires the ``modify''
2295 administrative privilege.  The syntax is:
2296
2297 @smallexample
2298 @b{kadmin:} modify_principal [@i{options}] @i{principal}
2299 @end smallexample
2300
2301 @noindent
2302 @code{add_principal} has the aliases @code{addprinc} and
2303 @code{ank}@footnote{@code{ank} was the short form of the equivalent
2304 command using the deprecated @code{kadmin5} database administrative tool.
2305 It has been kept}.  @code{modify_principal} has the alias @code{modprinc}.
2306
2307 The @code{add_principal} and @code{modify_principal} commands take the
2308 following switches:
2309
2310 @table @b
2311 @item @b{-x} @i{db_princ_args}
2312 Denotes the database specific options. 
2313 @noindent 
2314 The options for LDAP database are:
2315 @table @b
2316 @item @b{-x} @i{dn=<dn>}
2317 Specifies the  LDAP object that will contain the Kerberos principal being created.
2318
2319 @item @b{-x} @i{linkdn=<dn>}
2320 Specifies the LDAP object  to which the newly created Kerberos principal object will point to.
2321
2322 @item @b{-x} @i{containerdn=<container_dn>}
2323 Specifies the  container object under which the Kerberos principal is to be created. 
2324
2325 @item @b{-x} @i{tktpolicy=<policy>}
2326 Associates a ticket policy to the Kerberos principal. Specifying an empty string 
2327 value clears the ticket policy associated with the principal.
2328 @noindent
2329 Note: 
2330 @noindent
2331 * dn and containerdn options are not valid while modifying the principal.
2332 @noindent
2333 * containerdn and linkdn options cannot be specified with dn option.      
2334 @noindent
2335 *  If dn or containerdn options are not specified while adding the principal, the principals are created   
2336    under the prinicipal container configured in the realm or the realm container.
2337 * dn and containerdn should be within the subtrees or principal container configured in the realm.
2338 @end table
2339  
2340 @item -expire @i{date}
2341 Sets the expiration date of the principal to @i{date}.
2342
2343 @item -pwexpire @i{date}
2344 Sets the expiration date of the password to @i{date}.
2345
2346 @item -maxlife @i{maxlife}
2347 Sets the maximum ticket life of the principal to @i{maxlife}.
2348
2349 @item -maxrenewlife @i{maxrenewlife}
2350 Sets the maximum renewable life of tickets for the principal to
2351 @i{maxrenewlife}.
2352
2353 @item -kvno @i{number}
2354 Explicity sets the key version number to @i{number}.  @value{COMPANY}
2355 does not recommend doing this unless there is a specific reason.
2356
2357 @item -policy @i{policy}
2358 Sets the policy used by this principal.  (@xref{Policies}.)  With
2359 @code{modify_principal}, the current policy assigned to the principal is
2360 set or changed.  With @code{add_principal}, if this option is not
2361 supplied, the -clearpolicy is not specified, and the policy ``default''
2362 exists, that policy is assigned.  If a principal is created with no
2363 policy, @code{kadmin} will print a warning message.
2364
2365 @item -clearpolicy
2366 For @code{modify_principal}, removes the current policy from a
2367 principal.  For @code{add_principal}, suppresses the automatic
2368 assignment of the policy ``default''.
2369
2370 @item @{-|+@}allow_postdated
2371 The ``-allow_postdated'' option prohibits this principal from obtaining
2372 postdated tickets.  ``+allow_postdated'' clears this flag.  In effect,
2373 ``-allow_postdated'' sets the KRB5_KDB_DISALLOW_POSTDATED flag on the
2374 principal in the database.
2375
2376 @item @{-|+@}allow_forwardable
2377 The ``-allow_forwardable'' option prohibits this principal from
2378 obtaining forwardable tickets.  ``+allow_forwardable'' clears this flag.
2379 In effect, ``-allow_forwardable'' sets the KRB5_KDB_DISALLOW_FORWARDABLE
2380 flag on the principal in the database.
2381
2382 @item @{-|+@}allow_renewable
2383 The ``-allow_renewable'' option prohibits this principal from obtaining
2384 renewable tickets.  ``+allow_renewable'' clears this flag.  In effect,
2385 ``-allow_renewable'' sets the KRB5_KDB_DISALLOW_RENEWABLE flag on the
2386 principal in the database.
2387
2388 @item @{-|+@}allow_proxiable
2389 The ``-allow_proxiable'' option prohibits this principal from obtaining
2390 proxiable tickets.  ``+allow_proxiable'' clears this flag.  In effect,
2391 ``-allow_proxiable'' sets the @* KRB5_KDB_DISALLOW_PROXIABLE flag. on
2392 the principal in the database.
2393
2394 @item @{-|+@}allow_dup_skey
2395 The ``-allow_dup_skey'' option disables user-to-user authentication for
2396 this principal by prohibiting this principal from obtaining a session
2397 key for another user.  ``+allow_dup_skey'' clears this flag.  In effect,
2398 ``-allow_dup_skey'' sets the @* KRB5_KDB_DISALLOW_DUP_SKEY flag on the
2399 principal in the database.
2400
2401 @item @{-|+@}requires_preauth
2402 The ``+requires_preauth'' option requires this principal to
2403 preauthenticate before being allowed to kinit.  -requires_preauth clears
2404 this flag.  In effect, +requires_preauth sets the
2405 KRB5_KDB_REQUIRES_PRE_AUTH flag on the principal in the database.
2406
2407 @item @{-|+@}requires_hwauth
2408 The ``+requires_hwauth'' flag requires the principal to preauthenticate
2409 using a hardware device before being allowed to kinit.
2410 ``-requires_hwauth'' clears this flag.  In effect, ``+requires_hwauth''
2411 sets the KRB5_KDB_REQUIRES_HW_AUTH flag on the principal in the
2412 database.
2413
2414 @item @{-|+@}allow_svr
2415 The ``-allow_svr'' flag prohibits the issuance of service tickets for
2416 this principal.  ``+allow_svr'' clears this flag.  In effect,
2417 ``-allow_svr'' sets the @* KRB5_KDB_DISALLOW_SVR flag on the principal
2418 in the database.
2419
2420 @item @{-|+@}allow_tgs_req
2421 The ``-allow_tgs_req'' option specifies that a Ticket-Granting Service
2422 (TGS) request for a service ticket for this principal is not permitted.
2423 You will probably never need to use this option.  ``+allow_tgs_req''
2424 clears this flag.  The default is ``+allow_tgs_req''.  In effect,
2425 ``-allow_tgs_req'' sets the KRB5_KDB_DISALLOW_TGT_BASED flag on the
2426 principal in the database.
2427
2428 @item @{-|+@}allow_tix
2429 The ``-allow_tix'' option forbids the issuance of any tickets for this
2430 principal.  ``+allow_tix'' clears this flag.  The default is
2431 ``+allow_tix''.  In effect, ``-allow_tix'' sets the @*
2432 KRB5_KDB_DISALLOW_ALL_TIX flag on the principal in the database.
2433
2434 @item @{-|+@}needchange
2435 The ``+needchange'' option sets a flag in attributes field to force a
2436 password change; ``-needchange'' clears it.  The default is
2437 ``-needchange''.  In effect, ``+needchange'' sets the
2438 KRB5_KDB_REQUIRES_PWCHANGE flag on the principal in the database.
2439
2440 @item @{-|+@}password_changing_service
2441 The ``+password_changing_service'' option sets a flag in the attributes
2442 field marking this principal as a password change service. (Again, you
2443 will probably never need to use this option.)
2444 ``-password_changing_service'' clears the flag.  The default is
2445 ``-password_changing_service''.  In effect, the
2446 ``+password_changing_service'' option sets the KRB5_KDB_PWCHANGE_SERVICE
2447 flag on the principal in the database.
2448
2449 @item @{-|+@}ok_as_delegate
2450 The ``+ok_as_delegate'' option sets a flag in tickets issued for the
2451 service principal.  Some client programs may recognize this flag as
2452 indicating that it is okay to delegate credentials to the service.  If
2453 ok_as_delegate is set on a cross-realm TGT, it indicates that the
2454 foreign realm's ok_as_delegate flags should be honored by clients in
2455 the local realm.  The default is ``-ok_as_delegate''.
2456
2457 @item -randkey
2458 Sets the key for the principal to a random value (@code{add_principal}
2459 only).  @value{COMPANY} recommends using this option for host keys.
2460
2461 @item -pw @i{password}
2462 Sets the key of the principal to the specified string and does not
2463 prompt for a password (@code{add_principal} only).  @value{COMPANY} does
2464 not recommend using this option.
2465
2466 @item -e @i{enc:salt...}
2467 Uses the specified list of enctype-salttype pairs for setting the key
2468 of the principal.  The quotes are necessary if there are multiple
2469 enctype-salttype pairs.  This will not function against kadmin daemons
2470 earlier than krb5-1.2.  See @ref{Supported Encryption Types} and
2471 @ref{Salts} for available types.
2472
2473 @item -unlock
2474 Unlocks a locked principal (one which has received too many failed
2475 authentication attempts without enough time between them according to
2476 its password policy) so that it can successfully authenticate.
2477 @end table
2478
2479 If you want to just use the default values, all you need to do is:
2480
2481 @smallexample
2482 @group
2483 @b{kadmin:} addprinc @value{RANDOMUSER1}
2484 @b{WARNING: no policy specified for "@value{RANDOMUSER1}@@@value{PRIMARYREALM}";
2485 defaulting to no policy.}
2486 @iftex
2487 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type the password.}
2488 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type it again.}
2489 @end iftex
2490 @ifinfo
2491 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2492 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2493 @end ifinfo
2494 @ifhtml
2495 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2496 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2497 @end ifhtml
2498 @b{Principal "@value{RANDOMUSER1}@@@value{PRIMARYREALM}" created.
2499 kadmin:}
2500 @end group
2501 @end smallexample
2502
2503 If you want to create a principal which is contained by a  LDAP object, all you need to do is:
2504
2505 @smallexample
2506 @group
2507 @b{kadmin:} addprinc -x dn=cn=@value{RANDOMUSER1},dc=example,dc=com @value{RANDOMUSER1}
2508 @b{WARNING: no policy specified for "@value{RANDOMUSER1}@@@value{PRIMARYREALM}";
2509 defaulting to no policy.}
2510 @iftex
2511 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type the password.}
2512 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type it again.}
2513 @end iftex
2514 @ifinfo
2515 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2516 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2517 @end ifinfo
2518 @ifhtml
2519 @b{Enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2520 @b{Re-enter password for principal @value{RANDOMUSER1}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2521 @end ifhtml
2522 @b{Principal "@value{RANDOMUSER1}@@@value{PRIMARYREALM}" created.
2523 kadmin:}
2524 @end group
2525 @end smallexample
2526
2527 If you want to create a principal under a specific LDAP container and link to an existing LDAP object, all you need to do is:
2528
2529 @smallexample
2530 @group
2531 @b{kadmin:} addprinc -x containerdn=dc=example,dc=com -x linkdn=cn=@value{RANDOMUSER2},dc=example,dc=com @value{RANDOMUSER2}
2532 @b{WARNING: no policy specified for "@value{RANDOMUSER2}@@@value{PRIMARYREALM}";
2533 defaulting to no policy.}
2534 @iftex
2535 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type the password.}
2536 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type it again.}
2537 @end iftex
2538 @ifinfo
2539 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2540 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2541 @end ifinfo
2542 @ifhtml
2543 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2544 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<=Type it again.}
2545 @end ifhtml
2546 @b{Principal "@value{RANDOMUSER2}@@@value{PRIMARYREALM}" created.
2547 kadmin:}
2548 @end group
2549 @end smallexample
2550
2551 If you want to associate a ticket policy to a principal, all you need to do is:
2552
2553 @smallexample
2554 @group
2555 @b{kadmin:} modprinc -x tktpolicy=userpolicy @value{RANDOMUSER2}
2556 @b{Principal "@value{RANDOMUSER2}@@@value{PRIMARYREALM}" modified.
2557 kadmin:}
2558 @end group
2559 @end smallexample
2560
2561 If, on the other hand, you want to set up an account that expires on
2562 January 1, 2000, that uses a policy called ``stduser'', with a temporary
2563 password (which you want the user to change immediately), you would type
2564 the following.  (Note:  each line beginning with @result{} is a
2565 continuation of the previous line.)
2566
2567 @smallexample
2568 @group
2569
2570 @b{kadmin:} addprinc @value{RANDOMUSER2} -expire "1/1/2000 12:01am EST" -policy stduser 
2571 @result{}  +needchange 
2572 @iftex
2573 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type the password.}
2574 @b{Re-enter password for principal
2575 @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type it again.}
2576 @end iftex
2577 @ifinfo
2578 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2579 @b{Re-enter password for principal
2580 @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type it again.}
2581 @end ifinfo
2582 @ifhtml
2583 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the password.}
2584 @b{Re-enter password for principal
2585 @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type it again.}
2586 @end ifhtml
2587 @b{Principal "@value{RANDOMUSER2}@@@value{PRIMARYREALM}" created.
2588 kadmin:}
2589
2590 @end group
2591 @end smallexample
2592
2593 If you will need cross-realm authentication, you need to add principals
2594 for the other realm's TGT to each realm.  For example, if you need to
2595 do cross-realm authentication between the realms @value{PRIMARYREALM}
2596 and @value{SECONDREALM}, you would need to add the principals @*
2597 @samp{krbtgt/@value{SECONDREALM}@@@value{PRIMARYREALM}} and
2598 @samp{krbtgt/@value{PRIMARYREALM}@@@value{SECONDREALM}} to both
2599 databases.  You need to be sure the passwords and the key version
2600 numbers (kvno) are the same in both databases.  This may require
2601 explicitly setting the kvno with the @samp{-kvno} option.  See
2602 @ref{Cross-realm Authentication} for more details.
2603
2604 @node Deleting Principals, Changing Passwords, Adding or Modifying Principals, Principals
2605 @subsection Deleting Principals
2606
2607 To delete a principal, use the kadmin @code{delete_principal} command,
2608 which requires the ``delete'' administrative privilege.  The syntax is:
2609
2610 @smallexample
2611 @b{delete_principal} [@b{-force}] @i{principal}
2612 @end smallexample
2613
2614 @noindent @code{delete_principal} has the alias @code{delprinc}.  The
2615 @code{-force} option causes @code{delete_principal} not to ask if you're
2616 sure.  For example:
2617
2618 @smallexample
2619 @group
2620 @b{kadmin:} delprinc @value{RANDOMUSER1}
2621 @b{Are you sure you want to delete the principal
2622 "@value{RANDOMUSER1}@@@value{PRIMARYREALM}"? (yes/no):} yes
2623 @b{Principal "@value{RANDOMUSER1}@@@value{PRIMARYREALM}" deleted.
2624 Make sure that you have removed this principal from
2625 all ACLs before reusing.
2626 kadmin:}
2627 @end group
2628 @end smallexample
2629
2630 @node Changing Passwords,  , Deleting Principals, Principals
2631 @subsection Changing Passwords
2632
2633 To change a principal's password use the kadmin @code{change_password}
2634 command, which requires the ``modify'' administrative privilege (unless
2635 the principal is changing his/her own password).  The syntax is:
2636
2637 @smallexample
2638 @b{change_password} [@i{options}] @i{principal}
2639 @end smallexample
2640
2641 @noindent The @code{change_password} option has the alias @code{cpw}.
2642 @code{change_password} takes the following options:
2643
2644 @table @b
2645 @item -randkey
2646 Sets the key of the principal to a random value.
2647
2648 @item @b{-pw} @i{password}
2649 Sets the password to the string @i{password}.  @value{COMPANY} does not
2650 recommend using this option.
2651
2652 @item @b{-e} @i{"enc:salt..."}
2653 Uses the specified list of enctype-salttype pairs for setting the key
2654 of the principal.  The quotes are necessary if there are multiple
2655 enctype-salttype pairs.  This will not function against kadmin daemons
2656 earlier than krb5-1.2.  See @ref{Supported Encryption Types} and
2657 @ref{Salts} for possible values.
2658
2659 @item @b{-keepold}
2660 Keeps the previous kvno's keys around.  This flag is usually not
2661 necessary except perhaps for TGS keys.  Don't use this flag unless you
2662 know what you're doing. This option is not supported for the LDAP
2663 database
2664
2665
2666
2667 @end table
2668
2669 For example:
2670
2671 @smallexample
2672 @group
2673 @b{kadmin:} cpw @value{RANDOMUSER2}
2674 @iftex
2675 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type the new password.}
2676 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{@doubleleftarrow{} Type it again.}
2677 @end iftex
2678 @ifinfo
2679 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the new password.}
2680 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type it again.}
2681 @end ifinfo
2682 @ifhtml
2683 @b{Enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type the new password.}
2684 @b{Re-enter password for principal @value{RANDOMUSER2}@@@value{PRIMARYREALM}:}  @i{<= Type it again.}
2685 @end ifhtml
2686 @b{Password for @value{RANDOMUSER2}@@@value{PRIMARYREALM} changed.
2687 kadmin:}
2688 @end group
2689 @end smallexample
2690
2691 Note that @code{change_password} will not let you change the password to
2692 one that is in the principal's password history.
2693
2694 @node Policies, Global Operations on the Kerberos Database, Principals, Administrating the Kerberos Database
2695 @section Policies
2696
2697 A policy is a set of rules governing passwords.  Policies can dictate
2698 minimum and maximum password lifetimes, minimum number of characters and
2699 character classes a password must contain, and the number of old
2700 passwords kept in the database.
2701
2702 @menu
2703 * Retrieving Policies::         
2704 * Retrieving the List of Policies::  
2705 * Adding or Modifying Policies::  
2706 * Deleting Policies::           
2707 * Updating the History Key::    
2708 @end menu
2709
2710 @node Retrieving Policies, Retrieving the List of Policies, Policies, Policies
2711 @subsection Retrieving Policies
2712
2713 To retrieve a policy, use the kadmin @code{get_policy} command, which
2714 requires the ``inquire'' administrative privilege.  The syntax is:
2715
2716 @smallexample
2717 @b{get_policy} [@b{-terse}] @i{policy}
2718 @end smallexample
2719
2720 The @code{get_policy} command has the alias @code{getpol}.  For example:
2721
2722 @smallexample
2723 @group
2724 @b{kadmin:} get_policy admin
2725 @b{Policy: admin
2726 Maximum password life: 180 days 00:00:00
2727 Minimum password life: 00:00:00
2728 Minimum password length: 6
2729 Minimum number of password character classes: 2
2730 Number of old keys kept: 5
2731 Reference count: 17
2732 kadmin:}
2733 @end group
2734 @end smallexample
2735
2736 @noindent The @dfn{reference count} is the number of principals using
2737 that policy.
2738
2739 The @code{get_policy} command has a @code{-terse} option, which lists
2740 each field as a quoted, tab-separated string.  For example:
2741
2742 @smallexample
2743 @group
2744 @b{kadmin:} get_policy -terse admin
2745 @b{admin   15552000        0       6       2       5       17
2746 kadmin:}
2747 @end group
2748 @end smallexample
2749
2750 @node Retrieving the List of Policies, Adding or Modifying Policies, Retrieving Policies, Policies
2751 @subsection Retrieving the List of Policies
2752
2753 You can retrieve the list of policies with the kadmin
2754 @code{list_policies} command, which requires the ``list'' privilege.  The
2755 syntax is:
2756
2757 @smallexample
2758 @b{list_policies} [@i{expression}]
2759 @end smallexample
2760
2761 @noindent where @i{expression} is a shell-style glob expression that can
2762 contain the characters *, ?, and [].  All policy names matching the
2763 expression are displayed.  The @code{list_policies} command has the aliases
2764 @code{listpols}, @code{get_policies}, and @code{getpols}.  For example:
2765
2766 @smallexample
2767 @group
2768 @b{kadmin:}  listpols
2769 @b{test-pol
2770 dict-only
2771 once-a-min
2772 test-pol-nopw}
2773
2774 @b{kadmin:}  listpols t*
2775 @b{test-pol
2776 test-pol-nopw
2777 kadmin:}
2778 @end group
2779 @end smallexample
2780
2781
2782 @node Adding or Modifying Policies, Deleting Policies, Retrieving the List of Policies, Policies
2783 @subsection Adding or Modifying Policies
2784
2785 To add a new policy, use the kadmin @code{add_policy} command, which
2786 requires the ``add'' administrative privilege.  The syntax is:
2787
2788 @smallexample
2789 @b{add_policy} [@i{options}] @i{policy_name}
2790 @end smallexample
2791
2792 To modify attributes of a principal, use the kadmin @code{modify_policy}
2793 command, which requires the ``modify'' administrative privilege.  The
2794 syntax is:
2795
2796 @smallexample
2797 @b{modify_policy} [@i{options}] @i{policy_name}
2798 @end smallexample
2799
2800 @noindent @code{add_policy} has the alias @code{addpol}.
2801 @code{modify_poilcy} has the alias @code{modpol}.
2802
2803 The @code{add_policy} and @code{modify_policy} commands take the
2804 following switches:
2805
2806 @table @b
2807 @item -maxlife @i{time}
2808 Sets the maximum lifetime of a password to @i{time}.
2809
2810 @item -minlife @i{time}
2811 Sets the minimum lifetime of a password to @i{time}.
2812
2813 @item -minlength @i{length}
2814 Sets the minimum length of a password to @i{length} characters.
2815
2816 @item -minclasses @i{number}
2817 Requires at least @i{number} of character classes in a password.
2818
2819 @item -history @i{number}
2820 Sets the number of past keys kept for a principal to @i{number}. This option is not supported for LDAP database.
2821
2822 @item -maxfailure @i{maxnumber}
2823 Sets the maximum number of authentication failures before the principal
2824 is locked.  Authentication failures are only tracked for principals
2825 which require preauthentication.
2826
2827 @item -failurecountinterval @i{failuretime}
2828 Sets the allowable time between authentication failures.  If an
2829 authentication failure happens after @i{failuretime} has elapsed since
2830 the previous failure, the number of authentication failures is reset to
2831 1.
2832
2833 @item -lockoutduration @i{lockouttime}
2834 Sets the duration for which the principal is locked from authenticating
2835 if too many authentication failures occur without the specified failure
2836 count interval elapsing.
2837 @end table 
2838 @c **** An example here would be nice.  ****
2839
2840 @noindent
2841 Note: The policies are created under realm container in the LDAP database.
2842
2843 @node Deleting Policies, Updating the History Key, Adding or Modifying Policies, Policies
2844 @subsection Deleting Policies
2845
2846 To delete a policy, use the @code{kadmin} @code{delete_policy} command,
2847 which requires the ``delete'' administrative privilege.  The syntax is:
2848
2849 @smallexample
2850 @b{delete_policy [-force]} @i{policy_name}
2851 @end smallexample
2852
2853 @noindent The @code{delete_policy} command has the alias @code{delpol}.
2854 It prompts for confirmation before deletion.
2855 For example:
2856
2857 @smallexample
2858 @group
2859 @b{kadmin:} delete_policy guests
2860 @b{Are you sure you want to delete the policy "guests"?
2861 (yes/no):} yes
2862 @b{kadmin:}
2863 @end group
2864 @end smallexample
2865
2866 Note that you must cancel the policy from all principals before deleting
2867 it.  The @code{delete_policy} command will fail if it is in use by any
2868 principals.
2869
2870 @node Updating the History Key,  , Deleting Policies, Policies
2871 @subsection Updating the History Key
2872
2873 If a policy specifies a number of old keys kept of two or more, the
2874 stored old keys are encrypted in a history key, which is found in the
2875 key data of the kadmin/history principal.
2876
2877 Currently there is no support for proper rollover of the history key,
2878 but you can change the history key (for example, to use a better
2879 encryption type) at the cost of invalidating currently stored old keys.
2880 To change the history key, run:
2881
2882 @smallexample
2883 @group
2884 @b{kadmin:} change_password -randkey kadmin/history
2885 @end group
2886 @end smallexample
2887
2888 This command will fail if you specify the @b{-keepold} flag.  Only one
2889 new history key will be created, even if you specify multiple key/salt
2890 combinations.
2891
2892 In the future, we plan to migrate towards encrypting old keys in the
2893 master key instead of the history key, and implementing proper rollover
2894 support for stored old keys.
2895
2896 @node Global Operations on the Kerberos Database, Global Operations on the Kerberos LDAP Database, Policies, Administrating the Kerberos Database
2897 @section Global Operations on the Kerberos Database
2898
2899 @menu
2900 * Dumping a Kerberos Database to a File::  
2901 * Restoring a Kerberos Database from a Dump File::  
2902 * Creating a Stash File::       
2903 * Creating and Destroying a Kerberos Database::  
2904 @end menu
2905
2906 The @code{kdb5_util} command is the primary tool for administrating the
2907 Kerberos database.  The syntax is:
2908
2909 @smallexample
2910 @b{kdb5_util} @i{command} [@i{kdb5_util_options}] [@i{command_options}]
2911 @end smallexample
2912
2913 The @code{kdb5_util} command takes the following options, which override
2914 the defaults specified in the configuration files:
2915
2916 @table @b
2917 @itemx -r @i{realm}
2918 specifies the the Kerberos realm of the database.
2919
2920 @itemx -d @i{database_name}
2921 specifies the name under which the principal database is stored.  
2922
2923 @itemx -k @i{master_key_type}
2924 specifies the key type of the master key in the database.
2925
2926 @itemx -M @i{master_key_name}
2927 specifies the principal name of the master key in the database.
2928
2929 @itemx -m
2930 indicates that the master database password should be read from the TTY
2931 rather than fetched from a file on disk.
2932
2933 @itemx -sf @i{stash_file}
2934 specifies the stash file of the master database password
2935
2936 @itemx -P @i{password}
2937 specifies the master database password.  @value{COMPANY} does not
2938 recommend using this option.
2939
2940 @end table
2941
2942 @node Dumping a Kerberos Database to a File, Restoring a Kerberos Database from a Dump File, Global Operations on the Kerberos Database, Global Operations on the Kerberos Database
2943 @subsection Dumping a Kerberos Database to a File
2944
2945 To dump a Kerberos database into a file, use the @code{kdb5_util}
2946 @code{dump} command on one of the KDCs.  The syntax is:
2947
2948 @smallexample
2949 @b{kdb5_util dump} [@b{-old}] [@b{-b6}] [@b{-b7}] [@b{-ov}] 
2950 [@b{-verbose}] [-mkey_convert] [-new_mkey_file] [@i{filename} 
2951 [@i{principals...}]]
2952 @end smallexample
2953
2954 The @code{kdb5_util dump} command takes the following options:
2955
2956 @table @b
2957 @itemx -old
2958 causes the dump to be in the Kerberos 5 Beta 5 and earlier dump format
2959 (``kdb5_edit load_dump version 2.0'').
2960 @itemx -b6
2961 causes the dump to be in the Kerberos 5 Beta 6 format (``kdb5_edit
2962 load_dump version 3.0'').
2963 @itemx -b7
2964 causes the dump to be in the Kerberos 5 Beta 7 format (``kdbt_edit
2965 load_dump version 4'').
2966 @itemx -ov
2967 causes the dump to be in ovsec_adm_export format.  Currently, the only
2968 way to preserve per-principal policy information is to use this in
2969 conjunction with a normal dump.
2970 @itemx -verbose
2971 causes the name of each principal and policy to be printed as it is
2972 dumped.
2973 @itemx -mkey_convert
2974 prompts for a new master password, and then dumps the database with
2975 all keys reencrypted in this new master key
2976 @itemx -new_mkey_file
2977 reads a new key from the default keytab and then dumps the database
2978 with all keys reencrypted in this new master key
2979 @end table
2980
2981 For example:
2982
2983 @smallexample
2984 @group
2985 @b{shell%} kdb5_util dump dumpfile
2986 @b{shell%}
2987 @end group
2988 @end smallexample
2989
2990 @smallexample
2991 @group
2992 @b{shell%} kbd5_util dump -verbose dumpfile
2993 @b{kadmin/admin@@@value{PRIMARYREALM}
2994 krbtgt/@value{PRIMARYREALM}@@@value{PRIMARYREALM}
2995 kadmin/history@@@value{PRIMARYREALM}
2996 K/M@@@value{PRIMARYREALM}
2997 kadmin/changepw@@@value{PRIMARYREALM}
2998 shell%}
2999 @end group
3000 @end smallexample
3001
3002 @noindent
3003 If you specify which principals to dump, you must use the full
3004 principal, as in the following example.  (The line beginning with
3005 @result{} is a continuation of the previous line.):
3006
3007 @smallexample
3008 @group
3009 @b{shell%} kdb5_util dump -verbose dumpfile K/M@@@value{PRIMARYREALM} 
3010 @result{} kadmin/admin@@@value{PRIMARYREALM}
3011 @b{kadmin/admin@@@value{PRIMARYREALM}
3012 K/M@@@value{PRIMARYREALM}
3013 shell%}
3014 @end group
3015 @end smallexample
3016
3017 @noindent
3018 Otherwise, the principals will not match those in the database and will
3019 not be dumped:
3020
3021 @smallexample
3022 @group
3023 @b{shell%} kdb5_util dump -verbose dumpfile K/M kadmin/admin
3024 @b{shell%}
3025 @end group
3026 @end smallexample
3027
3028 @noindent
3029 If you do not specify a dump file, @code{kdb5_util} will dump the
3030 database to the standard output.
3031
3032 There is currently a bug where the default dump format omits the
3033 per-principal policy information.  In order to dump all the data
3034 contained in the Kerberos database, you must perform a normal dump (with
3035 no option flags) and an additional dump using the ``-ov'' flag to a
3036 different file.
3037
3038 @node Restoring a Kerberos Database from a Dump File, Creating a Stash File, Dumping a Kerberos Database to a File, Global Operations on the Kerberos Database
3039 @subsection Restoring a Kerberos Database from a Dump File
3040
3041 To restore a Kerberos database dump from a file, use the
3042 @code{kdb5_util} @code{load} command on one of the KDCs.  The syntax
3043 is:
3044
3045 @smallexample
3046 @b{kdb5_util load} [@b{-old}] [@b{-b6}] [@b{-b7}] [@b{-ov}] [@b{-verbose}]
3047 [@b{-update}] [@b{-hash}] @i{dumpfilename} @i{dbname} [@i{admin_dbname}]
3048 @end smallexample
3049
3050 The @code{kdb5_util load} command takes the following options:
3051
3052 @table @b
3053 @itemx -old
3054 requires the dump to be in the Kerberos 5 Beta 5 and earlier dump format
3055 (``kdb5_edit load_dump version 2.0'').
3056 @itemx -b6
3057 requires the dump to be in the Kerberos 5 Beta 6 format (``kdb5_edit
3058 load_dump version 3.0'').
3059 @itemx -b7
3060 requires the dump to be in the Kerberos 5 Beta 7 format (``kdb5_edit
3061 load_dump version 4'').
3062 @itemx -ov
3063 requires the dump to be in ovsec_adm_export format.
3064 @itemx -verbose
3065 causes the name of each principal and policy to be printed as it is
3066 loaded.
3067 @itemx -update
3068 causes records from the dump file to be updated in or added to the
3069 existing database.  This is useful in conjunction with an
3070 ovsec_adm_export format dump if you want to preserve per-principal
3071 policy information, since the current default format does not contain
3072 this data.
3073 @itemx -hash
3074 causes the database to be stored as a hash rather than a binary tree.
3075 @end table
3076
3077 For example:
3078
3079 @smallexample
3080 @group
3081 @b{shell%} kdb5_util load dumpfile principal
3082 @b{shell%}
3083 @end group
3084 @end smallexample
3085
3086 @smallexample
3087 @group
3088 @b{shell%} kdb5_util load -update dumpfile principal
3089 @b{shell%}
3090 @end group
3091 @end smallexample
3092
3093 @noindent
3094 If the database file exists, and the @b{-update} flag was not given,
3095 @code{kdb5_util} will overwrite the existing database.
3096
3097 @node Creating a Stash File, Creating and Destroying a Kerberos Database, Restoring a Kerberos Database from a Dump File, Global Operations on the Kerberos Database
3098 @subsection Creating a Stash File
3099
3100 A stash file allows a KDC to authenticate itself to the database
3101 utilities, such as @code{kadmin}, @code{kadmind}, @code{krb5kdc}, and
3102 @code{kdb5_util}.
3103
3104 To create a stash file, use the @code{kdb5_util} @code{stash} command.
3105 The syntax is:
3106
3107 @smallexample
3108 @b{kdb5_util stash} [@b{-f} @i{keyfile}]
3109 @end smallexample
3110
3111 For example:
3112
3113 @smallexample
3114 @group
3115 @b{shell%} kdb5_util stash
3116 @b{kdb5_util: Cannot find/read stored master key while reading master key
3117 kdb5_util: Warning: proceeding without master key}
3118 @iftex
3119 @b{Enter KDC database master key:}  @i{@doubleleftarrow{} Type the KDC database master password.}
3120 @end iftex
3121 @ifinfo
3122 @b{Enter KDC database master key:}  @i{<= Type the KDC database master password.}
3123 @end ifinfo
3124 @ifhtml
3125 @b{Enter KDC database master key:}  @i{<= Type the KDC database master password.}
3126 @end ifhtml
3127 @b{shell%}
3128 @end group
3129 @end smallexample
3130
3131 @noindent
3132 If you do not specify a stash file, @code{kdb5_util} will stash the key
3133 in the file specified in your @code{kdc.conf} file.
3134
3135 @node Creating and Destroying a Kerberos Database,  , Creating a Stash File, Global Operations on the Kerberos Database
3136 @subsection Creating and Destroying a Kerberos Database
3137
3138 If you need to create a new Kerberos database, use the @code{kdb5_util}
3139 @code{create} command.  The syntax is:
3140
3141 @smallexample
3142 @b{kdb5_util create} [@b{-s}]
3143 @end smallexample
3144
3145 If you specify the @samp{-s} option, @code{kdb5_util} will stash a copy
3146 of the master key in a stash file.  (@xref{Creating a Stash File}.)  For
3147 example:
3148
3149 @smallexample
3150 @group
3151 @b{shell%} @value{ROOTDIR}/sbin/kdb5_util -r @value{PRIMARYREALM} create -s
3152 @b{kdb5_util: No such file or directory while setting active database to
3153 @result{} '@value{ROOTDIR}/var/krb5kdc/principal'
3154 Initializing database '@value{ROOTDIR}/var/krb5kdc/principal' for
3155 @result{} realm '@value{PRIMARYREALM}',
3156 master key name 'K/M@@@value{PRIMARYREALM}'
3157 You will be prompted for the database Master Password.
3158 It is important that you NOT FORGET this password.}
3159 @iftex
3160 @b{Enter KDC database master key:}  @i{@doubleleftarrow{} Type the master password.}
3161 @b{Re-enter KDC database master key to verify:}  @i{@doubleleftarrow{} Type it again.}
3162 @end iftex
3163 @ifinfo
3164 @b{Enter KDC database master key:}  @i{<= Type the master password.}
3165 @b{Re-enter KDC database master key to verify:}  @i{<= Type it again.}
3166 @end ifinfo
3167 @ifhtml
3168 @b{Enter KDC database master key:}  @i{<= Type the master password.}
3169 @b{Re-enter KDC database master key to verify:}  @i{<= Type it again.}
3170 @end ifhtml
3171 @b{shell%}
3172 @end group
3173 @end smallexample
3174
3175 If you need to destroy the current Kerberos database, use the
3176 @code{kdb5_util} @code{destroy} command.  The syntax is:
3177
3178 @smallexample
3179 @b{kdb5_util destroy} [@b{-f}]
3180 @end smallexample
3181
3182 The @code{destroy} command destroys the database, first overwriting the
3183 disk sectors and then unlinking the files.  If you specify the
3184 @samp{-f} option, @code{kdb5_util} will not prompt you for a
3185 confirmation before destroying the database.
3186
3187 @smallexample
3188 @group
3189 @b{shell%} @value{ROOTDIR}/sbin/kdb5_util -r @value{PRIMARYREALM} destroy
3190 @iftex
3191 @b{kdb5_util: Deleting KDC database stored in @value{DefaultDatabaseName}, are you sure 
3192 (type yes to confirm)?} @i{@doubleleftarrow{}yes}
3193 @end iftex
3194 @ifinfo
3195 @b{kdb5_util: Deleting KDC database stored in @value{DefaultDatabaseName}, are you sure 
3196 (type yes to confirm)?} @i{<== yes}
3197 @end ifinfo
3198 @ifhtml
3199 @b{kdb5_util: Deleting KDC database stored in @value{DefaultDatabaseName}, are you sure
3200 (type yes to confirm)?} @i{<== yes}
3201 @end ifhtml
3202 @b{OK, deleting database '@value{DefaultDatabaseName}'...}
3203
3204 @b{shell%}
3205 @end group
3206 @end smallexample
3207
3208 @node Global Operations on the Kerberos LDAP Database, Cross-realm Authentication, Global Operations on the Kerberos Database, Administrating the Kerberos Database
3209 @section Global Operations on the Kerberos LDAP Database
3210
3211
3212 The @code{kdb5_ldap_util} is the primary tool for administrating the Kerberos LDAP database. It allows an administrator to manage realms, Kerberos services ( KDC and Admin Server) and ticket policies.
3213 @noindent
3214 The syntax is: 
3215 @smallexample
3216 @b{kdb5_ldap_util} [@b{-D user_dn} [@i{-w passwd]}] [@b{-H} @i{ldap_uri}] command @i{[command_options]}
3217 @end smallexample
3218
3219 @table @b
3220 @itemx -D @i{user_dn}
3221 Specifies the Distinguished Name (DN) of the user who has sufficient rights to perform the operation on the LDAP server.
3222 @itemx @b{-w} @i{passwd}
3223 Specifies the password of user_dn. This option is not recommended.
3224 @itemx @b{-H} @i{ldap_uri}
3225 Specifies the URI of the LDAP server. It is recommended to use ldapi:// or ldaps:// to connect to the LDAP server.
3226 @end table
3227 @menu
3228 * Creating a Kerberos Realm::   
3229 * Modifying a Kerberos Realm::  
3230 * Retrieving Information about a Kerberos Realm::  
3231 * Destroying a Kerberos Realm::  
3232 * Listing available Kerberos Realms::  
3233 * Stashing Service Object's Password::  
3234 * Creating and Modifying a Ticket Policy::  
3235 * Retrieving Information About a Ticket Policy::  
3236 * Destroying a Ticket Policy::  
3237 * Listing available Ticket Policies::  
3238 * Creating a Service Object (eDirectory)::  
3239 * Modifying a Service Object (eDirectory)::  
3240 * Retrieving Service Object Information (eDirectory)::  
3241 * Destroying a Service Object (eDirectory)::  
3242 * Listing Available Service Objects (eDirectory)::  
3243 * Passwords for Service Objects (eDirectory)::  
3244 @end menu
3245
3246 @node Creating a Kerberos Realm, Modifying a Kerberos Realm, Global Operations on the Kerberos LDAP Database, Global Operations on the Kerberos LDAP Database
3247 @subsection Creating a Kerberos Realm
3248
3249 If you need to create a new realm, use the command as follows: 
3250 @smallexample
3251
3252 @b{create}  [@b{-r} @i{realm}]  [@b{-subtrees} @i{subtree_dn_list}] [@b{-sscope} @i{search_scope}] [@b{-containerref} @i{container_reference_dn}]
3253 [@b{-k} @i{ mkeytype}] [@b{-m}|@b{-P} @i{password}][@b{-sf} @i{stashlename}] [@b{-s}] [@b{-maxtktlife} @i{max_ticket_life}]
3254 [@b{-maxrenewlife} @i{ max_renewable_ticket_life}] [@b{ticket_flags}] 
3255
3256 @end smallexample
3257
3258 @noindent
3259 Options to create realm in directory are as follows: 
3260
3261 @table @b
3262
3263 @itemx @b{-r} @i{realm}
3264 Specifies the Kerberos realm of the database; by default the realm returned by @samp{krb5_default_local_realm} (3) is used.
3265
3266 @itemx @b{-subtrees} @i{subtree_dn_list}
3267 Specifies the list of subtrees containing principals of a realm. The list contains the DN of the subtree objects separated by colon(:).
3268
3269 @itemx @b{-sscope} @i{search_scope}
3270 Specifies the scope for searching the principals under the subtree. The possible values are 1 or one (one level), 2 or sub (subtree).
3271
3272 @itemx @b{-containerref} @i{container_reference_dn}
3273 Specfies the DN of the container object in which the principals of a realm will be created. If the container reference is not configured for a realm, the principals will be created in the realm container.
3274
3275 @itemx @b{-k} @i{mkeytype}
3276 Specifies the key type of the master key in the database; the default
3277 is that given in @file{kdc.conf}.
3278
3279 @itemx @b{-m} @i{}
3280 Specifies that the master database password should be read from the TTY rather than fetched from a file on disk.
3281
3282 @itemx @b{-p} @i{password}
3283 Specifies the master database password. This option is not recommended.
3284
3285 @itemx @b{-sf} @i{stashfilename}
3286 Specifies the stash file of the master database password.
3287
3288 @itemx @b{-s} @i{}
3289 Specifies that the stash file is to be created.
3290
3291 @itemx @b{-maxtktlife} @i{max_ticket_life}
3292 Specifies maximum ticket life for principals in this realm. This value is used, if it is not set on the principal.
3293
3294 @itemx @b{-maxrenewlife} @i{max_renewable_ticket_life}
3295 Specifies maximum renewable life of tickets for principals in this realm. This value is used, if it is not set on the principal.
3296
3297 @itemx @b{ticket_flags} @i{}
3298 Specifies the ticket flags. If this option is not specified, by default, none of the flags are set. This means all the ticket options will be allowed and no restriction will be set. This value is used, if it is not set on the principal.
3299 @noindent
3300
3301 The various flags are:
3302 @table @b
3303
3304 @itemx @{-|+@}allow_postdated
3305 @code{-allow_postdated} prohibits principals from obtaining postdated tickets. (Sets the @samp{KRB5_KDB_DISALLOW_POSTDATED} flag.).@code{+allow_postdated} clears this flag.
3306
3307 @itemx @{-|+@}allow_forwardable
3308 @code{-allow_forwardable} prohibits principals from obtaining forwardable tickets. (Sets the 
3309 @samp{KRB5_KDB_DISALLOW_FORWARDABLE} flag.) @code{+allow_forwardable} clears this flag.
3310
3311 @itemx @{-|+@}allow_renewable
3312 @code{-allow_renewable} prohibits principals from obtaining renewable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_RENEWABLE} flag.) @code{+allow_renewable} clears this flag.
3313
3314 @itemx @{-|+@}allow_proxiable
3315 @code{-allow_proxiable} prohibits principals from obtaining proxiable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_PROXABLE} flag.) @code{+allow_proxiable} clears this flag.
3316
3317 @itemx @{-|+@}allow_dup_skey
3318 @code{-allow_dup_skey} disables user-to-user authentication for
3319 principals by prohibiting principals from obtaining a sessions key for
3320 another user.  (Sets the @samp{KRB5_KDB_DISALLOW_DUP_SKEY} flag.)
3321 @code{+allow_dup_skey} clears this flag.
3322
3323 @itemx @{-|+@}requires_preauth
3324 @code{+requires_preauth} requires principals to preauthenticate before being allowed to kinit. (Sets the @samp{KRB5_KDB_REQURES_PRE_AUTH} flag.) @code{-requires_preauth} clears this flag.
3325
3326 @itemx @{-|+@}requires_hwauth
3327 @code{+requires_hwauth} requires principals to preauthenticate using a
3328 hardware device before being allowed to kinit. (Sets the
3329 @samp{KRB5_KDB_REQURES_HW_AUTH} flag.)  @code{-requires_hwauth} clears
3330 this flag.
3331
3332 @itemx @{-|+@}ok_as_delegate
3333 @code{+ok_as_delegate} sets the OK-AS-DELEGATE flag on tickets issued for use
3334 with this principal as the service, which clients may use as a hint that
3335 credentials can and should be delegated when authenticating to the service.
3336 (Sets the @samp{KRB5_KDB_OK_AS_DELEGATE} flag.) @code{-ok_as_delegate} clears
3337 this flag.
3338
3339 @itemx @{-|+@}allow_svr
3340 @code{-allow_svr} prohibits the issuance of service tickets for principals. (Sets the @samp{KRB5_KDB_DISALLOW_SVR} flag.) @code{+allow_svr} clears this flag.
3341
3342 @itemx @{-|+@}allow_tgs_req
3343 @code{-allow_tgs_req} specifies that a @dfn{Ticket-Granting Service
3344 (TGS)} request for a service ticket for principals is not
3345 permitted. This option is useless for most
3346 things.@code{+allow_tgs_req} clears this flag.  The default is
3347 @code{+allow_tgs_req}. In effect, @code{-allow_tgs_req} sets the
3348 @samp{KRB5_KDB_DISALLOW_TGT_BASED} flag on principals in the
3349 database.
3350
3351 @itemx @{-|+@}allow_tix
3352 @code{-allow_tix} forbids the issuance of any tickets for
3353 principals. @code{+allow_tix} clears this flag. The default is
3354 @code{+allow_tix}.  In effect, @code{-allow_tix} sets the
3355 @samp{KRB5_KDB_DISALLOW_ALL_TIX} flag on principals in the database.
3356
3357 @itemx @{-|+@}needchange
3358 @code{+needchange} sets a flag in attributes field to force a password change; 
3359 @code{-needchange} clears it. The default is @code{-needchange}. In effect,
3360 @code{+needchange} sets the @samp{KRB5_KDB_REQURES_PWCHANGE} flag on
3361 principals in the database.
3362
3363 @itemx @{-|+@}password_changing_service
3364 @code{+password_changing_service} sets a flag in the attributes field
3365 marking principal as a password change service principal (useless for
3366 most things). @code{-password_changing_service} clears the flag. This
3367 flag intentionally has a long name. The default is
3368 @code{-password_changing_service}. In effect,
3369 @code{+password_changing_service} sets the
3370 @samp{KRB5_KDB_PWCHANGE_SERVICE} flag on principals in the database.
3371
3372 @end table
3373
3374 @end table
3375
3376 @smallexample
3377 @group
3378 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu create -sscope 2
3379 -subtree ou=users,dc=example,dc=com -r ATHENA.MIT.EDU
3380 @b{Password for "cn=admin,dc=example,dc=com":}
3381 @b{Initializing database for realm 'ATHENA.MIT.EDU'}
3382 @b{You will be prompted for the database Master Password.}
3383 @b{It is important that you NOT FORGET this password.}
3384 @b{Enter KDC database master key:}
3385 @b{Re-enter KDC database master key to verify:}
3386 shell% 
3387 @end group
3388 @end smallexample
3389 @menu
3390 * eDirectory Options (Creating a Kerberos Realm)::
3391 @end menu
3392 @node eDirectory Options (Creating a Kerberos Realm),  , Creating a Kerberos Realm, Creating a Kerberos Realm
3393  
3394 @subsubsection eDirectory Options
3395
3396 @table @b
3397 @itemx @b{-kdcdn} @i{kdc_servce_list}
3398 Specifies the list of KDC service objects serving the realm. The list contains the DNs of the KDC service objects separated by colon(:).
3399
3400 @itemx @b{-admindn} @i{admin_service_list}
3401 Specifies the  list of Administration service objects serving the realm. The list contains the DNs of the Administration service objects separated by colon(:).
3402 @end table
3403
3404 @smallexample
3405 @group
3406 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu create -sscope 2
3407 -subtree ou=users,dc=example,dc=com -kdcdn cn=krbkdc,dc=example,dc=com -admindn cn=krbadmin,dc=example,dc=com -r ATHENA.MIT.EDU
3408 @b{Password for "cn=admin,dc=example,dc=com":}
3409 @b{Initializing database for realm 'ATHENA.MIT.EDU'}
3410 @b{You will be prompted for the database Master Password.}
3411 @b{It is important that you NOT FORGET this password.}
3412 @b{Enter KDC database master key:}
3413 @b{Re-enter KDC database master key to verify:}
3414 shell% 
3415 @end group
3416 @end smallexample
3417
3418 @node Modifying a Kerberos Realm, Retrieving Information about a Kerberos Realm, Creating a Kerberos Realm, Global Operations on the Kerberos LDAP Database
3419 @subsection Modifying a Kerberos Realm
3420
3421 If you need to modify a realm, use the command as follows: 
3422
3423 @smallexample
3424
3425 @b{modify}  [@b{-r} @i{realm}] [@b{-subtrees} @i{subtree_dn}] [@b{-sscope} @i{search_scope}][@b{-containerref} @i{container_reference_dn}]
3426 [@b{-maxtktlife}@i{max_ticket_life}][@b{-maxrenewlife} @i{max_renewable_ticket_life}] [@b{-ticket_flags}]
3427
3428 @end smallexample
3429 Options to modify realm in directory are as follows: 
3430
3431 @table @b
3432
3433 @itemx @b{-r} @i{realm}
3434 Specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm (3) is used.
3435
3436 @itemx @b{-subtrees} @i{subtree_dn_list}
3437 Specifies the list of subtrees containing principal objects in the realm.The list contains the DN of the subtree objects separated by colon(:). This list replaces the existing list. 
3438
3439 @itemx @b{-sscope} @i{search_scope}
3440 Specifies the scope for searching the principals under the subtrees. The possible values are 1 or one (one level), 2 or sub (subtrees).
3441
3442 @itemx @b{-containerref} @i{container_reference_dn}
3443 Specifies the Distinguished Name (DN) of the container object in which the principals of a realm will be created. 
3444
3445 @itemx @b{-maxtktlife} @i{max_ticket_life}
3446 Specifies maximum ticket life for principals in this realm. This value is used, if it is not set on the principal.
3447
3448 @itemx @b{-maxrenewlife} @i{max_renewable_ticket_life}
3449 Specifies maximum renewable life of tickets for principals in this realm.  This value is used, if it is not set on the principal. 
3450
3451 @itemx @b{-ticket_flags} @i{}
3452 Specifies the ticket flags. If this option is not specified, by default, none of the flags are set. This means all the ticket options will be allowed and no restriction will be set.  This value is used, if it is not set on the principal.
3453 @noindent
3454
3455 The various flags are:
3456 @table @b
3457
3458 @itemx @{-|+@}allow_postdated
3459 @code{-allow_postdated} prohibits principals from obtaining postdated tickets. (Sets the @samp{KRB5_KDB_DISALLOW_POSTDATED} flag.).@code{+allow_postdated} clears this flag.
3460 @itemx @{-|+@}allow_forwardable
3461 @code{-allow_forwardable} prohibits principals from obtaining forwardable tickets. 
3462 (Sets the @samp{KRB5_KDB_DISALLOW_FORWARDABLE} flag.) @code{+allow_forwardable} clears this flag.
3463 @itemx @{-|+@}allow_renewable
3464 @code{-allow_renewable} prohibits principals from obtaining renewable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_RENEWABLE} flag.) @code{+allow_renewable} clears this flag.
3465 @itemx @{-|+@}allow_proxiable
3466 @code{-allow_proxiable} prohibits principals from obtaining proxiable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_PROXABLE} flag.) @code{+allow_proxiable} clears this flag.
3467 @itemx @{-|+@}allow_dup_skey
3468 @code{-allow_dup_skey} Disables user-to-user authentication for principals by prohibiting principals from obtaining a sessions key for another user. (Sets the @samp{KRB5_KDB_DISALLOW_DUP_SKEY} flag.). @code{+allow_dup_skey} clears This flag.
3469 @itemx @{-|+@}requires_preauth
3470 @code{+requires_preauth} requires principals to preauthenticate before being allowed to kinit. Sets the 
3471 @samp{KRB5_KDB_REQURES_PRE_AUTH} flag.@code{-requires_preauth} clears this flag.
3472 @itemx @{-|+@}requires_hwauth
3473 @code{+requires_hwauth} requires principals to preauthenticate using a hardware device before being allowed to kinit. (Sets the 
3474 @samp{KRB5_KDB_REQURES_HW_AUTH} flag.)@code{-requires_hwauth} clears this flag.
3475 @itemx @{-|+@}allow_svr
3476 @code{-allow_svr} prohibits the issuance of service tickets for principals. (Sets the @samp{KRB5_KDB_DISALLOW_SVR} flag.) @code{+allow_svr} clears This flag.
3477 @itemx @{-|+@}allow_tgs_req
3478 @code{-allow_tgs_req} specifies that a @dfn{Ticket-Granting Service (TGS)} request for a service ticket for principals is not permitted. This option is useless for most things.@code{+allow_tgs_req} clears this flag. 
3479 The default is. @code{+allow_tgs_req}.  In effect,
3480 @code{-allow_tgs_req} sets the @samp{KRB5_KDB_DISALLOW_TGT_BASED} flag
3481 on principals in the database.
3482 @itemx @{-|+@}allow_tix
3483 @code{-allow_tix} forbids the issuance of any tickets for
3484 principals. @code{+allow_tix} clears this flag. The default is
3485 @code{+allow_tix}.  In effect, @code{-allow_tix} sets the
3486 @samp{KRB5_KDB_DISALLOW_ALL_TIX} flag on principals in the database.
3487 @itemx @{-|+@}needchange
3488 @code{+needchange} sets a flag in attributes field to force a password change; @code{-needchange} clears it. 
3489 The default is @code{-needchange}.  In effect,@code{+needchange} sets
3490 the @samp{KRB5_KDB_REQURES_PWCHANGE} flag on principals in the
3491 database.
3492 @itemx @{-|+@}password_changing_service
3493 @code{+password_changing_service} sets a flag in the attributes field marking principal as a password change service principal (useless for most things).@code{-password_changing_service} clears the flag. This flag intentionally has a long name. The default is @code{-password_changing_service} 
3494 In effect, @code{+password_changing_service} sets the @samp{KRB5_KDB_PWCHANGE_SERVICE} flag on principals in the database.
3495
3496 @end table
3497
3498 @noindent
3499 @noindent
3500 For example:
3501 @smallexample
3502 @group
3503 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu 
3504 modify -r ATHENA.MIT.EDU +requires_preauth
3505 @b{Password for "cn=admin,dc=example,dc=com":}
3506 shell%
3507 @end group
3508 @end smallexample
3509
3510 @menu
3511 * eDirectory Options (Modifying a Kerberos Realm)::  
3512 @end menu
3513
3514 @end table
3515
3516 @node eDirectory Options (Modifying a Kerberos Realm),  , Modifying a Kerberos Realm, Modifying a Kerberos Realm
3517 @subsubsection eDirectory Options
3518
3519 @table @b
3520 @itemx @b{-kdcdn} @i{kdc_service_list}
3521 Specifies the list of KDC service objects serving the realm. The list contains the DNs of the KDC service objects separated by a colon (:). This list replaces the existing list.
3522
3523 @itemx @b{-clearkdcdn} @i{kdc_service_list}
3524 Specifies the list of KDC service objects that need to be removed from the existing list. The list contains the DNs of the KDC service objects separated by a colon (:).
3525
3526 @itemx @b{-addkdcdn} @i{kdc_service_list}
3527 Specifies the list of KDC service objects that need to be added to the existing list. The list contains the DNs of the KDC service objects separated by a colon (:).
3528
3529 @itemx @b{-admindn} @i{admin_service_list}
3530 Specifies the list of Administration service objects serving the realm. The list contains the DNs of the Administration service objects separated by a colon (:). This list replaces the existing list.
3531
3532 @itemx @b{-clearadmindn} @i{admin_service_list} 
3533 Specifies the list of Administration service objects that need to be removed from the existing list. The list contains the DNs of the Administration service objects separated by a colon (:). 
3534
3535 @itemx @b{-addadmindn} @i{admin_service_list}
3536 Specifies the list of Administration service objects that need to be added to the existing list. The list contains the DNs of the Administration service objects separated by a colon (:).
3537
3538 @end table
3539
3540 @node Retrieving Information about a Kerberos Realm, Destroying a Kerberos Realm, Modifying a Kerberos Realm, Global Operations on the Kerberos LDAP Database
3541 @subsection Retrieving Information about a Kerberos Realm
3542
3543 @table @b
3544 @itemx @b{view} [@b{-r} @i{realm}]
3545 Displays the attributes of a realm. Option is as follows:
3546 @itemx @b{-r} @i{realm}
3547 specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm (3)is used.
3548 @end table
3549 @noindent
3550 For example:
3551 @smallexample
3552 @group
3553 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu view -r ATHENA.MIT.EDU
3554 @b{Password for "cn=admin,dc=example,dc=com":}
3555 @b{Realm Name: ATHENA.MIT.EDU}
3556 @b{Subtree: ou=users,dc=example,dc=com}
3557 @b{Subtree: ou=servers,dc=example,dc=com}
3558 @b{SearchScope: ONE}
3559 @b{Maximum ticket life: 0 days 01:00:00}
3560 @b{Maximum renewable life: 0 days 10:00:00}
3561 @b{Ticket flags: DISALLOW_FORWARDABLE}
3562 shell%
3563 @end group
3564 @end smallexample
3565
3566
3567 @node Destroying a Kerberos Realm, Listing available Kerberos Realms, Retrieving Information about a Kerberos Realm, Global Operations on the Kerberos LDAP Database
3568 @subsection Destroying a Kerberos Realm
3569
3570 @table @b
3571 @itemx destroy @b{[-f]} [@i{-r} @b{realm}]
3572 Destroys an existing realm. Options are as follows:
3573 @table @b
3574 @itemx @i{-f} 
3575 If specified, will not prompt the user for confirmation. 
3576 @itemx @b{-r} @i{realm}
3577 specifies the Kerberos realm of the database; by default the realm returned by 
3578 @samp{krb5_default_local_realm} (3)is used.
3579
3580 @end table
3581 @end table
3582 @noindent
3583 For example:
3584 @smallexample
3585 @group
3586 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldap-server1.mit.edu destroy -r ATHENA.MIT.EDU 
3587 @b{Password for "cn=admin,dc=example,dc=com":}
3588 @b{Deleting KDC database of 'ATHENA.MIT.EDU', are you sure?}
3589 @b{type 'yes' to confirm)? Yes}
3590 @b{OK, deleting database of 'ATHENA.MIT.EDU'...}
3591 shell%
3592 @end group
3593 @end smallexample
3594
3595 @node Listing available Kerberos Realms, Stashing Service Object's Password, Destroying a Kerberos Realm, Global Operations on the Kerberos LDAP Database
3596 @subsection Listing available Kerberos Realms
3597
3598 @table @b
3599 @itemx @i{list}
3600 This option lists the name of the realms.
3601 @end table
3602 @noindent
3603 For example:
3604 @smallexample
3605 @group
3606 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu list 
3607 @b{Password for "cn=admin,dc=example,dc=com":}
3608 @b{ATHENA.MIT.EDU}
3609 @b{OPENLDAP.MIT.EDU}
3610 @b{MEDIA-LAB.MIT.EDU}
3611 shell%
3612 @end group
3613 @end smallexample
3614
3615 @node Stashing Service Object's Password, Creating and Modifying a Ticket Policy, Listing available Kerberos Realms, Global Operations on the Kerberos LDAP Database
3616 @subsection Stashing Service Object's Password
3617
3618 @b{stashsrvpw} [@b{-f} @i{filename}] @b{servicedn}
3619
3620 This command allows an administrator to store the password of service object in a file. The KDC and Administration server uses this password to authenticate to the LDAP server. 
3621 @noindent
3622 Options are as follows:
3623
3624 @table @b
3625 @itemx @b{-f} @i{filename}
3626 Specifies the complete path of the service password file. By default, @code{/usr/local/var/service_passwd} is used.
3627 @itemx servicedn
3628 Specifies the Distinguished Name (DN) of the service object whose password is to be stored in file.
3629 @end table
3630 @noindent
3631 For example:
3632 @smallexample
3633 @group
3634 shell% kdb5_ldap_util stashsrvpw -f /home/andrew/conf_keyle cn=service-kdc,dc=example,dc=com
3635 @b{Password for "cn=service-kdc,dc=example,dc=com"}:
3636 @b{Re-enter password for "cn=service-kdc,dc=example,dc=com"}:
3637 shell%
3638 @end group
3639 @end smallexample
3640
3641 @node Creating and Modifying a Ticket Policy, Retrieving Information About a Ticket Policy, Stashing Service Object's Password, Global Operations on the Kerberos LDAP Database
3642 @subsection Creating and Modifying a Ticket Policy
3643
3644 This command creates a ticket policy in directory. 
3645
3646 @smallexample
3647 @b{create_policy} [@b{-r} @i{realm}] [@b{-maxrenewlife} @i{max_renewable_ticket_life}] [@b{ticket_flags}] @b{policy_name}
3648 @end smallexample
3649 Ticket policy objects are created under the realm container.
3650
3651 This command modifies a ticket policy in directory. 
3652 @smallexample
3653 @b{modify_policy} [@b{-r} @i{realm}] [@b{-maxrenewlife} @i{max_renewable_ticket_life}] [@b{ticket_flags}] @b{policy_name}
3654 @end smallexample
3655 @noindent
3656 Options are as follows:
3657
3658 @table @b
3659
3660 @itemx @b{-r} @i{realm}
3661 Specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm(3) is used.
3662 @itemx @b{-maxtktlife} @i{max_ticket_life}
3663 specifies maximum ticket life for principals.
3664 @itemx @b{-maxrenewlife} @i{max_renewable_ticket_life}
3665 specifies maximum renewable life of tickets for principals.
3666
3667 @itemx @b{ticket_flags}
3668 Specifies the ticket flags. If this option is not specified, by default, none of the flags are set. This means all the ticket options will be allowed and no restriction will be set.
3669
3670 @noindent
3671 The various flags are:
3672 @table @b
3673 @itemx @{-|+@}allow_postdated
3674 @code{-allow_postdated} prohibits principals from obtaining postdated tickets. (Sets the @samp{KRB5_KDB_DISALLOW_POSTDATED} flag.).@code{+allow_postdated} clears this flag.
3675
3676 @itemx @{-|+@}allow_forwardable
3677
3678 @code{-allow_forwardable} prohibits principals from obtaining forwardable tickets. (Sets the 
3679 @samp{KRB5_KDB_DISALLOW_FORWARDABLE} flag.) @code{+allow_forwardable} clears this flag.
3680
3681 @itemx @{-|+@}allow_renewable
3682 @code{-allow_renewable} prohibits principals from obtaining renewable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_RENEWABLE} flag.) @code{+allow_renewable} clears this flag.
3683 @itemx @{-|+@}allow_proxiable
3684 @code{-allow_proxiable} prohibits principals from obtaining proxiable tickets. (Sets the @samp{KRB5_KDB_DISALLOW_PROXABLE} flag.) @code{+allow_proxiable} clears this flag.
3685 @itemx @{-|+@}allow_dup_skey
3686 @code{-allow_dup_skey} Disables user-to-user authentication for principals by prohibiting principals from obtaining a sessions key for another user. (Sets the @samp{KRB5_KDB_DISALLOW_DUP_SKEY} flag.). @code{+allow_dup_skey} clears This flag.
3687 @itemx @{-|+@}requires_preauth
3688 @code{+requires_preauth} requires principals to preauthenticate before being allowed to kinit. (Sets the @samp{KRB5_KDB_REQURES_PRE_AUTH} flag.) 
3689 @code{-requires_preauth} clears this flag.
3690
3691 @itemx @{-|+@}requires_hwauth
3692 @code{+requires_hwauth} requires principals to preauthenticate using a
3693 hardware device before being allowed to kinit. (Sets the
3694 @samp{KRB5_KDB_REQURES_HW_AUTH} flag.)  @code{-requires_hwauth} clears
3695 this flag.
3696
3697 @itemx @{-|+@}allow_svr
3698 @code{-allow_svr} prohibits the issuance of service tickets for principals. (Sets the @samp{KRB5_KDB_DISALLOW_SVR} flag.) @code{+allow_svr} clears This flag.
3699 @itemx @{-|+@}allow_tgs_req
3700 @code{-allow_tgs_req} specifies that a @dfn{Ticket-Granting Service (TGS)} request for a service ticket for principals is not permitted. This option is useless for most things.@code{+allow_tgs_req} clears this flag. 
3701 The default is @code{+allow_tgs_req}.  In effect,
3702 @code{-allow_tgs_req} sets the @samp{KRB5_KDB_DISALLOW_TGT_BASED} flag
3703 on principals in the database.
3704
3705 @itemx @{-|+@}allow_tix
3706 @code{-allow_tix} forbids the issuance of any tickets for
3707 principals.  @code{+allow_tix} clears this flag.  The default is
3708 @code{+allow_tix}.  In effect, @code{-allow_tix} sets the
3709 @samp{KRB5_KDB_DISALLOW_ALL_TIX} flag on principals in the database.
3710
3711 @itemx @{-|+@}needchange
3712 @code{+needchange} sets a flag in attributes field to force a password change; 
3713 @code{-needchange} clears it. The default is @code{-needchange}.  In
3714 effect, @code{+needchange} sets the @samp{KRB5_KDB_REQURES_PWCHANGE}
3715 flag on principals in the database.
3716
3717 @itemx @{-|+@}password_changing_service
3718 @code{+password_changing_service} sets a flag in the attributes field
3719 marking principal as a password change service principal (useless for
3720 most things).  @code{-password_changing_service} clears the flag.
3721 This flag intentionally has a long name.  The default is
3722 @code{-password_changing_service}.  In effect,
3723 @code{+password_changing_service} sets the
3724 @samp{KRB5_KDB_PWCHANGE_SERVICE} flag on principals in the database.
3725 @end table
3726
3727 @itemx policy_name
3728 Specifies the name of the ticket policy.
3729
3730 @end table
3731 @noindent
3732 For example:
3733 @smallexample
3734 @group
3735 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu create_policy 
3736 -r ATHENA.MIT.EDU -maxtktlife "1 day" -maxrenewlife "1 week" -allow_forwardable usertktpolicy
3737 @b{Password for "cn=admin,dc=example,dc=com":}
3738 shell%
3739 @end group
3740 @end smallexample
3741
3742 @node Retrieving Information About a Ticket Policy, Destroying a Ticket Policy, Creating and Modifying a Ticket Policy, Global Operations on the Kerberos LDAP Database
3743 @subsection Retrieving Information About a Ticket Policy
3744
3745 @table @b
3746 @b{view_policy} [@b{-r} @i{realm}] @b{policy_name}
3747
3748 @itemx view_policy 
3749 This option displays the attributes of a ticket policy. Option is as follows:
3750
3751 @itemx @b{-r} @i{realm}
3752 Specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm(3) is used.
3753 @itemx policy_name
3754 Specifies the name of the ticket policy.
3755 @end table
3756
3757 For example:
3758 @smallexample
3759 @group
3760 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu view_policy 
3761 -r ATHENA.MIT.EDU usertktpolicy
3762 @b{Password for "cn=admin,dc=example,dc=com":}
3763 @b{Ticket policy: usertktpolicy}
3764 @b{Maxmum ticket life: 0 days 01:00:00}
3765 @b{Maxmum renewable life: 0 days 10:00:00}
3766 @b{Ticket flags: DISALLOW_FORWARDABLE REQUIRES_PWCHANGE}
3767 shell% 
3768 @end group
3769 @end smallexample
3770
3771
3772 @node Destroying a Ticket Policy, Listing available Ticket Policies, Retrieving Information About a Ticket Policy, Global Operations on the Kerberos LDAP Database
3773 @subsection Destroying a Ticket Policy
3774
3775 @table @b
3776 @itemx @b{destroy_policy} @b{[-force]} @b{[-r} @i{realm}@b{]} @b{policy_name}
3777 Destroys an existing ticket policy. Options are as follows:
3778
3779 @table @b
3780
3781 @itemx -force
3782 Forces the deletion of the policy object. If not specified, will be prompted for confirmation while deleting the policy. Enter yes to confirm the deletion.
3783
3784 @itemx -r realm
3785 Specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm(3) is used.
3786
3787 @itemx policy_name
3788 Specifies the name of the ticket policy.
3789 @end table
3790 @end table
3791 @noindent
3792 For example:
3793 @smallexample
3794 @group
3795 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu
3796 destroy_policy -r ATHENA.MIT.EDU usertktpolicy
3797 @b{Password for "cn=admin,dc=example,dc=com":}
3798 @b{This will delete the policy object 'usertktpolicy', are you sure?}
3799 @b{(type 'yes' to confirm)? Yes}
3800 @b{** policy object 'usertktpolicy' deleted.}
3801 shell% 
3802 @end group
3803 @end smallexample
3804
3805 @node Listing available Ticket Policies, Creating a Service Object (eDirectory), Destroying a Ticket Policy, Global Operations on the Kerberos LDAP Database
3806 @subsection Listing available Ticket Policies
3807
3808
3809 @table @b
3810 @itemx @b{list_policy} [@b{-r} @i{realm}]
3811 Lists the name of ticket policies in a realm.
3812
3813 Option are as follows:
3814
3815 @itemx -r realm
3816 Specifies the Kerberos realm of the database; by default the realm returned by krb5_default_local_realm(3) is used.
3817
3818 @end table
3819
3820 @noindent
3821 For example:
3822 @smallexample
3823 @group
3824 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu list_policy -r ATHENA.MIT.EDU 
3825 @b{Password for "cn=admin,dc=example,dc=com":}
3826 @b{usertktpolicy}
3827 @b{tempusertktpolicy}
3828 @b{krbtktpolicy}
3829 shell% 
3830 @end group
3831 @end smallexample
3832
3833 @node Creating a Service Object (eDirectory), Modifying a Service Object (eDirectory), Listing available Ticket Policies, Global Operations on the Kerberos LDAP Database
3834 @subsection Creating a Service Object (eDirectory)
3835 @smallexample
3836 @b{create_service} @i{-kdc|-admin|-pwd} [@b{-servicehost} @i{service_host_list}] [@b{-realm} @i{realm_list}] [@b{-randpw}|
3837 @i{-fileonly}] [@i{-filename}] @b{service_dn}
3838 @end smallexample
3839 @noindent
3840 Creates a service object in directory and assigns appropriate rights on the container holding kerberos data.
3841  
3842 Options are as follows:
3843
3844 @table @b
3845 @itemx -kdc 
3846 Specifies the KDC service
3847 @itemx -admin 
3848 Specifies the Administration service
3849 @itemx -pwd 
3850 Specifies the Password service
3851
3852 @itemx @b{-servicehost} @i{service_host_list}
3853 Specifies the list of entries separated by a colon (:). Each entry consists of the hostname or IP address of the server hosting the service, transport protocol and the port number of the service separated by a pound sign (#).
3854 @noindent 
3855 For example,
3856 @smallexample
3857 server1#tcp#88:server2#udp#89.
3858 @end smallexample
3859 @itemx @b{-realm} @i{realm_list}
3860 Specifies the list of realms that are to be associated with this service. The list contains the name of the realms separated by a colon (:). 
3861 @itemx -randpw 
3862 Generates and sets a random password. This option is used to set the random password for the service object in directory and also to store it in the file. @code{-fileonly} option cannot be used with @code{-randpw} option.
3863
3864 @itemx -fileonly
3865 Stores the password only in a file and not in directory. The @code{-randpw} option can not be used when @code{-fileonly} option is specified.
3866 @itemx @i{-f} @b{filename}
3867 Specifies the complete path of the file where the service object password is stashed. If this option is not specified, the default file will be /usr/local/var/service_passwd
3868 @itemx service_dn
3869 Specifies the Distinguished Name (DN) of the Kerberos service to be created.
3870
3871 @noindent
3872 For example:
3873 @smallexample
3874 @group
3875 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu
3876 create_service -kdc -randpw -f /home/andrew/service_passwd cn=service-kdc,dc=example,dc=com
3877 @b{Password for "cn=admin,dc=example,dc=com":}
3878 @b{File does not exist. Creating the file /home/andrew/service_passwd...}
3879 shell% 
3880 @end group
3881 @end smallexample
3882 @end table
3883
3884 @node Modifying a Service Object (eDirectory), Retrieving Service Object Information (eDirectory), Creating a Service Object (eDirectory), Global Operations on the Kerberos LDAP Database
3885 @subsection Modifying a Service Object (eDirectory)
3886 @smallexample
3887 @b{modify_service} [@b{-servicehost} @i{service_host_list} |[@b{-clearservicehost} @i{service_host_list}] [@b{-addservicehost} @i{service_host_list}]] [@b{-realm} @i{realm_list} | [@b{-clearrealm} @i{realm_list}] [@b{-addrealm} @i{realm_list}]] service_dn
3888 @end smallexample
3889
3890 Modifies the attributes of a service and assigns appropriate rights, if realm associations are changed.
3891
3892 Options are as follows:
3893
3894 @table @b
3895 @itemx @b{-servicehost} @i{service_host_list}
3896 List of entries separated by a colon (:) where each entry consists of host name or IP address of the server hosting the service, transport protocol, and port number of the service separated by a pound sign (#). This list replaces the existing list.
3897 For example, 
3898 @smallexample
3899 server1#tcp#88:server2#udp#89
3900 @end smallexample
3901 @itemx @b{-clearservicehost} @i{service_host_list}
3902 Specifies the list of servicehost entries to be removed from the existing list. This is a colon separated list. 
3903 @itemx @b{-addservicehost} @i{service_host_list}
3904 Specifies the list of servicehost entries to be added to the existing list. This is a colon separated list.
3905 @itemx @b{-realm} @i{realm_list}
3906 Specifies the list of realms that are to be associated with this service. The list contains the name of the realms separated by a colon (:). This list replaces the existing list.
3907 @itemx @b{-clearrealm} @i{realm_list}
3908 Specifies the list of realms to be removed from the existing list. The list contains the name of the realms separated by a colon (:).
3909 @itemx @b{-addrealm} @i{realm_list}
3910 Specifies the list of realms to be added to the existing list. The list contains the name of the realms separated by a colon (:).
3911 @itemx service_dn
3912 Specifies the Distinguished Name (DN) of the Kerberos service to be modified.
3913
3914 @end table
3915
3916 @noindent
3917 For example:
3918
3919 @smallexample
3920 @group
3921 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu
3922 modify_service -realm ATHENA.MIT.EDU cn=service-kdc,dc=example,dc=com
3923 @b{Password for "cn=admin,dc=example,dc=com":}
3924 @b{Changing rights for the service object. Please wait ... done}
3925 shell% 
3926 @end group
3927 @end smallexample
3928 @node Retrieving Service Object Information (eDirectory), Destroying a Service Object (eDirectory), Modifying a Service Object (eDirectory), Global Operations on the Kerberos LDAP Database
3929 @subsection Retrieving Service Object Information (eDirectory)
3930
3931 @table @b
3932 @itemx view_service service_dn
3933 Displays the attributes of a service. Options are as follows:
3934
3935 @itemx service_dn
3936 Specifies the Distinguished name (DN) of the Kerberos service to be viewed.
3937 @end table
3938
3939 For example:
3940 @smallexample
3941 @group
3942 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu 
3943 view_service cn=service-kdc,dc=example,dc=com
3944 @b{Password for "cn=admin,dc=example,dc=com":}
3945 @b{Service dn: cn=service-kdc,dc=example,dc=com}
3946 @b{Service type: kdc}
3947 @b{Service host list:}
3948 @b{Realm DN list: cn=ATHENA.MIT.EDU,cn=Kerberos,dc=example,dc=com}
3949 shell% 
3950 @end group
3951 @end smallexample
3952
3953 @node Destroying a Service Object (eDirectory), Listing Available Service Objects (eDirectory), Retrieving Service Object Information (eDirectory), Global Operations on the Kerberos LDAP Database
3954 @subsection Destroying a Service Object (eDirectory)
3955 @smallexample
3956 @b{destroy_service} [@b{-force}] [@b{-f} @i{stashfilename}] service_dn
3957 @end smallexample
3958 @noindent
3959 Destroys an existing service. Options are as follows :
3960
3961 @table @b
3962 @itemx -force
3963 If specified, will not prompt for user's confirmation, instead will force destruction of service.
3964 @itemx @b{-f} @i{stashfilename}
3965 Complete path of the service password file from where the entry corresponding to the service_dn needs to be removed.
3966 @itemx service_dn
3967 Distinguished Name (DN) of the Kerberos service to be destroyed.
3968 @end table
3969 @noindent
3970 For example:
3971 @smallexample
3972 @group
3973 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu
3974 destroy_service cn=service-kdc,dc=example,dc=com
3975 @b{Password for "cn=admin,dc=example,dc=com":}
3976 @b{This will delete the service object 'cn=service-kdc,dc=example,dc=com', are you sure?}
3977 @b{(type 'yes' to confirm)? Yes}
3978 @b{** service object 'cn=service-kdc,dc=example,dc=com' deleted.}
3979 shell% 
3980 @end group
3981 @end smallexample
3982
3983 @node Listing Available Service Objects (eDirectory), Passwords for Service Objects (eDirectory), Destroying a Service Object (eDirectory), Global Operations on the Kerberos LDAP Database
3984 @subsection Listing Available Service Objects (eDirectory)
3985
3986 @table @b
3987 @itemx list_service [-basedn base_dn]
3988 Lists the name of services under a given base in directory. Options is as follows:
3989
3990 @itemx @b{-basedn} @i{base_dn}
3991 Specifies the base DN for searching the policies, limiting the search to a particular subtree. If this option is not provided, LDAP Server specific search base will be used. For e.g., in the case of OpenLDAP, value of @code{defaultsearchbase} from @file{slapd.conf} file will be used, where as in the case of eDirectory, the default value for the base DN is Root.
3992 @end table
3993
3994 @noindent
3995 For example:
3996 @smallexample
3997 @group
3998 shell% kdb5_ldap_util -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu list_service
3999 @b{Password for "cn=admin,dc=example,dc=com":}
4000 @b{cn=service-kdc,dc=example,dc=com}
4001 @b{cn=service-adm,dc=example,dc=com}
4002 @b{cn=service-pwd,dc=example,dc=com}
4003 shell% 
4004 @end group
4005 @end smallexample
4006
4007 @node Passwords for Service Objects (eDirectory),  , Listing Available Service Objects (eDirectory), Global Operations on the Kerberos LDAP Database
4008 @subsection Passwords for Service Objects (eDirectory)
4009
4010 @b{setsrvpw} @b{[-randpw|-fileonly]}@b{[-f} @i{ filename}@b{]} @b{service_dn}
4011
4012 Allows an administrator to set password for service objects such as KDC and Administration server in eDirectory and store them in a file. The 
4013 @code{-fileonly} command stores the password in a file and not in the eDirectory object. 
4014 Options are as follows:
4015 @table @b
4016 @itemx @b{-randpw} 
4017 Generates and sets a random password on the directory object and stores it in the file. The @code{-fileonly} option can not be used if @code{-randpw} option is already specified.
4018 @itemx @b{-fileonly}
4019 Stores the password only in a file and not in eDirectory. The @code{-randpw} option can not be used when @code{-fileonly} option is specified.
4020 @itemx @b{-f} @i{filename}
4021 Specifies the complete path of the file where the service object password is stashed. If this option is not specified, the default file will be /usr/local/var/service_passwd.
4022 @itemx service_dn
4023 Specifies the Distinguished Name (DN) of the service object whose password is to be set.
4024
4025 @end table
4026
4027
4028 @noindent
4029 For example:
4030
4031 @smallexample
4032 @group
4033 shell% kdb5_ldap_util setsrvpw -D cn=admin,dc=example,dc=com -H ldaps://ldap-server1.mit.edu
4034 setsrvpw -f /home/andrew/conf_keyfile cn=service-kdc,dc=example,dc=com
4035 @b{Password for "cn=admin,dc=example,dc=com":}
4036 @b{Password for "cn=service-kdc,dc=example,dc=com":}
4037 @b{Re-enter password for "cn=service-kdc,dc=example,dc=com":}
4038 shell% 
4039 @end group
4040 @end smallexample
4041
4042 @ignore
4043 @c @node The KDC Logs,  , GLobal operations on the Kerberos LDAP Database, Administrating the Kerberos Database
4044 @c @section The KDC Logs
4045
4046 This will have to wait until the next release.  *sigh*
4047 @end ignore
4048
4049 @node Cross-realm Authentication, Changing the krbtgt Key, Global Operations on the Kerberos LDAP Database, Administrating the Kerberos Database
4050 @section Cross-realm Authentication
4051
4052 In order for a KDC in one realm to authenticate Kerberos users in a
4053 different realm, it must share a key with the KDC in the other realm.
4054 In both databases, there must be krbtgt service principals for realms.
4055 These principals should all have the same passwords, key version
4056 numbers, and encryption types.  For example, if the administrators of
4057 @value{PRIMARYREALM} and @value{SECONDREALM} wanted to authenticate
4058 across the realms, they would run the following commands on the KDCs in
4059 @i{both} realms:
4060
4061 @smallexample
4062 @group
4063 @b{shell%:} kadmin.local -e "des3-hmac-sha1:normal des-cbc-crc:v4"
4064 @b{kadmin:} addprinc -requires_preauth krbtgt/@value{PRIMARYREALM}@@@value{SECONDREALM}
4065 @b{Enter password for principal krbtgt/@value{PRIMARYREALM}@@@value{SECONDREALM}:} 
4066 @b{Re-enter password for principal krbtgt/@value{PRIMARYREALM}@@@value{SECONDREALM}:}
4067 @b{kadmin:} addprinc -requires_preauth krbtgt/@value{SECONDREALM}@@@value{PRIMARYREALM}
4068 @b{Enter password for principal krbtgt/@value{SECONDREALM}@@@value{PRIMARYREALM}:}
4069 @b{Enter password for principal krbtgt/@value{SECONDREALM}@@@value{PRIMARYREALM}:}
4070 @b{kadmin:}
4071 @end group
4072 @end smallexample
4073
4074 Even if most principals in a realm are generally created with the
4075 requires_preauth flag enabled, this flag is not desirable on
4076 cross-realm authentication keys because doing so makes it impossible to
4077 disable preauthentication on a service-by-service basis.  Disabling it
4078 as in the example above is recommended.
4079
4080 It is also very important that these principals have good passwords.
4081 @value{COMPANY} recommends that TGT principal passwords be at least 26
4082 characters of random ASCII text.
4083
4084 @node Changing the krbtgt Key,  , Cross-realm Authentication, Administrating the Kerberos Database
4085 @section Changing the krbtgt Key
4086
4087 A Kerberos Ticket Granting Ticket (TGT) is a service ticket for the
4088 principal krbtgt/@i{REALM}.  The key for this principal is created when
4089 the Kerberos database is initialized and need not be changed.  However,
4090 it will only have the encryption types supported by the KDC at the time
4091 of the initial database creation.  To allow use of newer encryption
4092 types for the TGT, this key has to be changed.
4093
4094 Changing this key using the normal @code{kadmin change_password} command
4095 would invalidate any previously issued TGTs.  Therefore, when changing
4096 this key, normally one should use the @b{-keepold} flag to
4097 @code{change_password} to retain the previous key in the database as
4098 well as the new key.  For example:
4099
4100 @smallexample
4101 @group
4102 @b{kadmin:} change_password -randkey -keepold krbtgt/@value{PRIMARYREALM}@@@value{PRIMARYREALM}
4103 @end group
4104 @end smallexample
4105
4106 After issuing this command, the old key is still valid and is still
4107 vulnerable to (for instance) brute force attacks.  To completely
4108 retire an old key or encryption type, run the @code{purgekeys} command
4109 to delete keys with older kvnos, ideally first making sure that all
4110 tickets issued with the old keys have expired.
4111
4112 @node Configuring Kerberos with OpenLDAP back-end, Application Servers, Administrating the Kerberos Database, Top
4113 @chapter Configuring Kerberos with OpenLDAP back-end
4114
4115 @enumerate
4116 @item
4117 Set up SSL on the OpenLDAP server and client to ensure secure
4118 communication when the KDC service and LDAP server are on different
4119 machines. @code{ldapi://} can be used if the LDAP server and KDC
4120 service are running on the same machine.
4121
4122 @enumerate A
4123 @item
4124 Setting up SSL on the OpenLDAP server:
4125
4126 @enumerate a
4127 @item
4128 Get a CA certificate using OpenSSL tools
4129
4130 @item
4131 Configure OpenLDAP server for using SSL/TLS
4132
4133 @noindent
4134    For the latter, you need to specify the location of CA certificate location in slapd.conf file.
4135
4136 @noindent
4137    Refer to the following link for more information:
4138
4139 @noindent
4140 @uref{http://www.openldap.org/doc/admin23/tls.html}
4141 @end enumerate
4142
4143 @item
4144 Setting up SSL on OpenLDAP Client:
4145
4146 @enumerate a
4147 @item
4148 For the KDC and Admin Server, you need to do the client-side configuration in ldap.conf.
4149
4150 @noindent
4151 For example,
4152 @smallexample
4153 TLS_CACERT @code{/etc/openldap/certs/cacert.pem}
4154 @end smallexample
4155 @end enumerate
4156 @end enumerate
4157
4158 @item
4159 Include the Kerberos schema file (kerberos.schema) in the
4160 configuration file (slapd.conf) on the LDAP Server, by providing the
4161 location where it is stored.
4162
4163 @smallexample
4164 include @code{/etc/openldap/schema/kerberos.schema}
4165 @end smallexample
4166
4167 @item
4168 Choose DNs for the KDC and kadmin servers to bind to the LDAP server,
4169 and create them if necessary.  These DNs will be specified with the
4170 @code{ldap_kdc_dn} and @code{ldap_kadmind_dn} directives in krb5.conf;
4171 their passwords can be stashed with @code{kdb5_ldap_util stashsrvpw}
4172 and the resulting file specified with the
4173 @code{ldap_service_password_file} directive.
4174
4175 @item
4176 Choose a DN for the global Kerberos container entry (but do not create
4177 the entry at this time).  This DN will be specified with the
4178 @code{ldap_kerberos_container_dn} directive in krb5.conf.  Realm
4179 container entries will be created underneath this DN.  Principal
4180 entries may exist either underneath the realm container (the default)
4181 or in separate trees referenced from the realm container.
4182
4183 @item
4184 Configure the LDAP server ACLs to enable the KDC and kadmin server DNs
4185 to read and write the Kerberos data.
4186
4187 @subheading
4188 Sample access control information
4189
4190 @smallexample
4191 access to dn.base=""
4192         by * read
4193                                                                                                                                                              
4194 access to dn.base="cn=Subschema"
4195         by * read
4196                                                                                                                                                              
4197 access to attrs=userPassword,userPKCS12
4198         by self write
4199         by * auth
4200                                                                                                                                                              
4201 access to attrs=shadowLastChange
4202         by self write
4203         by * read
4204
4205 # Providing access to realm container
4206 access to @code{dn.subtree}= @i{"cn=EXAMPLE.COM,cn=krbcontainer,dc=example,dc=com"} 
4207         by @code{dn.exact}=@i{"cn=kdc-service,dc=example,dc=com"} read
4208         by @code{dn.exact}=@i{"cn=adm-service,dc=example,dc=com"} write
4209         by * none
4210
4211 # Providing access to principals, if not underneath realm container
4212 access to @code{dn.subtree}= @i{"ou=users,dc=example,dc=com"} 
4213         by @code{dn.exact}=@i{"cn=kdc-service,dc=example,dc=com"} read
4214         by @code{dn.exact}=@i{"cn=adm-service,dc=example,dc=com"} write
4215         by * none
4216
4217 access to *
4218         by * read
4219 @end smallexample
4220
4221 @noindent
4222 If the locations of the container and principals or the DNs of the
4223 service objects for a realm are changed then this information should
4224 be updated.
4225
4226 @item
4227 Start the LDAP server as follows: 
4228 @smallexample
4229 slapd -h "ldapi:/// ldaps:///"
4230 @end smallexample
4231  
4232 @item
4233 Modify the krb5.conf file to include LDAP specific items listed below:
4234 @smallexample
4235 @samp{realms}
4236 @noindent  @samp{database_module}
4237 @noindent
4238 @samp{dbmodules}
4239 @noindent  @samp{db_library}
4240 @noindent  @samp{db_module_dir}
4241 @noindent  @samp{ldap_kdc_dn}
4242 @noindent  @samp{ldap_kadmind_dn}
4243 @noindent  @samp{ldap_service_password_file}
4244 @noindent  @samp{ldap_servers}
4245 @noindent  @samp{ldap_conns_per_server}
4246 @end smallexample
4247
4248 @noindent
4249 For the sample @file{krb5.conf} file, refer to @ref{Sample krb5.conf File}.
4250 @noindent
4251 For more details, refer to the section @file{krb5.conf}
4252
4253 @item
4254 Create the realm using @samp{kdb5_ldap_util}.
4255
4256 @smallexample
4257 @b{kdb5_ldap_util} @b{-D} @i{cn=admin,dc=example,dc=com} create @b{-subtrees} @i{ou=users,dc=example,dc=com} @b{-r} @i{EXAMPLE.COM} @b{-s}
4258 @end smallexample
4259
4260 @noindent
4261 Use the @code{-subtrees} option if the principals are to exist in a separate subtree from the realm container.  Before executing the command, make sure that the subtree mentioned above @samp{(ou=users,dc=example,dc=com)} exists.  If the principals will exist underneath the realm container, omit the @code{-subtrees} option and do not worry about creating the principal subtree.
4262
4263 For more information, refer to the section @dfn{Global Operations on the Kerberos LDAP Database}.
4264
4265 @noindent
4266 The realm object is created under the ldap_kerberos_container_dn specified in the configuration file. This operation will also create the Kerberos container, if not present already. This will be used to store information related to all realms.
4267
4268 @item 
4269 Stash the password of the service object used by the KDC and
4270 Administration service to bind to the LDAP server using the stashsrvpw
4271 command of kdb5_ldap_util. The object DN should be the same as
4272 ldap_kdc_dn and ldap_kadmind_dn values specified in the krb5.conf
4273 file.
4274
4275 @smallexample
4276 @b{kdb5_ldap_util} @b{-D} @i{cn=admin,dc=example,dc=com} @i{stashsrvpw} @b{-f} @code{/etc/kerberos/service.keyfile} @i{cn=krbadmin,dc=example,dc=com}
4277 @end smallexample
4278
4279 @item
4280 Add krb5principalname to the indexes in slapd.conf to speed up the access.
4281 @end enumerate
4282
4283 With the LDAP back end it is possible to provide aliases for principal
4284 entries.  Currently we provide no mechanism provided for creating
4285 aliases, so it must be done by direct manipulation of the LDAP
4286 entries.
4287
4288 An entry with aliases contains multiple values of the krbPrincipalName
4289 attribute.  Since LDAP attribute values are not ordered, it is
4290 necessary to specify which principal name is canonical, by using the
4291 krbCanonicalName attribute.  Therefore, to create aliases for an
4292 entry, first set the krbCanonicalName attribute of the entry to the
4293 canonical principal name (which should be identical to the
4294 pre-existing krbPrincipalName value), and then add additional
4295 krbPrincipalName attributes for the aliases.
4296
4297 Principal aliases are only returned by the KDC when the client
4298 requests canonicalization.  Canonicalization is normally requested for
4299 service principals; for client principals, an explicit flag is often
4300 required (e.g. @code{kinit -C}) and canonicalization is only performed
4301 for initial ticket requests.
4302
4303 @node Application Servers, Backups of Secure Hosts, Configuring Kerberos with OpenLDAP back-end, Top
4304 @chapter Application Servers
4305
4306 If you need to install the @value{PRODUCT} programs on an application
4307 server, please refer to the @value{PRODUCT} Installation Guide.  Once
4308 you have installed the software, you need to add that host to the
4309 Kerberos database (@pxref{Adding or Modifying Principals}), and generate
4310 a @dfn{keytab} for that host, that contains the host's key.  You also
4311 need to make sure the host's clock is within your maximum clock skew of
4312 the KDCs.
4313
4314 @menu
4315 * Keytabs::                     
4316 * Clock Skew::                  
4317 * Getting DNS Information Correct::  
4318 * Configuring Your Firewall to Work With Kerberos V5::  
4319 @end menu
4320
4321 @node Keytabs, Clock Skew, Application Servers, Application Servers
4322 @section Keytabs
4323
4324 A @dfn{keytab} is a host's copy of its own keylist, which is analogous
4325 to a user's password.  An application server that needs to authenticate
4326 itself to the KDC has to have a keytab that contains its own principal
4327 and key.  Just as it is important for users to protect their passwords,
4328 it is equally important for hosts to protect their keytabs.  You should
4329 always store keytab files on local disk, and make them readable only by
4330 root, and you should never send a keytab file over a network in the
4331 clear.  Ideally, you should run the @code{kadmin} command to extract a
4332 keytab on the host on which the keytab is to reside.
4333
4334 @menu
4335 * Adding Principals to Keytabs::  
4336 * Removing Principals from Keytabs::  
4337 @end menu
4338
4339 @node Adding Principals to Keytabs, Removing Principals from Keytabs, Keytabs, Keytabs
4340 @subsection Adding Principals to Keytabs
4341
4342 To generate a keytab, or to add a principal to an existing keytab, use
4343 the @code{ktadd} command from @code{kadmin}, which requires the
4344 ``inquire'' administrative privilege.  (If you use the @b{-glob}
4345 @i{princ_exp} option, it also requires the ``list'' administrative
4346 privilege.)  The syntax is:
4347
4348 @smallexample
4349 @b{ktadd} [@b{-k[eytab]} @i{keytab}] [@b{-q}] [@b{-e}
4350 @i{key:salt_list}] [@i{principal} | @b{-glob} @i{princ_exp}]
4351 [@i{@dots{}}]
4352 @end smallexample
4353
4354 The @code{ktadd} command takes the following switches:
4355
4356 @table @b
4357 @item -k[eytab] @i{keytab}
4358 use @i{keytab} as the keytab file.  Otherwise, @code{ktadd} will use the
4359 default keytab file (@code{@value{DefaultDefaultKeytabName}}).
4360
4361 @item @b{-e} @i{"enc:salt..."} 
4362 Uses the specified list of enctype-salttype pairs for setting the key
4363 of the principal.  The quotes are necessary if there are multiple
4364 enctype-salttype pairs.  This will not function against kadmin daemons
4365 earlier than krb5-1.2.  See @ref{Supported Encryption Types} and
4366 @ref{Salts} for all possible values.
4367
4368 @item -q
4369 run in quiet mode.  This causes @code{ktadd} to display less verbose
4370 information.
4371
4372 @item @i{principal} | -glob @i{principal expression}
4373 add @i{principal}, or all principals matching @i{principal expression}
4374 to the keytab.  The rules for @i{principal expression} are the same as
4375 for the kadmin @code{list_principals} (@pxref{Retrieving a List of
4376 Principals}) command.
4377 @end table
4378
4379 Here is a sample session, using configuration files that enable only
4380 @samp{des-cbc-crc} encryption. (The line beginning with @result{} is a
4381 continuation of the previous line.)
4382
4383 @smallexample
4384 @group
4385 @b{kadmin:} ktadd host/@value{RANDOMHOST1}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}
4386 @b{kadmin: Entry for principal host/@value{RANDOMHOST1}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM} with
4387      kvno 2, encryption type DES-CBC-CRC added to keytab
4388      WRFILE:/etc/krb5.keytab.
4389 kadmin:}
4390 @end group
4391 @end smallexample
4392
4393 @smallexample
4394 @group
4395 @b{kadmin:} ktadd -k @value{ROOTDIR}/var/krb5kdc/kadmind.keytab
4396 @result{} kadmin/admin kadmin/changepw
4397 @b{kadmin: Entry for principal kadmin/admin@@@value{PRIMARYREALM} with
4398      kvno 3, encryption type DES-CBC-CRC added to keytab
4399      WRFILE:@value{ROOTDIR}/var/krb5kdc/kadmind.keytab.
4400 kadmin:}
4401 @end group
4402 @end smallexample
4403
4404 @node Removing Principals from Keytabs,  , Adding Principals to Keytabs, Keytabs
4405 @subsection Removing Principals from Keytabs
4406
4407 To remove a principal from an existing keytab, use the kadmin
4408 @code{ktremove} command.  The syntax is:
4409
4410 @smallexample
4411 @b{ktremove} [@b{-k[eytab]} @i{keytab}] [@b{-q}] @i{principal} [@i{kvno} | @b{all} | @b{old}]
4412 @end smallexample
4413
4414 The @code{ktremove} command takes the following switches:
4415
4416 @table @b
4417 @item -k[eytab] @i{keytab}
4418 use @i{keytab} as the keytab file.  Otherwise, @code{ktremove} will use
4419 the default keytab file (@code{/etc/krb5.keytab}).
4420
4421 @item -q
4422 run in quiet mode.  This causes @code{ktremove} to display less verbose
4423 information.
4424
4425 @item @i{principal}
4426 the principal to remove from the keytab.  (Required.)
4427
4428 @item @i{kvno}
4429 remove all entries for the specified principal whose Key Version Numbers
4430 match @i{kvno}.
4431
4432 @item all
4433 remove all entries for the specified principal
4434
4435 @item old
4436 remove all entries for the specified principal except those with the
4437 highest kvno.
4438 @end table
4439
4440 For example:
4441
4442 @smallexample
4443 @group
4444 @b{kadmin:} ktremove -k @value{ROOTDIR}/var/krb5kdc/kadmind.keytab kadmin/admin
4445 @b{kadmin: Entry for principal kadmin/admin with kvno 3 removed
4446      from keytab WRFILE:@value{ROOTDIR}/var/krb5kdc/kadmind.keytab.
4447 kadmin:}
4448 @end group
4449 @end smallexample
4450
4451 @node Clock Skew, Getting DNS Information Correct, Keytabs, Application Servers
4452 @section Clock Skew
4453
4454 In order to prevent intruders from resetting their system clocks in
4455 order to continue to use expired tickets, @value{PRODUCT} is set up to
4456 reject ticket requests from any host whose clock is not within the
4457 specified maximum clock skew of the KDC (as specified in the
4458 @code{kdc.conf} file).  Similarly, hosts are configured to reject
4459 responses from any KDC whose clock is not within the specified maximum
4460 clock skew of the host (as specified in the @code{krb5.conf} file).  The
4461 default value for maximum clock skew is @value{DefaultClockskew}.
4462
4463 @value{COMPANY} suggests that you add a line to client machines'
4464 @code{/etc/rc} files to synchronize the machine's clock to your KDC at
4465 boot time.  On UNIX hosts, assuming you had a kdc called
4466 @code{@value{KDCSERVER}} in your realm, this would be:
4467
4468 @smallexample
4469 gettime -s @value{KDCSERVER}
4470 @end smallexample
4471
4472 If the host is not likely to be rebooted frequently, you may also want
4473 to set up a cron job that adjusts the time on a regular basis.
4474
4475 @node Getting DNS Information Correct, Configuring Your Firewall to Work With Kerberos V5, Clock Skew, Application Servers
4476 @section Getting DNS Information Correct
4477
4478 Several aspects of Kerberos rely on name service.  In order for Kerberos
4479 to provide its high level of security, it is less forgiving of name
4480 service problems than some other parts of your network.  It is important
4481 that your Domain Name System (DNS) entries and your hosts have the
4482 correct information.
4483
4484 Each host's canonical name must be the fully-qualified host name
4485 (including the domain), and each host's IP address must reverse-resolve
4486 to the canonical name.
4487
4488 Other than the @code{localhost} entry, make all entries in each
4489 machine's @code{/etc/hosts} file in the following form:
4490
4491 @smallexample
4492 IP address      fully-qualified hostname        aliases
4493 @end smallexample
4494
4495 Here is a sample @code{/etc/hosts} file:
4496
4497 @smallexample
4498 @group
4499 # this is a comment
4500 127.0.0.1       localhost localhost@@@value{PRIMARYDOMAIN}
4501 @value{RANDOMHOST1IP}       @value{RANDOMHOST1}.@value{PRIMARYDOMAIN} trillium wake-robin
4502 @end group
4503 @end smallexample
4504
4505 Additionally, on Solaris machines, you need to be sure the ``hosts''
4506 entry in the file @* @code{/etc/nsswitch.conf} includes the source
4507 ``dns'' as well as ``file''.
4508
4509 Finally, each host's keytab file must include a host/key pair for the
4510 host's canonical name.  You can list the keys in a keytab file by
4511 issuing the command @code{klist -k}.  For example:
4512
4513 @smallexample
4514 @group
4515 viola# klist -k
4516 Keytab name: /etc/krb5.keytab
4517 KVNO Principal
4518 ---- ------------------------------------------------------------
4519    1 host/@value{RANDOMHOST1}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}
4520 @end group
4521 @end smallexample
4522
4523 If you telnet to the host with a fresh credentials cache (ticket file),
4524 and then @code{klist}, the host's service principal should be
4525 @i{host/fully-qualified-hostname@@REALM_NAME}.
4526
4527 @node Configuring Your Firewall to Work With Kerberos V5,  , Getting DNS Information Correct, Application Servers
4528 @section Configuring Your Firewall to Work With @value{PRODUCT}
4529
4530 If you need off-site users to be able to get Kerberos tickets in your
4531 realm, they must be able to get to your KDC.  This requires either that
4532 you have a slave KDC outside your firewall, or you configure your
4533 firewall to allow UDP requests into at least one of your KDCs, on
4534 whichever port the KDC is running.  (The default is port
4535 @value{DefaultPort}; other ports may be specified in the KDC's kdc.conf
4536 file.)  Similarly, if you need off-site users to be able to change
4537 their passwords in your realm, they must be able to get to your
4538 Kerberos admin server.  The default port for the admin server is
4539 @value{DefaultKadmindPort}.
4540
4541 If your on-site users inside your firewall will need to get to KDCs in
4542 other realms, you will also need to configure your firewall to allow
4543 outgoing TCP and UDP requests to port @value{DefaultPort}.
4544 Additionally, if they will need to get to any Kerberos V4 KDCs, you may
4545 also need to allow TCP and UDP requests to port
4546 @value{DefaultSecondPort}.  If your on-site users inside your firewall
4547 will need to get to Kerberos admin servers in other realms, you will
4548 also need to allow outgoing TCP and UDP requests to port
4549 @value{DefaultKadmindPort}.
4550
4551 If any of your KDCs are outside your firewall, you will need to allow
4552 @code{kprop} requests to get through to the remote KDC.  @code{Kprop}
4553 uses the krb5_prop service on port @value{DefaultKrbPropPort} (tcp).
4554
4555 If you need your off-site users to have access to machines inside your
4556 firewall, you need to allow TCP connections from their off-site hosts on
4557 the appropriate ports for the programs they will be using.  The
4558 following lines from @code{/etc/services} show the default port numbers
4559 for the @value{PRODUCT} programs:
4560
4561 @smallexample
4562 @group
4563 ftp           @value{DefaultFTPPort}/tcp           # Kerberos ftp and telnet use the
4564 telnet        @value{DefaultTelnetPort}/tcp           # default ports
4565 kerberos      @value{DefaultPort}/udp    kdc    # Kerberos V5 KDC
4566 kerberos      @value{DefaultPort}/tcp    kdc    # Kerberos V5 KDC
4567 klogin        @value{DefaultKloginPort}/tcp          # Kerberos authenticated rlogin
4568 kshell        @value{DefaultKshellPort}/tcp   cmd    # and remote shell
4569 kerberos-adm  @value{DefaultKadmindPort}/tcp          # Kerberos 5 admin/changepw
4570 kerberos-adm  @value{DefaultKadmindPort}/udp          # Kerberos 5 admin/changepw
4571 krb5_prop     @value{DefaultKrbPropPort}/tcp          # Kerberos slave propagation
4572 @c kpop          1109/tcp         # Pop with Kerberos
4573 eklogin       @value{DefaultEkloginPort}/tcp         # Kerberos auth. & encrypted rlogin
4574 @end group
4575 @end smallexample
4576
4577 By default, @value{PRODUCT} @code{telnet} and @code{ftp} use the same
4578 ports as the standard @code{telnet} and @code{ftp} programs, so if you
4579 already allow telnet and ftp connections through your firewall, the
4580 @value{PRODUCT} versions will get through as well.  If you do not
4581 already allow telnet and ftp connections through your firewall, but need
4582 your users to be able to use @value{PRODUCT} telnet and ftp, you can
4583 either allow ftp and telnet connections on the standard ports, or switch
4584 these programs to non-default port numbers and allow ftp and telnet
4585 connections on those ports to get through.
4586
4587 @value{PRODUCT} @code{rlogin} uses the @code{klogin} service, which by
4588 default uses port @value{DefaultKloginPort}.  Encrypted @value{PRODUCT}
4589 rlogin uses the @code{eklogin} service, which by default uses port
4590 @value{DefaultEkloginPort}.
4591
4592 @value{PRODUCT} @code{rsh} uses the @code{kshell} service, which by
4593 default uses port @value{DefaultKshellPort}.  However, the server must
4594 be able to make a TCP connection from the kshell port to an arbitrary
4595 port on the client, so if your users are to be able to use @code{rsh}
4596 from outside your firewall, the server they connect to must be able to
4597 send outgoing packets to arbitrary port numbers.  Similarly, if your
4598 users need to run @code{rsh} from inside your firewall to hosts outside
4599 your firewall, the outside server needs to be able to connect to an
4600 arbitrary port on the machine inside your firewall.  Because
4601 @value{PRODUCT} @code{rcp} uses @code{rsh}, the same issues apply.  If
4602 you need to use @code{rsh} (or @code{rcp}) through your firewall and
4603 are concerned with the security implications of allowing connections to
4604 arbitrary ports, @value{COMPANY} suggests that you have rules that
4605 specifically name these applications and, if possible, list the allowed
4606 hosts.
4607
4608 The book @cite{UNIX System Security}, by David Curry, is a good
4609 starting point for learning to configure firewalls.
4610
4611 @ignore
4612 @c @node Enabling Users to Connect from Off-Site,  , Configuring Your Firewall to Work With @value{PRODUCT}, Application Servers
4613 @c @section Enabling Users to Connect from Off-Site
4614
4615 This will have to wait until the next release.  *sigh*
4616 @end ignore
4617
4618 @node Backups of Secure Hosts, Bug Reporting, Application Servers, Top
4619 @chapter Backups of Secure Hosts
4620
4621 When you back up a secure host, you should exclude the host's keytab
4622 file from the backup.  If someone obtained a copy of the keytab from a
4623 backup, that person could make any host masquerade as the host whose
4624 keytab was compromised.  This could be particularly dangerous if the
4625 compromised keytab was from one of your KDCs.  If the machine has a disk
4626 crash and the keytab file is lost, it is easy to generate another keytab
4627 file.  (@xref{Adding Principals to Keytabs}.)  If you are unable to
4628 exclude particular files from backups, you should ensure that the
4629 backups are kept as secure as the host's root password.
4630
4631 @menu
4632 * Backing Up the Kerberos Database::  
4633 @end menu
4634
4635 @node Backing Up the Kerberos Database,  , Backups of Secure Hosts, Backups of Secure Hosts
4636 @section Backing Up the Kerberos Database
4637
4638 As with any file, it is possible that your Kerberos database could
4639 become corrupted.  If this happens on one of the slave KDCs, you might
4640 never notice, since the next automatic propagation of the database would
4641 install a fresh copy.  However, if it happens to the master KDC, the
4642 corrupted database would be propagated to all of the slaves during the
4643 next propagation.  For this reason, @value{COMPANY} recommends that you
4644 back up your Kerberos database regularly.  Because the master KDC is
4645 continuously dumping the database to a file in order to propagate it to
4646 the slave KDCs, it is a simple matter to have a cron job periodically
4647 copy the dump file to a secure machine elsewhere on your network.  (Of
4648 course, it is important to make the host where these backups are stored
4649 as secure as your KDCs, and to encrypt its transmission across your
4650 network.)  Then if your database becomes corrupted, you can load the
4651 most recent dump onto the master KDC.  (@xref{Restoring a Kerberos
4652 Database from a Dump File}.)
4653
4654 @node Bug Reporting, Appendix, Backups of Secure Hosts, Top
4655 @chapter Bug Reporting
4656
4657 @include send-pr.texinfo
4658
4659 @node Appendix, Copyright, Bug Reporting, Top
4660 @appendix Appendix
4661
4662 @menu
4663 * Errors::                      
4664 * kadmin Time Zones::           
4665 @end menu
4666
4667 @node Errors, kadmin Time Zones, Appendix, Appendix
4668 @appendixsec Kerberos Error Messages
4669
4670 @menu
4671 * Kerberos V5 Library Error Codes::  
4672 * Kerberos V5 Database Library Error Codes::  
4673 * Kerberos V5 Magic Numbers Error Codes::  
4674 * ASN.1 Error Codes::           
4675 * GSSAPI Error Codes::          
4676 @end menu
4677
4678 @node Kerberos V5 Library Error Codes, Kerberos V5 Database Library Error Codes, Errors, Errors
4679 @appendixsubsec Kerberos V5 Library Error Codes
4680
4681 This is the Kerberos v5 library error code table.  Protocol error codes
4682 are @* ERROR_TABLE_BASE_krb5 + the protocol error code number; other
4683 error codes start at ERROR_TABLE_BASE_krb5 + 128.
4684
4685 @c error table numbering starts at 0
4686 @enumerate 0
4687 @item
4688 KRB5KDC_ERR_NONE:  No error
4689 @item
4690 KRB5KDC_ERR_NAME_EXP:  Client's entry in database has expired
4691 @item
4692 KRB5KDC_ERR_SERVICE_EXP:  Server's entry in database has expired
4693 @item
4694 KRB5KDC_ERR_BAD_PVNO:  Requested protocol version not supported
4695 @item
4696 KRB5KDC_ERR_C_OLD_MAST_KVNO:  Client's key is encrypted in an old master
4697 key
4698 @item
4699 KRB5KDC_ERR_S_OLD_MAST_KVNO:  Server's key is encrypted in an old master
4700 key
4701 @item
4702 KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN:  Client not found in Kerberos database
4703 @item
4704 KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN:  Server not found in Kerberos database
4705 @item
4706 KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE:  Principal has multiple entries in
4707 Kerberos database
4708 @item
4709 KRB5KDC_ERR_NULL_KEY:  Client or server has a null key
4710 @item
4711 KRB5KDC_ERR_CANNOT_POSTDATE:  Ticket is ineligible for postdating
4712 @item
4713 KRB5KDC_ERR_NEVER_VALID:  Requested effective lifetime is negative or
4714 too short
4715 @item
4716 KRB5KDC_ERR_POLICY:  KDC policy rejects request
4717 @item
4718 KRB5KDC_ERR_BADOPTION:  KDC can't fulfill requested option
4719 @item
4720 KRB5KDC_ERR_ETYPE_NOSUPP:  KDC has no support for encryption type
4721 @item
4722 KRB5KDC_ERR_SUMTYPE_NOSUPP:  KDC has no support for checksum type
4723 @item
4724 KRB5KDC_ERR_PADATA_TYPE_NOSUPP:  KDC has no support for padata type
4725 @item
4726 KRB5KDC_ERR_TRTYPE_NOSUPP:  KDC has no support for transited type
4727 @item
4728 KRB5KDC_ERR_CLIENT_REVOKED:  Clients credentials have been revoked
4729 @item
4730 KRB5KDC_ERR_SERVICE_REVOKED:  Credentials for server have been revoked
4731 @item
4732 KRB5KDC_ERR_TGT_REVOKED:  TGT has been revoked
4733 @item
4734 KRB5KDC_ERR_CLIENT_NOTYET:  Client not yet valid - try again later
4735 @item
4736 KRB5KDC_ERR_SERVICE_NOTYET:  Server not yet valid - try again later
4737 @item
4738 KRB5KDC_ERR_KEY_EXP:  Password has expired
4739 @item
4740 KRB5KDC_ERR_PREAUTH_FAILED:  Preauthentication failed
4741 @item
4742 KRB5KDC_ERR_PREAUTH_REQUIRED:  Additional pre-auth@-en@-ti@-ca@-tion required
4743 @item
4744 KRB5KDC_ERR_SERVER_NOMATCH:  Requested server and ticket don't match
4745 @item
4746 KRB5PLACEHOLD_27:  KRB5 error code 27
4747 @item
4748 KRB5PLACEHOLD_28:  KRB5 error code 28
4749 @item
4750 KRB5PLACEHOLD_29:  KRB5 error code 29
4751 @item
4752 KRB5PLACEHOLD_30:  KRB5 error code 30
4753 @item
4754 KRB5KRB_AP_ERR_BAD_INTEGRITY:  Decrypt integrity check failed
4755 @item
4756 KRB5KRB_AP_ERR_TKT_EXPIRED:  Ticket expired
4757 @item
4758 KRB5KRB_AP_ERR_TKT_NYV:  Ticket not yet valid
4759 @item
4760 KRB5KRB_AP_ERR_REPEAT:  Request is a replay
4761 @item
4762 KRB5KRB_AP_ERR_NOT_US:  The ticket isn't for us
4763 @item
4764 KRB5KRB_AP_ERR_BADMATCH:  Ticket/authenticator don't match
4765 @item
4766 KRB5KRB_AP_ERR_SKEW:  Clock skew too great
4767 @item
4768 KRB5KRB_AP_ERR_BADADDR:  Incorrect net address
4769 @item
4770 KRB5KRB_AP_ERR_BADVERSION:  Protocol version mismatch
4771 @item
4772 KRB5KRB_AP_ERR_MSG_TYPE:  Invalid message type
4773 @item
4774 KRB5KRB_AP_ERR_MODIFIED:  Message stream modified
4775 @item
4776 KRB5KRB_AP_ERR_BADORDER:  Message out of order
4777 @item
4778 KRB5KRB_AP_ERR_ILL_CR_TKT:  Illegal cross-realm ticket
4779 @item
4780 KRB5KRB_AP_ERR_BADKEYVER:  Key version is not available
4781 @item
4782 KRB5KRB_AP_ERR_NOKEY:  Service key not available
4783 @item
4784 KRB5KRB_AP_ERR_MUT_FAIL:  Mutual authentication failed
4785 @item
4786 KRB5KRB_AP_ERR_BADDIRECTION:  Incorrect message direction
4787 @item
4788 KRB5KRB_AP_ERR_METHOD:  Alternative authentication method required
4789 @item
4790 KRB5KRB_AP_ERR_BADSEQ:  Incorrect sequence number in message
4791 @item
4792 KRB5KRB_AP_ERR_INAPP_CKSUM:  Inappropriate type of checksum in message
4793 @item
4794 KRB5KRB_AP_PATH_NOT_ACCEPTED: Policy rejects transited path
4795 @item
4796 KRB5KRB_ERR_RESPONSE_TOO_BIG: Response too big for UDP, retry with TCP
4797 @item
4798 KRB5PLACEHOLD_53:  KRB5 error code 53
4799 @item
4800 KRB5PLACEHOLD_54:  KRB5 error code 54
4801 @item
4802 KRB5PLACEHOLD_55:  KRB5 error code 55
4803 @item
4804 KRB5PLACEHOLD_56:  KRB5 error code 56
4805 @item
4806 KRB5PLACEHOLD_57:  KRB5 error code 57
4807 @item
4808 KRB5PLACEHOLD_58:  KRB5 error code 58
4809 @item
4810 KRB5PLACEHOLD_59:  KRB5 error code 59
4811 @item
4812 KRB5KRB_ERR_GENERIC:  Generic error (see e-text)
4813 @item
4814 KRB5KRB_ERR_FIELD_TOOLONG:  Field is too long for this implementation
4815 @item
4816 KRB5PLACEHOLD_62:  KRB5 error code 62
4817 @item
4818 KRB5PLACEHOLD_63:  KRB5 error code 63
4819 @item
4820 KRB5PLACEHOLD_64:  KRB5 error code 64
4821 @item
4822 KRB5PLACEHOLD_65:  KRB5 error code 65
4823 @item
4824 KRB5PLACEHOLD_66:  KRB5 error code 66
4825 @item
4826 KRB5PLACEHOLD_67:  KRB5 error code 67
4827 @item
4828 KRB5PLACEHOLD_68:  KRB5 error code 68
4829 @item
4830 KRB5PLACEHOLD_69:  KRB5 error code 69
4831 @item
4832 KRB5PLACEHOLD_70:  KRB5 error code 70
4833 @item
4834 KRB5PLACEHOLD_71:  KRB5 error code 71
4835 @item
4836 KRB5PLACEHOLD_72:  KRB5 error code 72
4837 @item
4838 KRB5PLACEHOLD_73:  KRB5 error code 73
4839 @item
4840 KRB5PLACEHOLD_74:  KRB5 error code 74
4841 @item
4842 KRB5PLACEHOLD_75:  KRB5 error code 75
4843 @item
4844 KRB5PLACEHOLD_76:  KRB5 error code 76
4845 @item
4846 KRB5PLACEHOLD_77:  KRB5 error code 77
4847 @item
4848 KRB5PLACEHOLD_78:  KRB5 error code 78
4849 @item
4850 KRB5PLACEHOLD_79:  KRB5 error code 79
4851 @item
4852 KRB5PLACEHOLD_80:  KRB5 error code 80
4853 @item
4854 KRB5PLACEHOLD_81:  KRB5 error code 81
4855 @item
4856 KRB5PLACEHOLD_82:  KRB5 error code 82
4857 @item
4858 KRB5PLACEHOLD_83:  KRB5 error code 83
4859 @item
4860 KRB5PLACEHOLD_84:  KRB5 error code 84
4861 @item
4862 KRB5PLACEHOLD_85:  KRB5 error code 85
4863 @item
4864 KRB5PLACEHOLD_86:  KRB5 error code 86
4865 @item
4866 KRB5PLACEHOLD_87:  KRB5 error code 87
4867 @item
4868 KRB5PLACEHOLD_88:  KRB5 error code 88
4869 @item
4870 KRB5PLACEHOLD_89:  KRB5 error code 89
4871 @item
4872 KRB5PLACEHOLD_90:  KRB5 error code 90
4873 @item
4874 KRB5PLACEHOLD_91:  KRB5 error code 91
4875 @item
4876 KRB5PLACEHOLD_92:  KRB5 error code 92
4877 @item
4878 KRB5PLACEHOLD_93:  KRB5 error code 93
4879 @item
4880 KRB5PLACEHOLD_94:  KRB5 error code 94
4881 @item
4882 KRB5PLACEHOLD_95:  KRB5 error code 95
4883 @item
4884 KRB5PLACEHOLD_96:  KRB5 error code 96
4885 @item
4886 KRB5PLACEHOLD_97:  KRB5 error code 97
4887 @item
4888 KRB5PLACEHOLD_98:  KRB5 error code 98
4889 @item
4890 KRB5PLACEHOLD_99:  KRB5 error code 99
4891 @item
4892 KRB5PLACEHOLD_100:  KRB5 error code 100
4893 @item
4894 KRB5PLACEHOLD_101:  KRB5 error code 101
4895 @item
4896 KRB5PLACEHOLD_102:  KRB5 error code 102
4897 @item
4898 KRB5PLACEHOLD_103:  KRB5 error code 103
4899 @item
4900 KRB5PLACEHOLD_104:  KRB5 error code 104
4901 @item
4902 KRB5PLACEHOLD_105:  KRB5 error code 105
4903 @item
4904 KRB5PLACEHOLD_106:  KRB5 error code 106
4905 @item
4906 KRB5PLACEHOLD_107:  KRB5 error code 107
4907 @item
4908 KRB5PLACEHOLD_108:  KRB5 error code 108
4909 @item
4910 KRB5PLACEHOLD_109:  KRB5 error code 109
4911 @item
4912 KRB5PLACEHOLD_110:  KRB5 error code 110
4913 @item
4914 KRB5PLACEHOLD_111:  KRB5 error code 111
4915 @item
4916 KRB5PLACEHOLD_112:  KRB5 error code 112
4917 @item
4918 KRB5PLACEHOLD_113:  KRB5 error code 113
4919 @item
4920 KRB5PLACEHOLD_114:  KRB5 error code 114
4921 @item
4922 KRB5PLACEHOLD_115:  KRB5 error code 115
4923 @item
4924 KRB5PLACEHOLD_116:  KRB5 error code 116
4925 @item
4926 KRB5PLACEHOLD_117:  KRB5 error code 117
4927 @item
4928 KRB5PLACEHOLD_118:  KRB5 error code 118
4929 @item
4930 KRB5PLACEHOLD_119:  KRB5 error code 119
4931 @item
4932 KRB5PLACEHOLD_120:  KRB5 error code 120
4933 @item
4934 KRB5PLACEHOLD_121:  KRB5 error code 121
4935 @item
4936 KRB5PLACEHOLD_122:  KRB5 error code 122
4937 @item
4938 KRB5PLACEHOLD_123:  KRB5 error code 123
4939 @item
4940 KRB5PLACEHOLD_124:  KRB5 error code 124
4941 @item
4942 KRB5PLACEHOLD_125:  KRB5 error code 125
4943 @item
4944 KRB5PLACEHOLD_126:  KRB5 error code 126
4945 @item
4946 KRB5PLACEHOLD_127:  KRB5 error code 127
4947 @item
4948 KRB5_ERR_RCSID:  (RCS Id string for the krb5 error table)
4949 @item
4950 KRB5_LIBOS_BADLOCKFLAG:  Invalid flag for file lock mode
4951 @item
4952 KRB5_LIBOS_CANTREADPWD:  Cannot read password
4953 @item
4954 KRB5_LIBOS_BADPWDMATCH:  Password mismatch
4955 @item
4956 KRB5_LIBOS_PWDINTR:  Password read interrupted
4957 @item
4958 KRB5_PARSE_ILLCHAR:  Illegal character in component name
4959 @item
4960 KRB5_PARSE_MALFORMED:  Malformed representation of principal
4961 @item
4962 KRB5_CONFIG_CANTOPEN:  Can't open/find Kerberos configuration file
4963 @item
4964 KRB5_CONFIG_BADFORMAT:  Improper format of Kerberos configuration file
4965 @item
4966 KRB5_CONFIG_NOTENUFSPACE:  Insufficient space to return complete
4967 information
4968 @item
4969 KRB5_BADMSGTYPE:  Invalid message type specified for encoding
4970 @item
4971 KRB5_CC_BADNAME:  Credential cache name malformed
4972 @item
4973 KRB5_CC_UNKNOWN_TYPE:  Unknown credential cache type
4974 @item
4975 KRB5_CC_NOTFOUND:  Matching credential not found
4976 @item
4977 KRB5_CC_END:  End of credential cache reached
4978 @item
4979 KRB5_NO_TKT_SUPPLIED:  Request did not supply a ticket
4980 @item
4981 KRB5KRB_AP_WRONG_PRINC:  Wrong principal in request
4982 @item
4983 KRB5KRB_AP_ERR_TKT_INVALID:  Ticket has invalid flag set
4984 @item
4985 KRB5_PRINC_NOMATCH:  Requested principal and ticket don't match
4986 @item
4987 KRB5_KDCREP_MODIFIED:  KDC reply did not match expectations
4988 @item
4989 KRB5_KDCREP_SKEW:  Clock skew too great in KDC reply
4990 @item
4991 KRB5_IN_TKT_REALM_MISMATCH:  Client/server realm mismatch in initial
4992 ticket request
4993 @item
4994 KRB5_PROG_ETYPE_NOSUPP:  Program lacks support for encryption type
4995 @item
4996 KRB5_PROG_KEYTYPE_NOSUPP:  Program lacks support for key type
4997 @item
4998 KRB5_WRONG_ETYPE:  Requested encryption type not used in message
4999 @item
5000 KRB5_PROG_SUMTYPE_NOSUPP:  Program lacks support for checksum type
5001 @item
5002 KRB5_REALM_UNKNOWN:  Cannot find KDC for requested realm
5003 @item
5004 KRB5_SERVICE_UNKNOWN:  Kerberos service unknown
5005 @item
5006 KRB5_KDC_UNREACH:  Cannot contact any KDC for requested realm
5007 @item
5008 KRB5_NO_LOCALNAME:  No local name found for principal name
5009 @item
5010 KRB5_MUTUAL_FAILED:  Mutual authentication failed
5011 @item
5012 KRB5_RC_TYPE_EXISTS:  Replay cache type is already registered
5013 @item
5014 KRB5_RC_MALLOC:  No more memory to allocate (in replay cache code)
5015 @item
5016 KRB5_RC_TYPE_NOTFOUND:  Replay cache type is unknown
5017 @item
5018 KRB5_RC_UNKNOWN:  Generic unknown RC error
5019 @item
5020 KRB5_RC_REPLAY:  Message is a replay
5021 @item
5022 KRB5_RC_IO:  Replay I/O operation failed XXX
5023 @item
5024 KRB5_RC_NOIO:  Replay cache type does not support non-volatile storage
5025 @item
5026 KRB5_RC_PARSE:  Replay cache name parse/format error
5027 @item
5028 KRB5_RC_IO_EOF:  End-of-file on replay cache I/O
5029 @item
5030 KRB5_RC_IO_MALLOC:  No more memory to allocate (in replay cache I/O
5031 code)
5032 @item
5033 KRB5_RC_IO_PERM:  Permission denied in replay cache code
5034 @item
5035 KRB5_RC_IO_IO:  I/O error in replay cache i/o code
5036 @item
5037 KRB5_RC_IO_UNKNOWN:  Generic unknown RC/IO error
5038 @item
5039 KRB5_RC_IO_SPACE:  Insufficient system space to store replay information
5040 @item
5041 KRB5_TRANS_CANTOPEN:  Can't open/find realm translation file
5042 @item
5043 KRB5_TRANS_BADFORMAT:  Improper format of realm translation file
5044 @item
5045 KRB5_LNAME_CANTOPEN:  Can't open/find lname translation database
5046 @item
5047 KRB5_LNAME_NOTRANS:  No translation available for requested principal
5048 @item
5049 KRB5_LNAME_BADFORMAT:  Improper format of translation database entry
5050 @item
5051 KRB5_CRYPTO_INTERNAL:  Cryptosystem internal error
5052 @item
5053 KRB5_KT_BADNAME:  Key table name malformed
5054 @item
5055 KRB5_KT_UNKNOWN_TYPE:  Unknown Key table type
5056 @item
5057 KRB5_KT_NOTFOUND:  Key table entry not found
5058 @item
5059 KRB5_KT_END:  End of key table reached
5060 @item
5061 KRB5_KT_NOWRITE:  Cannot write to specified key table
5062 @item
5063 KRB5_KT_IOERR:  Error writing to key table
5064 @item
5065 KRB5_NO_TKT_IN_RLM:  Cannot find ticket for requested realm
5066 @item
5067 KRB5DES_BAD_KEYPAR:  DES key has bad parity
5068 @item
5069 KRB5DES_WEAK_KEY:  DES key is a weak key
5070 @item
5071 KRB5_BAD_ENCTYPE:  Bad encryption type
5072 @item
5073 KRB5_BAD_KEYSIZE:  Key size is incompatible with encryption type
5074 @item
5075 KRB5_BAD_MSIZE:  Message size is incompatible with encryption type
5076 @item
5077 KRB5_CC_TYPE_EXISTS:  Credentials cache type is already registered.
5078 @item
5079 KRB5_KT_TYPE_EXISTS:  Key table type is already registered.
5080 @item
5081 KRB5_CC_IO:  Credentials cache I/O operation failed XXX
5082 @item
5083 KRB5_FCC_PERM:  Credentials cache file permissions incorrect
5084 @item
5085 KRB5_FCC_NOFILE:  No credentials cache found
5086 @item
5087 KRB5_FCC_INTERNAL:  Internal credentials cache error
5088 @item
5089 KRB5_CC_WRITE:  Error writing to credentials cache
5090 @item
5091 KRB5_CC_NOMEM:  No more memory to allocate (in credentials cache code)
5092 @item
5093 KRB5_CC_FORMAT:  Bad format in credentials cache
5094 @item
5095 KRB5_INVALID_FLAGS:  Invalid KDC option combination (library internal
5096 error) [for dual tgt library calls]
5097 @item
5098 KRB5_NO_2ND_TKT:  Request missing second ticket [for dual tgt library
5099 calls]
5100 @item
5101 KRB5_NOCREDS_SUPPLIED:  No credentials supplied to library routine
5102 @item
5103 KRB5_SENDAUTH_BADAUTHVERS:  Bad sendauth version was sent
5104 @item
5105 KRB5_SENDAUTH_BADAPPLVERS:  Bad application version was sent (via
5106 sendauth)
5107 @item
5108 KRB5_SENDAUTH_BADRESPONSE:  Bad response (during sendauth exchange)
5109 @item
5110 KRB5_SENDAUTH_REJECTED:  Server rejected authentication (during sendauth
5111 exchange)
5112 @item
5113 KRB5_PREAUTH_BAD_TYPE:  Unsupported preauthentication type
5114 @item
5115 KRB5_PREAUTH_NO_KEY:  Required preauthentication key not supplied
5116 @item
5117 KRB5_PREAUTH_FAILED:  Generic preauthentication failure
5118 @item
5119 KRB5_RCACHE_BADVNO:  Unsupported replay cache format version number
5120 @item
5121 KRB5_CCACHE_BADVNO:  Unsupported credentials cache format version number
5122 @item
5123 KRB5_KEYTAB_BADVNO:  Unsupported key table format version number
5124 @item
5125 KRB5_PROG_ATYPE_NOSUPP:  Program lacks support for address type
5126 @item
5127 KRB5_RC_REQUIRED:  Message replay detection requires rcache parameter
5128 @item
5129 KRB5_ERR_BAD_HOSTNAME:  Hostname cannot be canonicalized
5130 @item
5131 KRB5_ERR_HOST_REALM_UNKNOWN:  Cannot determine realm for host
5132 @item
5133 KRB5_SNAME_UNSUPP_NAMETYPE:  Conversion to service principal undefined
5134 for name type
5135 @item
5136 KRB5KRB_AP_ERR_V4_REPLY:  Initial Ticket response appears to be Version
5137 4 error
5138 @item
5139 KRB5_REALM_CANT_RESOLVE:  Cannot resolve KDC for requested realm
5140 @item
5141 KRB5_TKT_NOT_FORWARDABLE:  Requesting ticket can't get forwardable
5142 tickets
5143 @item
5144 KRB5_FWD_BAD_PRINCIPAL:  Bad principal name while trying to forward
5145 credentials
5146 @item
5147 KRB5_GET_IN_TKT_LOOP:  Looping detected inside krb5_get_in_tkt
5148 @item
5149 KRB5_CONFIG_NODEFREALM:  Configuration file does not specify default realm
5150 @item
5151 KRB5_SAM_UNSUPPORTED:  Bad SAM flags in obtain_sam_padata
5152 @item
5153 KRB5_KT_NAME_TOOLONG: Keytab name too long
5154 @item
5155 KRB5_KT_KVNONOTFOUND: Key version number for principal in key table is incorrect
5156 @item
5157 KRB5_APPL_EXPIRED: This application has expired
5158 @item
5159 KRB5_LIB_EXPIRED: This Krb5 library has expired
5160 @item
5161 KRB5_CHPW_PWDNULL: New password cannot be zero length
5162 @item
5163 KRB5_CHPW_FAIL: Password change failed
5164 @item
5165 KRB5_KT_FORMAT: Bad format in keytab
5166 @item
5167 KRB5_NOPERM_ETYPE: Encryption type not permitted
5168 @item
5169 KRB5_CONFIG_ETYPE_NOSUPP: No supported encryption types (config file error?)
5170 @item
5171 KRB5_OBSOLETE_FN: Program called an obsolete, deleted function
5172 @item
5173 KRB5_EAI_FAIL: unknown getaddrinfo failure
5174 @item
5175 KRB5_EAI_NODATA: no data available for host/domain name
5176 @item
5177 KRB5_EAI_NONAME: host/domain name not found
5178 @item
5179 KRB5_EAI_SERVICE: service name unknown
5180 @item
5181 KRB5_ERR_NUMERIC_REALM: Cannot determine realm for numeric host address
5182 @end enumerate
5183
5184 @node Kerberos V5 Database Library Error Codes, Kerberos V5 Magic Numbers Error Codes, Kerberos V5 Library Error Codes, Errors
5185 @appendixsubsec Kerberos V5 Database Library Error Codes
5186
5187 This is the Kerberos v5 database library error code table.
5188
5189 @c error table numbering starts at 0
5190 @enumerate 0
5191 @item
5192 KRB5_KDB_RCSID:  (RCS Id string for the kdb error table)
5193 @item
5194 KRB5_KDB_INUSE:  Entry already exists in database
5195 @item
5196 KRB5_KDB_UK_SERROR:  Database store error
5197 @item
5198 KRB5_KDB_UK_RERROR:  Database read error
5199 @item
5200 KRB5_KDB_UNAUTH:  Insufficient access to perform requested operation
5201 @item
5202 KRB5_KDB_NOENTRY:  No such entry in the database
5203 @item
5204 KRB5_KDB_ILL_WILDCARD:  Illegal use of wildcard
5205 @item
5206 KRB5_KDB_DB_INUSE:  Database is locked or in use--try again later
5207 @item
5208 KRB5_KDB_DB_CHANGED:  Database was modified during read
5209 @item
5210 KRB5_KDB_TRUNCATED_RECORD:  Database record is incomplete or corrupted
5211 @item
5212 KRB5_KDB_RECURSIVELOCK:  Attempt to lock database twice
5213 @item
5214 KRB5_KDB_NOTLOCKED:  Attempt to unlock database when not locked
5215 @item
5216 KRB5_KDB_BADLOCKMODE:  Invalid kdb lock mode
5217 @item
5218 KRB5_KDB_DBNOTINITED:  Database has not been initialized
5219 @item
5220 KRB5_KDB_DBINITED:  Database has already been initialized
5221 @item
5222 KRB5_KDB_ILLDIRECTION:  Bad direction for converting keys
5223 @item
5224 KRB5_KDB_NOMASTERKEY:  Cannot find master key record in database
5225 @item
5226 KRB5_KDB_BADMASTERKEY:  Master key does not match database
5227 @item
5228 KRB5_KDB_INVALIDKEYSIZE:  Key size in database is invalid
5229 @item
5230 KRB5_KDB_CANTREAD_STORED:  Cannot find/read stored master key
5231 @item
5232 KRB5_KDB_BADSTORED_MKEY:  Stored master key is corrupted
5233 @item
5234 KRB5_KDB_CANTLOCK_DB:  Insufficient access to lock database
5235 @item
5236 KRB5_KDB_DB_CORRUPT:  Database format error
5237 @item
5238 KRB5_KDB_BAD_VERSION:  Unsupported version in database entry
5239 @item
5240 KRB5_KDB_BAD_SALTTYPE:  Unsupported salt type
5241 @item
5242 KRB5_KDB_BAD_ENCTYPE:  Unsupported encryption type
5243 @item
5244 KRB5_KDB_BAD_CREATEFLAGS: Bad database creation flags
5245 @item
5246 KRB5_KDB_NO_PERMITTED_KEY: No matching key in entry having a permitted enc type
5247 @item
5248 KRB5_KDB_NO_MATCHING_KEY: No matching key in entry
5249 @item
5250 KRB5_KDB_SERVER_INTERNAL_ERR: Server error
5251 @item
5252 KRB5_KDB_ACCESS_ERROR: Unable to access Kerberos database
5253 @item
5254 KRB5_KDB_INTERNAL_ERROR:Kerberos database internal error
5255 @item
5256 KRB5_KDB_CONSTRAINT_VIOLATION:Kerberos database constraints violated
5257 @end enumerate
5258
5259 @node Kerberos V5 Magic Numbers Error Codes, ASN.1 Error Codes, Kerberos V5 Database Library Error Codes, Errors
5260 @appendixsubsec Kerberos V5 Magic Numbers Error Codes
5261
5262 This is the Kerberos v5 magic numbers error code table.
5263
5264 @c error table numbering starts at 0
5265 @enumerate 0
5266 @item
5267 KV5M_NONE:  Kerberos V5 magic number table
5268 @item
5269 KV5M_PRINCIPAL:  Bad magic number for krb5_principal structure
5270 @item
5271 KV5M_DATA:  Bad magic number for krb5_data structure
5272 @item
5273 KV5M_KEYBLOCK:  Bad magic number for krb5_keyblock structure
5274 @item
5275 KV5M_CHECKSUM:  Bad magic number for krb5_checksum structure
5276 @item
5277 KV5M_ENCRYPT_BLOCK:  Bad magic number for krb5_encrypt_block structure
5278 @item
5279 KV5M_ENC_DATA:  Bad magic number for krb5_enc_data structure
5280 @item
5281 KV5M_CRYPTOSYSTEM_ENTRY:  Bad magic number for krb5_cryp@-to@-sys@-tem_entry
5282 structure
5283 @item
5284 KV5M_CS_TABLE_ENTRY:  Bad magic number for krb5_cs_table_entry structure
5285 @item
5286 KV5M_CHECKSUM_ENTRY:  Bad magic number for krb5_check@-sum_en@-try structure
5287 @item
5288 KV5M_AUTHDATA:  Bad magic number for krb5_authdata structure
5289 @item
5290 KV5M_TRANSITED:  Bad magic number for krb5_transited structure
5291 @item
5292 KV5M_ENC_TKT_PART:  Bad magic number for krb5_enc_tkt_part structure
5293 @item
5294 KV5M_TICKET:  Bad magic number for krb5_ticket structure
5295 @item
5296 KV5M_AUTHENTICATOR:  Bad magic number for krb5_authenticator structure
5297 @item
5298 KV5M_TKT_AUTHENT:  Bad magic number for krb5_tkt_authent structure
5299 @item
5300 KV5M_CREDS:  Bad magic number for krb5_creds structure
5301 @item
5302 KV5M_LAST_REQ_ENTRY:  Bad magic number for krb5_last_req_entry structure
5303 @item
5304 KV5M_PA_DATA:  Bad magic number for krb5_pa_data structure
5305 @item
5306 KV5M_KDC_REQ:  Bad magic number for krb5_kdc_req structure
5307 @item
5308 KV5M_ENC_KDC_REP_PART:  Bad magic number for @*
5309 krb5_enc_kdc_rep_part structure
5310 @item
5311 KV5M_KDC_REP:  Bad magic number for krb5_kdc_rep structure
5312 @item
5313 KV5M_ERROR:  Bad magic number for krb5_error structure
5314 @item
5315 KV5M_AP_REQ:  Bad magic number for krb5_ap_req structure
5316 @item
5317 KV5M_AP_REP:  Bad magic number for krb5_ap_rep structure
5318 @item
5319 KV5M_AP_REP_ENC_PART:  Bad magic number for @*
5320 krb5_ap_rep_enc_part structure
5321 @item
5322 KV5M_RESPONSE:  Bad magic number for krb5_response structure
5323 @item
5324 KV5M_SAFE:  Bad magic number for krb5_safe structure
5325 @item
5326 KV5M_PRIV:  Bad magic number for krb5_priv structure
5327 @item
5328 KV5M_PRIV_ENC_PART:  Bad magic number for krb5_priv_enc_part structure
5329 @item
5330 KV5M_CRED:  Bad magic number for krb5_cred structure
5331 @item
5332 KV5M_CRED_INFO:  Bad magic number for krb5_cred_info structure
5333 @item
5334 KV5M_CRED_ENC_PART:  Bad magic number for krb5_cred_enc_part structure
5335 @item
5336 KV5M_PWD_DATA:  Bad magic number for krb5_pwd_data structure
5337 @item
5338 KV5M_ADDRESS:  Bad magic number for krb5_address structure
5339 @item
5340 KV5M_KEYTAB_ENTRY:  Bad magic number for krb5_keytab_entry structure
5341 @item
5342 KV5M_CONTEXT:  Bad magic number for krb5_context structure
5343 @item
5344 KV5M_OS_CONTEXT:  Bad magic number for krb5_os_context structure
5345 @item
5346 KV5M_ALT_METHOD:  Bad magic number for krb5_alt_method structure
5347 @item
5348 KV5M_ETYPE_INFO_ENTRY:  Bad magic number for @*
5349 krb5_etype_info_entry structure
5350 @item
5351 KV5M_DB_CONTEXT:  Bad magic number for krb5_db_context structure
5352 @item
5353 KV5M_AUTH_CONTEXT:  Bad magic number for krb5_auth_context structure
5354 @item
5355 KV5M_KEYTAB:  Bad magic number for krb5_keytab structure
5356 @item
5357 KV5M_RCACHE:  Bad magic number for krb5_rcache structure
5358 @item
5359 KV5M_CCACHE:  Bad magic number for krb5_ccache structure
5360 @item
5361 KV5M_PREAUTH_OPS:  Bad magic number for krb5_preauth_ops
5362 @item
5363 KV5M_SAM_CHALLENGE:  Bad magic number for krb5_sam_challenge
5364 @item
5365 KV5M_SAM_KEY:  Bad magic number for krb5_sam_key
5366 @item
5367 KV5M_ENC_SAM_RESPONSE_ENC:  Bad magic number for @*
5368 krb5_enc_sam_response_enc
5369 @item
5370 KV5M_SAM_RESPONSE:  Bad magic number for krb5_sam_response
5371 @item
5372 KV5M_PREDICTED_SAM_RESPONSE:  Bad magic number for
5373 krb5_predicted_sam_response
5374 @item
5375 KV5M_PASSWD_PHRASE_ELEMENT:  Bad magic number for passwd_phrase_element
5376 @item
5377 KV5M_GSS_OID: Bad magic number for GSSAPI OID
5378 @item
5379 KV5M_GSS_QUEUE: Bad magic number for GSSAPI QUEUE
5380 @end enumerate
5381
5382 @node ASN.1 Error Codes, GSSAPI Error Codes, Kerberos V5 Magic Numbers Error Codes, Errors
5383 @appendixsubsec ASN.1 Error Codes
5384
5385 @c error table numbering starts at 0
5386 @enumerate 0
5387 @item
5388 ASN1_BAD_TIMEFORMAT:  ASN.1 failed call to system time library
5389 @item
5390 ASN1_MISSING_FIELD:  ASN.1 structure is missing a required field
5391 @item
5392 ASN1_MISPLACED_FIELD:  ASN.1 unexpected field number
5393 @item
5394 ASN1_TYPE_MISMATCH:  ASN.1 type numbers are inconsistent
5395 @item
5396 ASN1_OVERFLOW:  ASN.1 value too large
5397 @item
5398 ASN1_OVERRUN:  ASN.1 encoding ended unexpectedly
5399 @item
5400 ASN1_BAD_ID:  ASN.1 identifier doesn't match expected value
5401 @item
5402 ASN1_BAD_LENGTH:  ASN.1 length doesn't match expected value
5403 @item
5404 ASN1_BAD_FORMAT:  ASN.1 badly-formatted encoding
5405 @item
5406 ASN1_PARSE_ERROR:  ASN.1 parse error
5407 @item
5408 ASN1_BAD_GMTIME: ASN.1 bad return from gmtime
5409 @item
5410 ASN1_MISMATCH_INDEF: ASN.1 non-constructed indefinite encoding
5411 @item
5412 ASN1_MISSING_EOC: ASN.1 missing expected EOC
5413 @end enumerate
5414
5415 @node GSSAPI Error Codes,  , ASN.1 Error Codes, Errors
5416 @appendixsubsec GSSAPI Error Codes
5417
5418 Generic GSSAPI Errors:
5419
5420 @c error table numbering starts at 0
5421 @enumerate 0
5422 @item
5423 G_BAD_SERVICE_NAME:  No @ in SERVICE-NAME name string
5424 @item
5425 G_BAD_STRING_UID: STRING-UID-NAME contains nondigits
5426 @item
5427 G_NOUSER:  UID does not resolve to username
5428 @item
5429 G_VALIDATE_FAILED:  Validation error
5430 @item
5431 G_BUFFER_ALLOC:  Couldn't allocate gss_buffer_t data
5432 @item
5433 G_BAD_MSG_CTX:  Message context invalid
5434 @item
5435 G_WRONG_SIZE:  Buffer is the wrong size
5436 @item
5437 G_BAD_USAGE:  Credential usage type is unknown
5438 @item
5439 G_UNKNOWN_QOP:  Unknown quality of protection specified
5440 @item
5441 G_BAD_HOSTNAME:  Hostname in SERVICE-NAME string could not be
5442 canonicalized
5443 @item
5444 G_WRONG_MECH: Mechanism is incorrect
5445 @item
5446 G_BAD_TOK_HEADER: Token header is malformed or corrupt
5447 @item
5448 G_BAD_DIRECTION: Packet was replayed in wrong direction
5449 @item
5450 G_TOK_TRUNC: Token is missing data
5451 @item
5452 G_REFLECT: Token was reflected
5453 @item
5454 G_WRONG_TOKID: Received token ID does not match expected token ID
5455 @end enumerate
5456
5457 Kerberos 5 GSSAPI Errors:
5458
5459 @c error table numbering starts at 0
5460 @enumerate 0
5461 @item
5462 KG_CCACHE_NOMATCH:  Principal in credential cache does not match desired
5463 name
5464 @item
5465 KG_KEYTAB_NOMATCH:  No principal in keytab matches desired name
5466 @item
5467 KG_TGT_MISSING:  Credential cache has no TGT
5468 @item
5469 KG_NO_SUBKEY:  Authenticator has no subkey
5470 @item
5471 KG_CONTEXT_ESTABLISHED:  Context is already fully established
5472 @item
5473 KG_BAD_SIGN_TYPE:  Unknown signature type in token
5474 @item
5475 KG_BAD_LENGTH:  Invalid field length in token
5476 @item
5477 KG_CTX_INCOMPLETE:  Attempt to use incomplete security context
5478 @item
5479 KG_CONTEXT:  Bad magic number for krb5_gss_ctx_id_t
5480 @item
5481 KG_CRED:  Bad magic number for krb5_gss_cred_id_t
5482 @item
5483 KG_ENC_DESC:  Bad magic number for krb5_gss_enc_desc
5484 @item
5485 KG_BAD_SEQ: Sequence number in token is corrupt
5486 @item
5487 KG_EMPTY_CCACHE: Credential cache is empty
5488 @item
5489 KG_NO_CTYPES: Acceptor and Initiator share no checksum types
5490 @end enumerate
5491
5492 @node kadmin Time Zones,  , Errors, Appendix
5493 @appendixsec kadmin Time Zones
5494
5495 This is a complete listing of the time zones recognized by the
5496 @code{kadmin} command.
5497
5498 @table @b
5499 @itemx gmt
5500 Greenwich Mean Time
5501 @itemx ut, utc
5502 Universal Time (Coordinated).
5503 @itemx wet
5504 Western European Time.  (Same as GMT.)
5505 @itemx bst
5506 British Summer Time.  (1 hour ahead of GMT.)
5507 @itemx wat
5508 West Africa Time.  (1 hour behind GMT.)
5509 @itemx at
5510 Azores Time.  (2 hours behind GMT.)
5511 @itemx bst
5512 Brazil Standard Time.  (3 hours behind GMT.)  Note that the abbreviation
5513 BST also stands for British Summer Time.
5514 @itemx gst
5515 Greenland Standard Time.  (3 hours behind GMT.)  Note that the
5516 abbreviation GST also stands for Guam Standard Time.
5517 @itemx nft
5518 Newfoundland Time.  (3.5 hours behind GMT.)
5519 @itemx nst
5520 Newfoundland Standard Time.  (3.5 hours behind GMT.)
5521 @itemx ndt
5522 Newfoundland Daylight Time.  (2.5 hours behind GMT.)
5523 @itemx ast
5524 Atlantic Standard Time.  (4 hours behind GMT.)
5525 @itemx adt
5526 Atlantic Daylight Time.  (3 hours behind GMT.)
5527 @itemx est
5528 Eastern Standard Time.  (5 hours behind GMT.)
5529 @itemx edt
5530 Eastern Daylight Time.  (4 hours behind GMT.)
5531 @itemx cst
5532 Central Standard Time.  (6 hours behind GMT.)
5533 @itemx cdt
5534 Central Daylight Time.  (5 hours behind GMT.)
5535 @itemx mst
5536 Mountain Standard Time.  (7 hours behind GMT.)
5537 @itemx mdt
5538 Mountain Daylight Time.  (6 hours behind GMT.)
5539 @itemx pst
5540 Pacific Standard Time.  (8 hours behind GMT.)
5541 @itemx pdt
5542 Pacific Daylight Time.  (7 hours behind GMT.)
5543 @itemx yst
5544 Yukon Standard Time.  (9 hours behind GMT.)
5545 @itemx ydt
5546 Yukon Daylight Time.  (8 hours behind GMT.)
5547 @itemx hst
5548 Hawaii Standard Time.  (10 hours behind GMT.)
5549 @itemx hdt
5550 Hawaii Daylight Time.  (9 hours behind GMT.)
5551 @itemx cat
5552 Central Alaska Time.  (10 hours behind GMT.)
5553 @itemx ahst
5554 Alaska-Hawaii Standard Time.  (10 hours behind GMT.)
5555 @itemx nt
5556 Nome Time.  (11 hours behind GMT.)
5557 @itemx idlw
5558 International Date Line West Time.  (12 hours behind GMT.)
5559 @itemx cet
5560 Central European Time.  (1 hour ahead of GMT.)
5561 @itemx met
5562 Middle European Time.  (1 hour ahead of GMT.)
5563 @itemx mewt
5564 Middle European Winter Time.  (1 hour ahead of GMT.)
5565 @itemx mest
5566 Middle European Summer Time.  (2 hours ahead of GMT.)
5567 @itemx swt
5568 Swedish Winter Time.  (1 hour ahead of GMT.)
5569 @itemx sst
5570 Swedish Summer Time.  (1 hours ahead of GMT.)
5571 @itemx fwt
5572 French Winter Time.  (1 hour ahead of GMT.)
5573 @itemx fst
5574 French Summer Time.  (2 hours ahead of GMT.)
5575 @itemx eet
5576 Eastern Europe Time; Russia Zone 1.  (2 hours ahead of GMT.)
5577 @itemx bt
5578 Baghdad Time; Russia Zone 2.  (3 hours ahead of GMT.)
5579 @itemx it
5580 Iran Time.  (3.5 hours ahead of GMT.)
5581 @itemx zp4
5582 Russia Zone 3.  (4 hours ahead of GMT.)
5583 @itemx zp5
5584 Russia Zone 4.  (5 hours ahead of GMT.)
5585 @itemx ist
5586 Indian Standard Time.  (5.5 hours ahead of GMT.)
5587 @itemx zp6
5588 Russia Zone 5.  (6 hours ahead of GMT.)
5589 @itemx nst
5590 North Sumatra Time.  (6.5 hours ahead of GMT.)  Note that the
5591 abbreviation NST is also used for Newfoundland Stanard Time.
5592 @itemx sst
5593 South Sumatra Time; Russia Zone 6.  (7 hours ahead of GMT.)  Note that
5594 SST is also Swedish Summer Time.
5595 @itemx wast
5596 West Australian Standard Time.  (7 hours ahead of GMT.)
5597 @itemx wadt
5598 West Australian Daylight Time.  (8 hours ahead of GMT.)
5599 @itemx jt
5600 Java Time.  (7.5 hours ahead of GMT.)
5601 @itemx cct
5602 China Coast Time; Russia Zone 7.  (8 hours ahead of GMT.)
5603 @itemx jst
5604 Japan Standard time; Russia Zone 8.  (9 hours ahead of GMT.)
5605 @itemx kst
5606 Korean Standard Time.  (9 hours ahead of GMT.)
5607 @itemx cast
5608 Central Australian Standard Time.  (9.5 hours ahead of GMT.)
5609 @itemx cadt
5610 Central Australian Daylight Time.  (10.5 hours ahead of GMT.)
5611 @itemx east
5612 Eastern Australian Standard Time.  (10 hours ahead of GMT.)
5613 @itemx eadt
5614 Eastern Australian Daylight Time.  (11 hours ahead of GMT.)
5615 @itemx gst
5616 Guam Standard Time; Russia Zone 9.  (10 hours ahead of GMT.)
5617 @itemx kdt
5618 Korean Daylight Time.  (10 hours ahead of GMT.)
5619 @itemx nzt
5620 New Zealand Time.  (12 hours ahead of GMT.)
5621 @itemx nzst
5622 New Zealand Standard Time.  (12 hours ahead of GMT.)
5623 @itemx nzdt
5624 New Zealand Daylight Time.  (13 hours ahead of GMT.)
5625 @itemx idle
5626 International Date Line East.  (12 hours ahead of GMT.)
5627 @end table
5628
5629 @node Copyright,  , Appendix, Top
5630 @appendix Copyright
5631 @include copyright.texinfo
5632
5633 @contents
5634 @bye
5635