1%% Generated by Sphinx. 2\def\sphinxdocclass{report} 3\documentclass[letterpaper,10pt,english]{sphinxmanual} 4\ifdefined\pdfpxdimen 5 \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen 6\fi \sphinxpxdimen=.75bp\relax 7\ifdefined\pdfimageresolution 8 \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax 9\fi 10%% let collapsible pdf bookmarks panel have high depth per default 11\PassOptionsToPackage{bookmarksdepth=5}{hyperref} 12 13\PassOptionsToPackage{warn}{textcomp} 14\usepackage[utf8]{inputenc} 15\ifdefined\DeclareUnicodeCharacter 16% support both utf8 and utf8x syntaxes 17 \ifdefined\DeclareUnicodeCharacterAsOptional 18 \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}} 19 \else 20 \let\sphinxDUC\DeclareUnicodeCharacter 21 \fi 22 \sphinxDUC{00A0}{\nobreakspace} 23 \sphinxDUC{2500}{\sphinxunichar{2500}} 24 \sphinxDUC{2502}{\sphinxunichar{2502}} 25 \sphinxDUC{2514}{\sphinxunichar{2514}} 26 \sphinxDUC{251C}{\sphinxunichar{251C}} 27 \sphinxDUC{2572}{\textbackslash} 28\fi 29\usepackage{cmap} 30\usepackage[T1]{fontenc} 31\usepackage{amsmath,amssymb,amstext} 32\usepackage{babel} 33 34 35 36\usepackage{tgtermes} 37\usepackage{tgheros} 38\renewcommand{\ttdefault}{txtt} 39 40 41 42\usepackage[Bjarne]{fncychap} 43\usepackage{sphinx} 44 45\fvset{fontsize=auto} 46\usepackage{geometry} 47 48 49% Include hyperref last. 50\usepackage{hyperref} 51% Fix anchor placement for figures with captions. 52\usepackage{hypcap}% it must be loaded after hyperref. 53% Set up styles of URL: it should be placed after hyperref. 54\urlstyle{same} 55 56 57\usepackage{sphinxmessages} 58\setcounter{tocdepth}{0} 59 60 61 62\title{Kerberos Concepts} 63\date{ } 64\release{1.21.3} 65\author{MIT} 66\newcommand{\sphinxlogo}{\vbox{}} 67\renewcommand{\releasename}{Release} 68\makeindex 69\begin{document} 70 71\pagestyle{empty} 72\sphinxmaketitle 73\pagestyle{plain} 74\sphinxtableofcontents 75\pagestyle{normal} 76\phantomsection\label{\detokenize{basic/index::doc}} 77 78 79 80\chapter{Credential cache} 81\label{\detokenize{basic/ccache_def:credential-cache}}\label{\detokenize{basic/ccache_def:ccache-definition}}\label{\detokenize{basic/ccache_def::doc}} 82\sphinxAtStartPar 83A credential cache (or “ccache”) holds Kerberos credentials while they 84remain valid and, generally, while the user’s session lasts, so that 85authenticating to a service multiple times (e.g., connecting to a web 86or mail server more than once) doesn’t require contacting the KDC 87every time. 88 89\sphinxAtStartPar 90A credential cache usually contains one initial ticket which is 91obtained using a password or another form of identity verification. 92If this ticket is a ticket\sphinxhyphen{}granting ticket, it can be used to obtain 93additional credentials without the password. Because the credential 94cache does not store the password, less long\sphinxhyphen{}term damage can be done 95to the user’s account if the machine is compromised. 96 97\sphinxAtStartPar 98A credentials cache stores a default client principal name, set when 99the cache is created. This is the name shown at the top of the 100\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} output. 101 102\sphinxAtStartPar 103Each normal cache entry includes a service principal name, a client 104principal name (which, in some ccache types, need not be the same as 105the default), lifetime information, and flags, along with the 106credential itself. There are also other entries, indicated by special 107names, that store additional information. 108 109 110\section{ccache types} 111\label{\detokenize{basic/ccache_def:ccache-types}} 112\sphinxAtStartPar 113The credential cache interface, like the {\hyperref[\detokenize{basic/keytab_def:keytab-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{keytab}}}} and 114{\hyperref[\detokenize{basic/rcache_def:rcache-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{replay cache}}}} interfaces, uses \sphinxtitleref{TYPE:value} strings to 115indicate the type of credential cache and any associated cache naming 116data to use. 117 118\sphinxAtStartPar 119There are several kinds of credentials cache supported in the MIT 120Kerberos library. Not all are supported on every platform. In most 121cases, it should be correct to use the default type built into the 122library. 123\begin{enumerate} 124\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 125\item {} 126\sphinxAtStartPar 127\sphinxstylestrong{API} is only implemented on Windows. It communicates with a 128server process that holds the credentials in memory for the user, 129rather than writing them to disk. 130 131\item {} 132\sphinxAtStartPar 133\sphinxstylestrong{DIR} points to the storage location of the collection of the 134credential caches in \sphinxstyleemphasis{FILE:} format. It is most useful when dealing 135with multiple Kerberos realms and KDCs. For release 1.10 the 136directory must already exist. In post\sphinxhyphen{}1.10 releases the 137requirement is for parent directory to exist and the current 138process must have permissions to create the directory if it does 139not exist. See {\hyperref[\detokenize{basic/ccache_def:col-ccache}]{\sphinxcrossref{\DUrole{std,std-ref}{Collections of caches}}}} for details. New in release 1.10. 140The following residual forms are supported: 141\begin{itemize} 142\item {} 143\sphinxAtStartPar 144DIR:dirname 145 146\item {} 147\sphinxAtStartPar 148DIR::dirpath/filename \sphinxhyphen{} a single cache within the directory 149 150\end{itemize} 151 152\sphinxAtStartPar 153Switching to a ccache of the latter type causes it to become the 154primary for the directory. 155 156\item {} 157\sphinxAtStartPar 158\sphinxstylestrong{FILE} caches are the simplest and most portable. A simple flat 159file format is used to store one credential after another. This is 160the default ccache type if no type is specified in a ccache name. 161 162\item {} 163\sphinxAtStartPar 164\sphinxstylestrong{KCM} caches work by contacting a daemon process called \sphinxcode{\sphinxupquote{kcm}} 165to perform cache operations. If the cache name is just \sphinxcode{\sphinxupquote{KCM:}}, 166the default cache as determined by the KCM daemon will be used. 167Newly created caches must generally be named \sphinxcode{\sphinxupquote{KCM:uid:name}}, 168where \sphinxstyleemphasis{uid} is the effective user ID of the running process. 169 170\sphinxAtStartPar 171KCM client support is new in release 1.13. A KCM daemon has not 172yet been implemented in MIT krb5, but the client will interoperate 173with the KCM daemon implemented by Heimdal. macOS 10.7 and higher 174provides a KCM daemon as part of the operating system, and the 175\sphinxstylestrong{KCM} cache type is used as the default cache on that platform in 176a default build. 177 178\item {} 179\sphinxAtStartPar 180\sphinxstylestrong{KEYRING} is Linux\sphinxhyphen{}specific, and uses the kernel keyring support 181to store credential data in unswappable kernel memory where only 182the current user should be able to access it. The following 183residual forms are supported: 184\begin{itemize} 185\item {} 186\sphinxAtStartPar 187KEYRING:name 188 189\item {} 190\sphinxAtStartPar 191KEYRING:process:name \sphinxhyphen{} process keyring 192 193\item {} 194\sphinxAtStartPar 195KEYRING:thread:name \sphinxhyphen{} thread keyring 196 197\end{itemize} 198 199\sphinxAtStartPar 200Starting with release 1.12 the \sphinxstyleemphasis{KEYRING} type supports collections. 201The following new residual forms were added: 202\begin{itemize} 203\item {} 204\sphinxAtStartPar 205KEYRING:session:name \sphinxhyphen{} session keyring 206 207\item {} 208\sphinxAtStartPar 209KEYRING:user:name \sphinxhyphen{} user keyring 210 211\item {} 212\sphinxAtStartPar 213KEYRING:persistent:uidnumber \sphinxhyphen{} persistent per\sphinxhyphen{}UID collection. 214Unlike the user keyring, this collection survives after the user 215logs out, until the cache credentials expire. This type of 216ccache requires support from the kernel; otherwise, it will fall 217back to the user keyring. 218 219\end{itemize} 220 221\sphinxAtStartPar 222See {\hyperref[\detokenize{basic/ccache_def:col-ccache}]{\sphinxcrossref{\DUrole{std,std-ref}{Collections of caches}}}} for details. 223 224\item {} 225\sphinxAtStartPar 226\sphinxstylestrong{MEMORY} caches are for storage of credentials that don’t need to 227be made available outside of the current process. For example, a 228memory ccache is used by \DUrole{xref,std,std-ref}{kadmin(1)} to store the 229administrative ticket used to contact the admin server. Memory 230ccaches are faster than file ccaches and are automatically 231destroyed when the process exits. 232 233\item {} 234\sphinxAtStartPar 235\sphinxstylestrong{MSLSA} is a Windows\sphinxhyphen{}specific cache type that accesses the 236Windows credential store. 237 238\end{enumerate} 239 240 241\section{Collections of caches} 242\label{\detokenize{basic/ccache_def:collections-of-caches}}\label{\detokenize{basic/ccache_def:col-ccache}} 243\sphinxAtStartPar 244Some credential cache types can support collections of multiple 245caches. One of the caches in the collection is designated as the 246\sphinxstyleemphasis{primary} and will be used when the collection is resolved as a cache. 247When a collection\sphinxhyphen{}enabled cache type is the default cache for a 248process, applications can search the specified collection for a 249specific client principal, and GSSAPI applications will automatically 250select between the caches in the collection based on criteria such as 251the target service realm. 252 253\sphinxAtStartPar 254Credential cache collections are new in release 1.10, with support 255from the \sphinxstylestrong{DIR} and \sphinxstylestrong{API} ccache types. Starting in release 1.12, 256collections are also supported by the \sphinxstylestrong{KEYRING} ccache type. 257Collections are supported by the \sphinxstylestrong{KCM} ccache type in release 1.13. 258 259 260\subsection{Tool alterations to use cache collection} 261\label{\detokenize{basic/ccache_def:tool-alterations-to-use-cache-collection}}\begin{itemize} 262\item {} 263\sphinxAtStartPar 264\DUrole{xref,std,std-ref}{kdestroy(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} will destroy all caches in the collection. 265 266\item {} 267\sphinxAtStartPar 268If the default cache type supports switching, \DUrole{xref,std,std-ref}{kinit(1)} 269\sphinxstyleemphasis{princname} will search the collection for a matching cache and 270store credentials there, or will store credentials in a new unique 271cache of the default type if no existing cache for the principal 272exists. Either way, kinit will switch to the selected cache. 273 274\item {} 275\sphinxAtStartPar 276\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}l} will list the caches in the collection. 277 278\item {} 279\sphinxAtStartPar 280\DUrole{xref,std,std-ref}{klist(1)} \sphinxstyleemphasis{\sphinxhyphen{}A} will show the content of all caches in the 281collection. 282 283\item {} 284\sphinxAtStartPar 285\DUrole{xref,std,std-ref}{kswitch(1)} \sphinxstyleemphasis{\sphinxhyphen{}p princname} will search the collection for a 286matching cache and switch to it. 287 288\item {} 289\sphinxAtStartPar 290\DUrole{xref,std,std-ref}{kswitch(1)} \sphinxstyleemphasis{\sphinxhyphen{}c cachename} will switch to a specified cache. 291 292\end{itemize} 293 294 295\section{Default ccache name} 296\label{\detokenize{basic/ccache_def:default-ccache-name}} 297\sphinxAtStartPar 298The default credential cache name is determined by the following, in 299descending order of priority: 300\begin{enumerate} 301\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 302\item {} 303\sphinxAtStartPar 304The \sphinxstylestrong{KRB5CCNAME} environment variable. For example, 305\sphinxcode{\sphinxupquote{KRB5CCNAME=DIR:/mydir/}}. 306 307\item {} 308\sphinxAtStartPar 309The \sphinxstylestrong{default\_ccache\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults}. 310 311\item {} 312\sphinxAtStartPar 313The hardcoded default, \DUrole{xref,std,std-ref}{DEFCCNAME}. 314 315\end{enumerate} 316 317 318\chapter{keytab} 319\label{\detokenize{basic/keytab_def:keytab}}\label{\detokenize{basic/keytab_def:keytab-definition}}\label{\detokenize{basic/keytab_def::doc}} 320\sphinxAtStartPar 321A keytab (short for “key table”) stores long\sphinxhyphen{}term keys for one or more 322principals. Keytabs are normally represented by files in a standard 323format, although in rare cases they can be represented in other ways. 324Keytabs are used most often to allow server applications to accept 325authentications from clients, but can also be used to obtain initial 326credentials for client applications. 327 328\sphinxAtStartPar 329Keytabs are named using the format \sphinxstyleemphasis{type}\sphinxcode{\sphinxupquote{:}}\sphinxstyleemphasis{value}. Usually 330\sphinxstyleemphasis{type} is \sphinxcode{\sphinxupquote{FILE}} and \sphinxstyleemphasis{value} is the absolute pathname of the file. 331The other possible value for \sphinxstyleemphasis{type} is \sphinxcode{\sphinxupquote{MEMORY}}, which indicates a 332temporary keytab stored in the memory of the current process. 333 334\sphinxAtStartPar 335A keytab contains one or more entries, where each entry consists of a 336timestamp (indicating when the entry was written to the keytab), a 337principal name, a key version number, an encryption type, and the 338encryption key itself. 339 340\sphinxAtStartPar 341A keytab can be displayed using the \DUrole{xref,std,std-ref}{klist(1)} command with the 342\sphinxcode{\sphinxupquote{\sphinxhyphen{}k}} option. Keytabs can be created or appended to by extracting 343keys from the KDC database using the \DUrole{xref,std,std-ref}{kadmin(1)} \DUrole{xref,std,std-ref}{ktadd} 344command. Keytabs can be manipulated using the \DUrole{xref,std,std-ref}{ktutil(1)} and 345\DUrole{xref,std,std-ref}{k5srvutil(1)} commands. 346 347 348\section{Default keytab} 349\label{\detokenize{basic/keytab_def:default-keytab}} 350\sphinxAtStartPar 351The default keytab is used by server applications if the application 352does not request a specific keytab. The name of the default keytab is 353determined by the following, in decreasing order of preference: 354\begin{enumerate} 355\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 356\item {} 357\sphinxAtStartPar 358The \sphinxstylestrong{KRB5\_KTNAME} environment variable. 359 360\item {} 361\sphinxAtStartPar 362The \sphinxstylestrong{default\_keytab\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults}. 363 364\item {} 365\sphinxAtStartPar 366The hardcoded default, \DUrole{xref,std,std-ref}{DEFKTNAME}. 367 368\end{enumerate} 369 370 371\section{Default client keytab} 372\label{\detokenize{basic/keytab_def:default-client-keytab}} 373\sphinxAtStartPar 374The default client keytab is used, if it is present and readable, to 375automatically obtain initial credentials for GSSAPI client 376applications. The principal name of the first entry in the client 377keytab is used by default when obtaining initial credentials. The 378name of the default client keytab is determined by the following, in 379decreasing order of preference: 380\begin{enumerate} 381\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 382\item {} 383\sphinxAtStartPar 384The \sphinxstylestrong{KRB5\_CLIENT\_KTNAME} environment variable. 385 386\item {} 387\sphinxAtStartPar 388The \sphinxstylestrong{default\_client\_keytab\_name} profile variable in 389\DUrole{xref,std,std-ref}{libdefaults}. 390 391\item {} 392\sphinxAtStartPar 393The hardcoded default, \DUrole{xref,std,std-ref}{DEFCKTNAME}. 394 395\end{enumerate} 396 397 398\chapter{replay cache} 399\label{\detokenize{basic/rcache_def:replay-cache}}\label{\detokenize{basic/rcache_def:rcache-definition}}\label{\detokenize{basic/rcache_def::doc}} 400\sphinxAtStartPar 401A replay cache (or “rcache”) keeps track of all authenticators 402recently presented to a service. If a duplicate authentication 403request is detected in the replay cache, an error message is sent to 404the application program. 405 406\sphinxAtStartPar 407The replay cache interface, like the credential cache and 408{\hyperref[\detokenize{basic/keytab_def:keytab-definition}]{\sphinxcrossref{\DUrole{std,std-ref}{keytab}}}} interfaces, uses \sphinxtitleref{type:residual} strings to 409indicate the type of replay cache and any associated cache naming 410data to use. 411 412 413\section{Background information} 414\label{\detokenize{basic/rcache_def:background-information}} 415\sphinxAtStartPar 416Some Kerberos or GSSAPI services use a simple authentication mechanism 417where a message is sent containing an authenticator, which establishes 418the encryption key that the client will use for talking to the 419service. But nothing about that prevents an eavesdropper from 420recording the messages sent by the client, establishing a new 421connection, and re\sphinxhyphen{}sending or “replaying” the same messages; the 422replayed authenticator will establish the same encryption key for the 423new session, and the following messages will be decrypted and 424processed. The attacker may not know what the messages say, and can’t 425generate new messages under the same encryption key, but in some 426instances it may be harmful to the user (or helpful to the attacker) 427to cause the server to see the same messages again a second time. For 428example, if the legitimate client sends “delete first message in 429mailbox”, a replay from an attacker may delete another, different 430“first” message. (Protocol design to guard against such problems has 431been discussed in \index{RFC@\spxentry{RFC}!RFC 4120\#section\sphinxhyphen{}10@\spxentry{RFC 4120\#section\sphinxhyphen{}10}}\sphinxhref{https://tools.ietf.org/html/rfc4120.html\#section-10}{\sphinxstylestrong{RFC 4120\#section\sphinxhyphen{}10}}.) 432 433\sphinxAtStartPar 434Even if one protocol uses further protection to verify that the client 435side of the connection actually knows the encryption keys (and thus is 436presumably a legitimate user), if another service uses the same 437service principal name, it may be possible to record an authenticator 438used with the first protocol and “replay” it against the second. 439 440\sphinxAtStartPar 441The replay cache mitigates these attacks somewhat, by keeping track of 442authenticators that have been seen until their five\sphinxhyphen{}minute window 443expires. Different authenticators generated by multiple connections 444from the same legitimate client will generally have different 445timestamps, and thus will not be considered the same. 446 447\sphinxAtStartPar 448This mechanism isn’t perfect. If a message is sent to one application 449server but a man\sphinxhyphen{}in\sphinxhyphen{}the\sphinxhyphen{}middle attacker can prevent it from actually 450arriving at that server, the attacker could then use the authenticator 451(once!) against a different service on the same host. This could be a 452problem if the message from the client included something more than 453authentication in the first message that could be useful to the 454attacker (which is uncommon; in most protocols the server has to 455indicate a successful authentication before the client sends 456additional messages), or if the simple act of presenting the 457authenticator triggers some interesting action in the service being 458attacked. 459 460 461\section{Replay cache types} 462\label{\detokenize{basic/rcache_def:replay-cache-types}} 463\sphinxAtStartPar 464Unlike the credential cache and keytab interfaces, replay cache types 465are in lowercase. The following types are defined: 466\begin{enumerate} 467\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 468\item {} 469\sphinxAtStartPar 470\sphinxstylestrong{none} disables the replay cache. The residual value is ignored. 471 472\item {} 473\sphinxAtStartPar 474\sphinxstylestrong{file2} (new in release 1.18) uses a hash\sphinxhyphen{}based format to store 475replay records. The file may grow to accommodate hash collisions. 476The residual value is the filename. 477 478\item {} 479\sphinxAtStartPar 480\sphinxstylestrong{dfl} is the default type if no environment variable or 481configuration specifies a different type. It stores replay data in 482a file2 replay cache with a filename based on the effective uid. 483The residual value is ignored. 484 485\end{enumerate} 486 487\sphinxAtStartPar 488For the dfl type, the location of the replay cache file is determined 489as follows: 490\begin{enumerate} 491\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 492\item {} 493\sphinxAtStartPar 494The directory is taken from the \sphinxstylestrong{KRB5RCACHEDIR} environment 495variable, or the \sphinxstylestrong{TMPDIR} environment variable, or a temporary 496directory determined at configuration time such as \sphinxcode{\sphinxupquote{/var/tmp}}, in 497descending order of preference. 498 499\item {} 500\sphinxAtStartPar 501The filename is \sphinxcode{\sphinxupquote{krb5\_EUID.rcache2}} where EUID is the effective 502uid of the process. 503 504\item {} 505\sphinxAtStartPar 506The file is opened without following symbolic links, and ownership 507of the file is verified to match the effective uid. 508 509\end{enumerate} 510 511\sphinxAtStartPar 512On Windows, the directory for the dfl type is the local appdata 513directory, unless overridden by the \sphinxstylestrong{KRB5RCACHEDIR} environment 514variable. The filename on Windows is \sphinxcode{\sphinxupquote{krb5.rcache2}}, and the file 515is opened normally. 516 517 518\section{Default replay cache name} 519\label{\detokenize{basic/rcache_def:default-replay-cache-name}} 520\sphinxAtStartPar 521The default replay cache name is determined by the following, in 522descending order of priority: 523\begin{enumerate} 524\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}% 525\item {} 526\sphinxAtStartPar 527The \sphinxstylestrong{KRB5RCACHENAME} environment variable (new in release 1.18). 528 529\item {} 530\sphinxAtStartPar 531The \sphinxstylestrong{KRB5RCACHETYPE} environment variable. If this variable is 532set, the residual value is empty. 533 534\item {} 535\sphinxAtStartPar 536The \sphinxstylestrong{default\_rcache\_name} profile variable in \DUrole{xref,std,std-ref}{libdefaults} 537(new in release 1.18). 538 539\item {} 540\sphinxAtStartPar 541If none of the above are set, the default replay cache name is 542\sphinxcode{\sphinxupquote{dfl:}}. 543 544\end{enumerate} 545 546 547\chapter{stash file} 548\label{\detokenize{basic/stash_file_def:stash-file}}\label{\detokenize{basic/stash_file_def:stash-definition}}\label{\detokenize{basic/stash_file_def::doc}} 549\sphinxAtStartPar 550The stash file is a local copy of the master key that resides in 551encrypted form on the KDC’s local disk. The stash file is used to 552authenticate the KDC to itself automatically before starting the 553\DUrole{xref,std,std-ref}{kadmind(8)} and \DUrole{xref,std,std-ref}{krb5kdc(8)} daemons (e.g., as part of the 554machine’s boot sequence). The stash file, like the keytab file (see 555\DUrole{xref,std,std-ref}{keytab\_file}) is a potential point\sphinxhyphen{}of\sphinxhyphen{}entry for a break\sphinxhyphen{}in, and 556if compromised, would allow unrestricted access to the Kerberos 557database. If you choose to install a stash file, it should be 558readable only by root, and should exist only on the KDC’s local disk. 559The file should not be part of any backup of the machine, unless 560access to the backup data is secured as tightly as access to the 561master password itself. 562 563\begin{sphinxadmonition}{note}{Note:} 564\sphinxAtStartPar 565If you choose not to install a stash file, the KDC will prompt you for the master key each time it starts up. 566This means that the KDC will not be able to start automatically, such as after a system reboot. 567\end{sphinxadmonition} 568 569 570\chapter{Supported date and time formats} 571\label{\detokenize{basic/date_format:supported-date-and-time-formats}}\label{\detokenize{basic/date_format:datetime}}\label{\detokenize{basic/date_format::doc}} 572 573\section{Time duration} 574\label{\detokenize{basic/date_format:time-duration}}\label{\detokenize{basic/date_format:duration}} 575\sphinxAtStartPar 576This format is used to express a time duration in the Kerberos 577configuration files and user commands. The allowed formats are: 578\begin{quote} 579 580 581\begin{savenotes}\sphinxattablestart 582\centering 583\begin{tabulary}{\linewidth}[t]{|T|T|T|} 584\hline 585 586\sphinxAtStartPar 587Format 588& 589\sphinxAtStartPar 590Example 591& 592\sphinxAtStartPar 593Value 594\\ 595\hline 596\sphinxAtStartPar 597h:m{[}:s{]} 598& 599\sphinxAtStartPar 60036:00 601& 602\sphinxAtStartPar 60336 hours 604\\ 605\hline 606\sphinxAtStartPar 607NdNhNmNs 608& 609\sphinxAtStartPar 6108h30s 611& 612\sphinxAtStartPar 6138 hours 30 seconds 614\\ 615\hline 616\sphinxAtStartPar 617N (number of seconds) 618& 619\sphinxAtStartPar 6203600 621& 622\sphinxAtStartPar 6231 hour 624\\ 625\hline 626\end{tabulary} 627\par 628\sphinxattableend\end{savenotes} 629\end{quote} 630 631\sphinxAtStartPar 632Here \sphinxstyleemphasis{N} denotes a number, \sphinxstyleemphasis{d} \sphinxhyphen{} days, \sphinxstyleemphasis{h} \sphinxhyphen{} hours, \sphinxstyleemphasis{m} \sphinxhyphen{} minutes, 633\sphinxstyleemphasis{s} \sphinxhyphen{} seconds. 634 635\begin{sphinxadmonition}{note}{Note:} 636\sphinxAtStartPar 637The time interval should not exceed 2147483647 seconds. 638\end{sphinxadmonition} 639 640\sphinxAtStartPar 641Examples: 642 643\begin{sphinxVerbatim}[commandchars=\\\{\}] 644\PYG{n}{Request} \PYG{n}{a} \PYG{n}{ticket} \PYG{n}{valid} \PYG{k}{for} \PYG{n}{one} \PYG{n}{hour}\PYG{p}{,} \PYG{n}{five} \PYG{n}{hours}\PYG{p}{,} \PYG{l+m+mi}{30} \PYG{n}{minutes} 645\PYG{o+ow}{and} \PYG{l+m+mi}{10} \PYG{n}{days} \PYG{n}{respectively}\PYG{p}{:} 646 647 \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{3600} 648 \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{5}\PYG{p}{:}\PYG{l+m+mi}{00} 649 \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+m+mi}{30}\PYG{n}{m} 650 \PYG{n}{kinit} \PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{10d 0h 0m 0s}\PYG{l+s+s2}{\PYGZdq{}} 651\end{sphinxVerbatim} 652 653 654\section{getdate time} 655\label{\detokenize{basic/date_format:getdate-time}}\label{\detokenize{basic/date_format:getdate}} 656\sphinxAtStartPar 657Some of the kadmin and kdb5\_util commands take a date\sphinxhyphen{}time in a 658human\sphinxhyphen{}readable format. Some of the acceptable date\sphinxhyphen{}time 659strings are: 660\begin{quote} 661 662 663\begin{savenotes}\sphinxattablestart 664\centering 665\begin{tabulary}{\linewidth}[t]{|T|T|T|} 666\hline 667\sphinxstyletheadfamily &\sphinxstyletheadfamily 668\sphinxAtStartPar 669Format 670&\sphinxstyletheadfamily 671\sphinxAtStartPar 672Example 673\\ 674\hline\sphinxmultirow{3}{4}{% 675\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} 676\sphinxAtStartPar 677Date 678\par 679\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% 680}% 681& 682\sphinxAtStartPar 683mm/dd/yy 684& 685\sphinxAtStartPar 68607/27/12 687\\ 688\cline{2-3}\sphinxtablestrut{4}& 689\sphinxAtStartPar 690month dd, yyyy 691& 692\sphinxAtStartPar 693Jul 27, 2012 694\\ 695\cline{2-3}\sphinxtablestrut{4}& 696\sphinxAtStartPar 697yyyy\sphinxhyphen{}mm\sphinxhyphen{}dd 698& 699\sphinxAtStartPar 7002012\sphinxhyphen{}07\sphinxhyphen{}27 701\\ 702\hline\sphinxmultirow{2}{11}{% 703\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} 704\sphinxAtStartPar 705Absolute 706time 707\par 708\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% 709}% 710& 711\sphinxAtStartPar 712HH:mm{[}:ss{]}pp 713& 714\sphinxAtStartPar 71508:30 PM 716\\ 717\cline{2-3}\sphinxtablestrut{11}& 718\sphinxAtStartPar 719hh:mm{[}:ss{]} 720& 721\sphinxAtStartPar 72220:30 723\\ 724\hline 725\sphinxAtStartPar 726Relative 727time 728& 729\sphinxAtStartPar 730N tt 731& 732\sphinxAtStartPar 73330 sec 734\\ 735\hline\sphinxmultirow{2}{19}{% 736\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} 737\sphinxAtStartPar 738Time zone 739\par 740\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% 741}% 742& 743\sphinxAtStartPar 744Z 745& 746\sphinxAtStartPar 747EST 748\\ 749\cline{2-3}\sphinxtablestrut{19}& 750\sphinxAtStartPar 751z 752& 753\sphinxAtStartPar 754\sphinxhyphen{}0400 755\\ 756\hline 757\end{tabulary} 758\par 759\sphinxattableend\end{savenotes} 760\end{quote} 761 762\sphinxAtStartPar 763(See {\hyperref[\detokenize{basic/date_format:abbreviation}]{\sphinxcrossref{\DUrole{std,std-ref}{Abbreviations used in this document}}}}.) 764 765\sphinxAtStartPar 766Examples: 767 768\begin{sphinxVerbatim}[commandchars=\\\{\}] 769\PYG{n}{Create} \PYG{n}{a} \PYG{n}{principal} \PYG{n}{that} \PYG{n}{expires} \PYG{n}{on} \PYG{n}{the} \PYG{n}{date} \PYG{n}{indicated}\PYG{p}{:} 770 \PYG{n}{addprinc} \PYG{n}{test1} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{3/27/12 10:00:07 EST}\PYG{l+s+s2}{\PYGZdq{}} 771 \PYG{n}{addprinc} \PYG{n}{test2} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{January 23, 2015 10:05pm}\PYG{l+s+s2}{\PYGZdq{}} 772 \PYG{n}{addprinc} \PYG{n}{test3} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{22:00 GMT}\PYG{l+s+s2}{\PYGZdq{}} 773\PYG{n}{Add} \PYG{n}{a} \PYG{n}{principal} \PYG{n}{that} \PYG{n}{will} \PYG{n}{expire} \PYG{o+ow}{in} \PYG{l+m+mi}{30} \PYG{n}{minutes}\PYG{p}{:} 774 \PYG{n}{addprinc} \PYG{n}{test4} \PYG{o}{\PYGZhy{}}\PYG{n}{expire} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30 minutes}\PYG{l+s+s2}{\PYGZdq{}} 775\end{sphinxVerbatim} 776 777 778\section{Absolute time} 779\label{\detokenize{basic/date_format:absolute-time}}\label{\detokenize{basic/date_format:abstime}} 780\sphinxAtStartPar 781This rarely used date\sphinxhyphen{}time format can be noted in one of the 782following ways: 783\begin{quote} 784 785 786\begin{savenotes}\sphinxattablestart 787\centering 788\begin{tabulary}{\linewidth}[t]{|T|T|T|} 789\hline 790\sphinxstyletheadfamily 791\sphinxAtStartPar 792Format 793&\sphinxstyletheadfamily 794\sphinxAtStartPar 795Example 796&\sphinxstyletheadfamily 797\sphinxAtStartPar 798Value 799\\ 800\hline 801\sphinxAtStartPar 802yyyymmddhhmmss 803& 804\sphinxAtStartPar 80520141231235900 806&\sphinxmultirow{5}{6}{% 807\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} 808\sphinxAtStartPar 809One minute 810before 2015 811\par 812\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% 813}% 814\\ 815\cline{1-2} 816\sphinxAtStartPar 817yyyy.mm.dd.hh.mm.ss 818& 819\sphinxAtStartPar 8202014.12.31.23.59.00 821&\sphinxtablestrut{6}\\ 822\cline{1-2} 823\sphinxAtStartPar 824yymmddhhmmss 825& 826\sphinxAtStartPar 827141231235900 828&\sphinxtablestrut{6}\\ 829\cline{1-2} 830\sphinxAtStartPar 831yy.mm.dd.hh.mm.ss 832& 833\sphinxAtStartPar 83414.12.31.23.59.00 835&\sphinxtablestrut{6}\\ 836\cline{1-2} 837\sphinxAtStartPar 838dd\sphinxhyphen{}month\sphinxhyphen{}yyyy:hh:mm:ss 839& 840\sphinxAtStartPar 84131\sphinxhyphen{}Dec\sphinxhyphen{}2014:23:59:00 842&\sphinxtablestrut{6}\\ 843\hline 844\sphinxAtStartPar 845hh:mm:ss 846& 847\sphinxAtStartPar 84820:00:00 849&\sphinxmultirow{2}{17}{% 850\begin{varwidth}[t]{\sphinxcolwidth{1}{3}} 851\sphinxAtStartPar 8528 o’clock in 853the evening 854\par 855\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}% 856}% 857\\ 858\cline{1-2} 859\sphinxAtStartPar 860hhmmss 861& 862\sphinxAtStartPar 863200000 864&\sphinxtablestrut{17}\\ 865\hline 866\end{tabulary} 867\par 868\sphinxattableend\end{savenotes} 869\end{quote} 870 871\sphinxAtStartPar 872(See {\hyperref[\detokenize{basic/date_format:abbreviation}]{\sphinxcrossref{\DUrole{std,std-ref}{Abbreviations used in this document}}}}.) 873 874\sphinxAtStartPar 875Example: 876 877\begin{sphinxVerbatim}[commandchars=\\\{\}] 878\PYG{n}{Set} \PYG{n}{the} \PYG{n}{default} \PYG{n}{expiration} \PYG{n}{date} \PYG{n}{to} \PYG{n}{July} \PYG{l+m+mi}{27}\PYG{p}{,} \PYG{l+m+mi}{2012} \PYG{n}{at} \PYG{l+m+mi}{20}\PYG{p}{:}\PYG{l+m+mi}{30} 879\PYG{n}{default\PYGZus{}principal\PYGZus{}expiration} \PYG{o}{=} \PYG{l+m+mi}{20120727203000} 880\end{sphinxVerbatim} 881 882 883\subsection{Abbreviations used in this document} 884\label{\detokenize{basic/date_format:abbreviations-used-in-this-document}}\label{\detokenize{basic/date_format:abbreviation}} 885\begin{DUlineblock}{0em} 886\item[] \sphinxstyleemphasis{month} : locale’s month name or its abbreviation; 887\item[] \sphinxstyleemphasis{dd} : day of month (01\sphinxhyphen{}31); 888\item[] \sphinxstyleemphasis{HH} : hours (00\sphinxhyphen{}12); 889\item[] \sphinxstyleemphasis{hh} : hours (00\sphinxhyphen{}23); 890\item[] \sphinxstyleemphasis{mm} : in time \sphinxhyphen{} minutes (00\sphinxhyphen{}59); in date \sphinxhyphen{} month (01\sphinxhyphen{}12); 891\item[] \sphinxstyleemphasis{N} : number; 892\item[] \sphinxstyleemphasis{pp} : AM or PM; 893\item[] \sphinxstyleemphasis{ss} : seconds (00\sphinxhyphen{}60); 894\item[] \sphinxstyleemphasis{tt} : time units (hours, minutes, min, seconds, sec); 895\item[] \sphinxstyleemphasis{yyyy} : year; 896\item[] \sphinxstyleemphasis{yy} : last two digits of the year; 897\item[] \sphinxstyleemphasis{Z} : alphabetic time zone abbreviation; 898\item[] \sphinxstyleemphasis{z} : numeric time zone; 899\end{DUlineblock} 900 901\begin{sphinxadmonition}{note}{Note:}\begin{itemize} 902\item {} 903\sphinxAtStartPar 904If the date specification contains spaces, you may need to 905enclose it in double quotes; 906 907\item {} 908\sphinxAtStartPar 909All keywords are case\sphinxhyphen{}insensitive. 910 911\end{itemize} 912\end{sphinxadmonition} 913 914 915 916\renewcommand{\indexname}{Index} 917\printindex 918\end{document}