1 2<!DOCTYPE html> 3 4<html> 5 <head> 6 <meta charset="utf-8" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> 8 9 <title>kadmin — MIT Kerberos Documentation</title> 10 <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" /> 11 <link rel="stylesheet" type="text/css" href="../../_static/agogo.css" /> 12 <link rel="stylesheet" type="text/css" href="../../_static/kerb.css" /> 13 <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script> 14 <script src="../../_static/jquery.js"></script> 15 <script src="../../_static/underscore.js"></script> 16 <script src="../../_static/doctools.js"></script> 17 <link rel="author" title="About these documents" href="../../about.html" /> 18 <link rel="index" title="Index" href="../../genindex.html" /> 19 <link rel="search" title="Search" href="../../search.html" /> 20 <link rel="copyright" title="Copyright" href="../../copyright.html" /> 21 <link rel="next" title="kadmind" href="kadmind.html" /> 22 <link rel="prev" title="Administration programs" href="index.html" /> 23 </head><body> 24 <div class="header-wrapper"> 25 <div class="header"> 26 27 28 <h1><a href="../../index.html">MIT Kerberos Documentation</a></h1> 29 30 <div class="rel"> 31 32 <a href="../../index.html" title="Full Table of Contents" 33 accesskey="C">Contents</a> | 34 <a href="index.html" title="Administration programs" 35 accesskey="P">previous</a> | 36 <a href="kadmind.html" title="kadmind" 37 accesskey="N">next</a> | 38 <a href="../../genindex.html" title="General Index" 39 accesskey="I">index</a> | 40 <a href="../../search.html" title="Enter search criteria" 41 accesskey="S">Search</a> | 42 <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__kadmin">feedback</a> 43 </div> 44 </div> 45 </div> 46 47 <div class="content-wrapper"> 48 <div class="content"> 49 <div class="document"> 50 51 <div class="documentwrapper"> 52 <div class="bodywrapper"> 53 <div class="body" role="main"> 54 55 <section id="kadmin"> 56<span id="kadmin-1"></span><h1>kadmin<a class="headerlink" href="#kadmin" title="Permalink to this headline">¶</a></h1> 57<section id="synopsis"> 58<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2> 59<p id="kadmin-synopsis"><strong>kadmin</strong> 60[<strong>-O</strong>|<strong>-N</strong>] 61[<strong>-r</strong> <em>realm</em>] 62[<strong>-p</strong> <em>principal</em>] 63[<strong>-q</strong> <em>query</em>] 64[[<strong>-c</strong> <em>cache_name</em>]|[<strong>-k</strong> [<strong>-t</strong> <em>keytab</em>]]|<strong>-n</strong>] 65[<strong>-w</strong> <em>password</em>] 66[<strong>-s</strong> <em>admin_server</em>[:<em>port</em>]] 67[command args…]</p> 68<p><strong>kadmin.local</strong> 69[<strong>-r</strong> <em>realm</em>] 70[<strong>-p</strong> <em>principal</em>] 71[<strong>-q</strong> <em>query</em>] 72[<strong>-d</strong> <em>dbname</em>] 73[<strong>-e</strong> <em>enc</em>:<em>salt</em> …] 74[<strong>-m</strong>] 75[<strong>-x</strong> <em>db_args</em>] 76[command args…]</p> 77</section> 78<section id="description"> 79<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> 80<p>kadmin and kadmin.local are command-line interfaces to the Kerberos V5 81administration system. They provide nearly identical functionalities; 82the difference is that kadmin.local directly accesses the KDC 83database, while kadmin performs operations using <a class="reference internal" href="kadmind.html#kadmind-8"><span class="std std-ref">kadmind</span></a>. 84Except as explicitly noted otherwise, this man page will use “kadmin” 85to refer to both versions. kadmin provides for the maintenance of 86Kerberos principals, password policies, and service key tables 87(keytabs).</p> 88<p>The remote kadmin client uses Kerberos to authenticate to kadmind 89using the service principal <code class="docutils literal notranslate"><span class="pre">kadmin/admin</span></code> or <code class="docutils literal notranslate"><span class="pre">kadmin/ADMINHOST</span></code> 90(where <em>ADMINHOST</em> is the fully-qualified hostname of the admin 91server). If the credentials cache contains a ticket for one of these 92principals, and the <strong>-c</strong> credentials_cache option is specified, that 93ticket is used to authenticate to kadmind. Otherwise, the <strong>-p</strong> and 94<strong>-k</strong> options are used to specify the client Kerberos principal name 95used to authenticate. Once kadmin has determined the principal name, 96it requests a service ticket from the KDC, and uses that service 97ticket to authenticate to kadmind.</p> 98<p>Since kadmin.local directly accesses the KDC database, it usually must 99be run directly on the primary KDC with sufficient permissions to read 100the KDC database. If the KDC database uses the LDAP database module, 101kadmin.local can be run on any host which can access the LDAP server.</p> 102</section> 103<section id="options"> 104<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2> 105<dl class="simple" id="kadmin-options"> 106<dt><strong>-r</strong> <em>realm</em></dt><dd><p>Use <em>realm</em> as the default database realm.</p> 107</dd> 108<dt><strong>-p</strong> <em>principal</em></dt><dd><p>Use <em>principal</em> to authenticate. Otherwise, kadmin will append 109<code class="docutils literal notranslate"><span class="pre">/admin</span></code> to the primary principal name of the default ccache, 110the value of the <strong>USER</strong> environment variable, or the username as 111obtained with getpwuid, in order of preference.</p> 112</dd> 113<dt><strong>-k</strong></dt><dd><p>Use a keytab to decrypt the KDC response instead of prompting for 114a password. In this case, the default principal will be 115<code class="docutils literal notranslate"><span class="pre">host/hostname</span></code>. If there is no keytab specified with the 116<strong>-t</strong> option, then the default keytab will be used.</p> 117</dd> 118<dt><strong>-t</strong> <em>keytab</em></dt><dd><p>Use <em>keytab</em> to decrypt the KDC response. This can only be used 119with the <strong>-k</strong> option.</p> 120</dd> 121<dt><strong>-n</strong></dt><dd><p>Requests anonymous processing. Two types of anonymous principals 122are supported. For fully anonymous Kerberos, configure PKINIT on 123the KDC and configure <strong>pkinit_anchors</strong> in the client’s 124<a class="reference internal" href="../conf_files/krb5_conf.html#krb5-conf-5"><span class="std std-ref">krb5.conf</span></a>. Then use the <strong>-n</strong> option with a principal 125of the form <code class="docutils literal notranslate"><span class="pre">@REALM</span></code> (an empty principal name followed by the 126at-sign and a realm name). If permitted by the KDC, an anonymous 127ticket will be returned. A second form of anonymous tickets is 128supported; these realm-exposed tickets hide the identity of the 129client but not the client’s realm. For this mode, use <code class="docutils literal notranslate"><span class="pre">kinit</span> 130<span class="pre">-n</span></code> with a normal principal name. If supported by the KDC, the 131principal (but not realm) will be replaced by the anonymous 132principal. As of release 1.8, the MIT Kerberos KDC only supports 133fully anonymous operation.</p> 134</dd> 135<dt><strong>-c</strong> <em>credentials_cache</em></dt><dd><p>Use <em>credentials_cache</em> as the credentials cache. The cache 136should contain a service ticket for the <code class="docutils literal notranslate"><span class="pre">kadmin/admin</span></code> or 137<code class="docutils literal notranslate"><span class="pre">kadmin/ADMINHOST</span></code> (where <em>ADMINHOST</em> is the fully-qualified 138hostname of the admin server) service; it can be acquired with the 139<a class="reference internal" href="../../user/user_commands/kinit.html#kinit-1"><span class="std std-ref">kinit</span></a> program. If this option is not specified, kadmin 140requests a new service ticket from the KDC, and stores it in its 141own temporary ccache.</p> 142</dd> 143<dt><strong>-w</strong> <em>password</em></dt><dd><p>Use <em>password</em> instead of prompting for one. Use this option with 144care, as it may expose the password to other users on the system 145via the process list.</p> 146</dd> 147<dt><strong>-q</strong> <em>query</em></dt><dd><p>Perform the specified query and then exit.</p> 148</dd> 149<dt><strong>-d</strong> <em>dbname</em></dt><dd><p>Specifies the name of the KDC database. This option does not 150apply to the LDAP database module.</p> 151</dd> 152<dt><strong>-s</strong> <em>admin_server</em>[:<em>port</em>]</dt><dd><p>Specifies the admin server which kadmin should contact.</p> 153</dd> 154<dt><strong>-m</strong></dt><dd><p>If using kadmin.local, prompt for the database master password 155instead of reading it from a stash file.</p> 156</dd> 157<dt><strong>-e</strong> “<em>enc</em>:<em>salt</em> …”</dt><dd><p>Sets the keysalt list to be used for any new keys created. See 158<a class="reference internal" href="../conf_files/kdc_conf.html#keysalt-lists"><span class="std std-ref">Keysalt lists</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a list of possible 159values.</p> 160</dd> 161<dt><strong>-O</strong></dt><dd><p>Force use of old AUTH_GSSAPI authentication flavor.</p> 162</dd> 163<dt><strong>-N</strong></dt><dd><p>Prevent fallback to AUTH_GSSAPI authentication flavor.</p> 164</dd> 165<dt><strong>-x</strong> <em>db_args</em></dt><dd><p>Specifies the database specific arguments. See the next section 166for supported options.</p> 167</dd> 168</dl> 169<p>Starting with release 1.14, if any command-line arguments remain after 170the options, they will be treated as a single query to be executed. 171This mode of operation is intended for scripts and behaves differently 172from the interactive mode in several respects:</p> 173<ul class="simple"> 174<li><p>Query arguments are split by the shell, not by kadmin.</p></li> 175<li><p>Informational and warning messages are suppressed. Error messages 176and query output (e.g. for <strong>get_principal</strong>) will still be 177displayed.</p></li> 178<li><p>Confirmation prompts are disabled (as if <strong>-force</strong> was given). 179Password prompts will still be issued as required.</p></li> 180<li><p>The exit status will be non-zero if the query fails.</p></li> 181</ul> 182<p>The <strong>-q</strong> option does not carry these behavior differences; the query 183will be processed as if it was entered interactively. The <strong>-q</strong> 184option cannot be used in combination with a query in the remaining 185arguments.</p> 186</section> 187<section id="database-options"> 188<span id="dboptions"></span><h2>DATABASE OPTIONS<a class="headerlink" href="#database-options" title="Permalink to this headline">¶</a></h2> 189<p>Database options can be used to override database-specific defaults. 190Supported options for the DB2 module are:</p> 191<blockquote> 192<div><dl class="simple"> 193<dt><strong>-x dbname=</strong>*filename*</dt><dd><p>Specifies the base filename of the DB2 database.</p> 194</dd> 195<dt><strong>-x lockiter</strong></dt><dd><p>Make iteration operations hold the lock for the duration of 196the entire operation, rather than temporarily releasing the 197lock while handling each principal. This is the default 198behavior, but this option exists to allow command line 199override of a [dbmodules] setting. First introduced in 200release 1.13.</p> 201</dd> 202<dt><strong>-x unlockiter</strong></dt><dd><p>Make iteration operations unlock the database for each 203principal, instead of holding the lock for the duration of the 204entire operation. First introduced in release 1.13.</p> 205</dd> 206</dl> 207</div></blockquote> 208<p>Supported options for the LDAP module are:</p> 209<blockquote> 210<div><dl class="simple"> 211<dt><strong>-x host=</strong><em>ldapuri</em></dt><dd><p>Specifies the LDAP server to connect to by a LDAP URI.</p> 212</dd> 213<dt><strong>-x binddn=</strong><em>bind_dn</em></dt><dd><p>Specifies the DN used to bind to the LDAP server.</p> 214</dd> 215<dt><strong>-x bindpwd=</strong><em>password</em></dt><dd><p>Specifies the password or SASL secret used to bind to the LDAP 216server. Using this option may expose the password to other 217users on the system via the process list; to avoid this, 218instead stash the password using the <strong>stashsrvpw</strong> command of 219<a class="reference internal" href="kdb5_ldap_util.html#kdb5-ldap-util-8"><span class="std std-ref">kdb5_ldap_util</span></a>.</p> 220</dd> 221<dt><strong>-x sasl_mech=</strong><em>mechanism</em></dt><dd><p>Specifies the SASL mechanism used to bind to the LDAP server. 222The bind DN is ignored if a SASL mechanism is used. New in 223release 1.13.</p> 224</dd> 225<dt><strong>-x sasl_authcid=</strong><em>name</em></dt><dd><p>Specifies the authentication name used when binding to the 226LDAP server with a SASL mechanism, if the mechanism requires 227one. New in release 1.13.</p> 228</dd> 229<dt><strong>-x sasl_authzid=</strong><em>name</em></dt><dd><p>Specifies the authorization name used when binding to the LDAP 230server with a SASL mechanism. New in release 1.13.</p> 231</dd> 232<dt><strong>-x sasl_realm=</strong><em>realm</em></dt><dd><p>Specifies the realm used when binding to the LDAP server with 233a SASL mechanism, if the mechanism uses one. New in release 2341.13.</p> 235</dd> 236<dt><strong>-x debug=</strong><em>level</em></dt><dd><p>sets the OpenLDAP client library debug level. <em>level</em> is an 237integer to be interpreted by the library. Debugging messages 238are printed to standard error. New in release 1.12.</p> 239</dd> 240</dl> 241</div></blockquote> 242</section> 243<section id="commands"> 244<h2>COMMANDS<a class="headerlink" href="#commands" title="Permalink to this headline">¶</a></h2> 245<p>When using the remote client, available commands may be restricted 246according to the privileges specified in the <a class="reference internal" href="../conf_files/kadm5_acl.html#kadm5-acl-5"><span class="std std-ref">kadm5.acl</span></a> file 247on the admin server.</p> 248<section id="add-principal"> 249<span id="id1"></span><h3>add_principal<a class="headerlink" href="#add-principal" title="Permalink to this headline">¶</a></h3> 250<blockquote> 251<div><p><strong>add_principal</strong> [<em>options</em>] <em>newprinc</em></p> 252</div></blockquote> 253<p>Creates the principal <em>newprinc</em>, prompting twice for a password. If 254no password policy is specified with the <strong>-policy</strong> option, and the 255policy named <code class="docutils literal notranslate"><span class="pre">default</span></code> is assigned to the principal if it exists. 256However, creating a policy named <code class="docutils literal notranslate"><span class="pre">default</span></code> will not automatically 257assign this policy to previously existing principals. This policy 258assignment can be suppressed with the <strong>-clearpolicy</strong> option.</p> 259<p>This command requires the <strong>add</strong> privilege.</p> 260<p>Aliases: <strong>addprinc</strong>, <strong>ank</strong></p> 261<p>Options:</p> 262<dl> 263<dt><strong>-expire</strong> <em>expdate</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) The expiration date of the principal.</p> 264</dd> 265<dt><strong>-pwexpire</strong> <em>pwexpdate</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) The password expiration date.</p> 266</dd> 267<dt><strong>-maxlife</strong> <em>maxlife</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) The maximum ticket life 268for the principal.</p> 269</dd> 270<dt><strong>-maxrenewlife</strong> <em>maxrenewlife</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) The maximum renewable 271life of tickets for the principal.</p> 272</dd> 273<dt><strong>-kvno</strong> <em>kvno</em></dt><dd><p>The initial key version number.</p> 274</dd> 275<dt><strong>-policy</strong> <em>policy</em></dt><dd><p>The password policy used by this principal. If not specified, the 276policy <code class="docutils literal notranslate"><span class="pre">default</span></code> is used if it exists (unless <strong>-clearpolicy</strong> 277is specified).</p> 278</dd> 279<dt><strong>-clearpolicy</strong></dt><dd><p>Prevents any policy from being assigned when <strong>-policy</strong> is not 280specified.</p> 281</dd> 282<dt>{-|+}<strong>allow_postdated</strong></dt><dd><p><strong>-allow_postdated</strong> prohibits this principal from obtaining 283postdated tickets. <strong>+allow_postdated</strong> clears this flag.</p> 284</dd> 285<dt>{-|+}<strong>allow_forwardable</strong></dt><dd><p><strong>-allow_forwardable</strong> prohibits this principal from obtaining 286forwardable tickets. <strong>+allow_forwardable</strong> clears this flag.</p> 287</dd> 288<dt>{-|+}<strong>allow_renewable</strong></dt><dd><p><strong>-allow_renewable</strong> prohibits this principal from obtaining 289renewable tickets. <strong>+allow_renewable</strong> clears this flag.</p> 290</dd> 291<dt>{-|+}<strong>allow_proxiable</strong></dt><dd><p><strong>-allow_proxiable</strong> prohibits this principal from obtaining 292proxiable tickets. <strong>+allow_proxiable</strong> clears this flag.</p> 293</dd> 294<dt>{-|+}<strong>allow_dup_skey</strong></dt><dd><p><strong>-allow_dup_skey</strong> disables user-to-user authentication for this 295principal by prohibiting others from obtaining a service ticket 296encrypted in this principal’s TGT session key. 297<strong>+allow_dup_skey</strong> clears this flag.</p> 298</dd> 299<dt>{-|+}<strong>requires_preauth</strong></dt><dd><p><strong>+requires_preauth</strong> requires this principal to preauthenticate 300before being allowed to kinit. <strong>-requires_preauth</strong> clears this 301flag. When <strong>+requires_preauth</strong> is set on a service principal, 302the KDC will only issue service tickets for that service principal 303if the client’s initial authentication was performed using 304preauthentication.</p> 305</dd> 306<dt>{-|+}<strong>requires_hwauth</strong></dt><dd><p><strong>+requires_hwauth</strong> requires this principal to preauthenticate 307using a hardware device before being allowed to kinit. 308<strong>-requires_hwauth</strong> clears this flag. When <strong>+requires_hwauth</strong> is 309set on a service principal, the KDC will only issue service tickets 310for that service principal if the client’s initial authentication was 311performed using a hardware device to preauthenticate.</p> 312</dd> 313<dt>{-|+}<strong>ok_as_delegate</strong></dt><dd><p><strong>+ok_as_delegate</strong> sets the <strong>okay as delegate</strong> flag on tickets 314issued with this principal as the service. Clients may use this 315flag as a hint that credentials should be delegated when 316authenticating to the service. <strong>-ok_as_delegate</strong> clears this 317flag.</p> 318</dd> 319<dt>{-|+}<strong>allow_svr</strong></dt><dd><p><strong>-allow_svr</strong> prohibits the issuance of service tickets for this 320principal. In release 1.17 and later, user-to-user service 321tickets are still allowed unless the <strong>-allow_dup_skey</strong> flag is 322also set. <strong>+allow_svr</strong> clears this flag.</p> 323</dd> 324<dt>{-|+}<strong>allow_tgs_req</strong></dt><dd><p><strong>-allow_tgs_req</strong> specifies that a Ticket-Granting Service (TGS) 325request for a service ticket for this principal is not permitted. 326<strong>+allow_tgs_req</strong> clears this flag.</p> 327</dd> 328<dt>{-|+}<strong>allow_tix</strong></dt><dd><p><strong>-allow_tix</strong> forbids the issuance of any tickets for this 329principal. <strong>+allow_tix</strong> clears this flag.</p> 330</dd> 331<dt>{-|+}<strong>needchange</strong></dt><dd><p><strong>+needchange</strong> forces a password change on the next initial 332authentication to this principal. <strong>-needchange</strong> clears this 333flag.</p> 334</dd> 335<dt>{-|+}<strong>password_changing_service</strong></dt><dd><p><strong>+password_changing_service</strong> marks this principal as a password 336change service principal.</p> 337</dd> 338<dt>{-|+}<strong>ok_to_auth_as_delegate</strong></dt><dd><p><strong>+ok_to_auth_as_delegate</strong> allows this principal to acquire 339forwardable tickets to itself from arbitrary users, for use with 340constrained delegation.</p> 341</dd> 342<dt>{-|+}<strong>no_auth_data_required</strong></dt><dd><p><strong>+no_auth_data_required</strong> prevents PAC or AD-SIGNEDPATH data from 343being added to service tickets for the principal.</p> 344</dd> 345<dt>{-|+}<strong>lockdown_keys</strong></dt><dd><p><strong>+lockdown_keys</strong> prevents keys for this principal from leaving 346the KDC via kadmind. The chpass and extract operations are denied 347for a principal with this attribute. The chrand operation is 348allowed, but will not return the new keys. The delete and rename 349operations are also denied if this attribute is set, in order to 350prevent a malicious administrator from replacing principals like 351krbtgt/* or kadmin/* with new principals without the attribute. 352This attribute can be set via the network protocol, but can only 353be removed using kadmin.local.</p> 354</dd> 355<dt><strong>-randkey</strong></dt><dd><p>Sets the key of the principal to a random value.</p> 356</dd> 357<dt><strong>-nokey</strong></dt><dd><p>Causes the principal to be created with no key. New in release 3581.12.</p> 359</dd> 360<dt><strong>-pw</strong> <em>password</em></dt><dd><p>Sets the password of the principal to the specified string and 361does not prompt for a password. Note: using this option in a 362shell script may expose the password to other users on the system 363via the process list.</p> 364</dd> 365<dt><strong>-e</strong> <em>enc</em>:<em>salt</em>,…</dt><dd><p>Uses the specified keysalt list for setting the keys of the 366principal. See <a class="reference internal" href="../conf_files/kdc_conf.html#keysalt-lists"><span class="std std-ref">Keysalt lists</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a 367list of possible values.</p> 368</dd> 369<dt><strong>-x</strong> <em>db_princ_args</em></dt><dd><p>Indicates database-specific options. The options for the LDAP 370database module are:</p> 371<dl class="simple"> 372<dt><strong>-x dn=</strong><em>dn</em></dt><dd><p>Specifies the LDAP object that will contain the Kerberos 373principal being created.</p> 374</dd> 375<dt><strong>-x linkdn=</strong><em>dn</em></dt><dd><p>Specifies the LDAP object to which the newly created Kerberos 376principal object will point.</p> 377</dd> 378<dt><strong>-x containerdn=</strong><em>container_dn</em></dt><dd><p>Specifies the container object under which the Kerberos 379principal is to be created.</p> 380</dd> 381<dt><strong>-x tktpolicy=</strong><em>policy</em></dt><dd><p>Associates a ticket policy to the Kerberos principal.</p> 382</dd> 383</dl> 384<div class="admonition note"> 385<p class="admonition-title">Note</p> 386<ul class="simple"> 387<li><p>The <strong>containerdn</strong> and <strong>linkdn</strong> options cannot be 388specified with the <strong>dn</strong> option.</p></li> 389<li><p>If the <em>dn</em> or <em>containerdn</em> options are not specified while 390adding the principal, the principals are created under the 391principal container configured in the realm or the realm 392container.</p></li> 393<li><p><em>dn</em> and <em>containerdn</em> should be within the subtrees or 394principal container configured in the realm.</p></li> 395</ul> 396</div> 397</dd> 398</dl> 399<p>Example:</p> 400<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">addprinc</span> <span class="n">jennifer</span> 401<span class="n">No</span> <span class="n">policy</span> <span class="n">specified</span> <span class="k">for</span> <span class="s2">"jennifer@ATHENA.MIT.EDU"</span><span class="p">;</span> 402<span class="n">defaulting</span> <span class="n">to</span> <span class="n">no</span> <span class="n">policy</span><span class="o">.</span> 403<span class="n">Enter</span> <span class="n">password</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">jennifer</span><span class="nd">@ATHENA</span><span class="o">.</span><span class="n">MIT</span><span class="o">.</span><span class="n">EDU</span><span class="p">:</span> 404<span class="n">Re</span><span class="o">-</span><span class="n">enter</span> <span class="n">password</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">jennifer</span><span class="nd">@ATHENA</span><span class="o">.</span><span class="n">MIT</span><span class="o">.</span><span class="n">EDU</span><span class="p">:</span> 405<span class="n">Principal</span> <span class="s2">"jennifer@ATHENA.MIT.EDU"</span> <span class="n">created</span><span class="o">.</span> 406<span class="n">kadmin</span><span class="p">:</span> 407</pre></div> 408</div> 409</section> 410<section id="modify-principal"> 411<span id="id2"></span><h3>modify_principal<a class="headerlink" href="#modify-principal" title="Permalink to this headline">¶</a></h3> 412<blockquote> 413<div><p><strong>modify_principal</strong> [<em>options</em>] <em>principal</em></p> 414</div></blockquote> 415<p>Modifies the specified principal, changing the fields as specified. 416The options to <strong>add_principal</strong> also apply to this command, except 417for the <strong>-randkey</strong>, <strong>-pw</strong>, and <strong>-e</strong> options. In addition, the 418option <strong>-clearpolicy</strong> will clear the current policy of a principal.</p> 419<p>This command requires the <em>modify</em> privilege.</p> 420<p>Alias: <strong>modprinc</strong></p> 421<p>Options (in addition to the <strong>addprinc</strong> options):</p> 422<dl class="simple"> 423<dt><strong>-unlock</strong></dt><dd><p>Unlocks a locked principal (one which has received too many failed 424authentication attempts without enough time between them according 425to its password policy) so that it can successfully authenticate.</p> 426</dd> 427</dl> 428</section> 429<section id="rename-principal"> 430<span id="id3"></span><h3>rename_principal<a class="headerlink" href="#rename-principal" title="Permalink to this headline">¶</a></h3> 431<blockquote> 432<div><p><strong>rename_principal</strong> [<strong>-force</strong>] <em>old_principal</em> <em>new_principal</em></p> 433</div></blockquote> 434<p>Renames the specified <em>old_principal</em> to <em>new_principal</em>. This 435command prompts for confirmation, unless the <strong>-force</strong> option is 436given.</p> 437<p>This command requires the <strong>add</strong> and <strong>delete</strong> privileges.</p> 438<p>Alias: <strong>renprinc</strong></p> 439</section> 440<section id="delete-principal"> 441<span id="id4"></span><h3>delete_principal<a class="headerlink" href="#delete-principal" title="Permalink to this headline">¶</a></h3> 442<blockquote> 443<div><p><strong>delete_principal</strong> [<strong>-force</strong>] <em>principal</em></p> 444</div></blockquote> 445<p>Deletes the specified <em>principal</em> from the database. This command 446prompts for deletion, unless the <strong>-force</strong> option is given.</p> 447<p>This command requires the <strong>delete</strong> privilege.</p> 448<p>Alias: <strong>delprinc</strong></p> 449</section> 450<section id="change-password"> 451<span id="id5"></span><h3>change_password<a class="headerlink" href="#change-password" title="Permalink to this headline">¶</a></h3> 452<blockquote> 453<div><p><strong>change_password</strong> [<em>options</em>] <em>principal</em></p> 454</div></blockquote> 455<p>Changes the password of <em>principal</em>. Prompts for a new password if 456neither <strong>-randkey</strong> or <strong>-pw</strong> is specified.</p> 457<p>This command requires the <strong>changepw</strong> privilege, or that the 458principal running the program is the same as the principal being 459changed.</p> 460<p>Alias: <strong>cpw</strong></p> 461<p>The following options are available:</p> 462<dl class="simple"> 463<dt><strong>-randkey</strong></dt><dd><p>Sets the key of the principal to a random value.</p> 464</dd> 465<dt><strong>-pw</strong> <em>password</em></dt><dd><p>Set the password to the specified string. Using this option in a 466script may expose the password to other users on the system via 467the process list.</p> 468</dd> 469<dt><strong>-e</strong> <em>enc</em>:<em>salt</em>,…</dt><dd><p>Uses the specified keysalt list for setting the keys of the 470principal. See <a class="reference internal" href="../conf_files/kdc_conf.html#keysalt-lists"><span class="std std-ref">Keysalt lists</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a 471list of possible values.</p> 472</dd> 473<dt><strong>-keepold</strong></dt><dd><p>Keeps the existing keys in the database. This flag is usually not 474necessary except perhaps for <code class="docutils literal notranslate"><span class="pre">krbtgt</span></code> principals.</p> 475</dd> 476</dl> 477<p>Example:</p> 478<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">cpw</span> <span class="n">systest</span> 479<span class="n">Enter</span> <span class="n">password</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">systest</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span><span class="p">:</span> 480<span class="n">Re</span><span class="o">-</span><span class="n">enter</span> <span class="n">password</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">systest</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span><span class="p">:</span> 481<span class="n">Password</span> <span class="k">for</span> <span class="n">systest</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span> <span class="n">changed</span><span class="o">.</span> 482<span class="n">kadmin</span><span class="p">:</span> 483</pre></div> 484</div> 485</section> 486<section id="purgekeys"> 487<span id="id6"></span><h3>purgekeys<a class="headerlink" href="#purgekeys" title="Permalink to this headline">¶</a></h3> 488<blockquote> 489<div><p><strong>purgekeys</strong> [<strong>-all</strong>|<strong>-keepkvno</strong> <em>oldest_kvno_to_keep</em>] <em>principal</em></p> 490</div></blockquote> 491<p>Purges previously retained old keys (e.g., from <strong>change_password 492-keepold</strong>) from <em>principal</em>. If <strong>-keepkvno</strong> is specified, then 493only purges keys with kvnos lower than <em>oldest_kvno_to_keep</em>. If 494<strong>-all</strong> is specified, then all keys are purged. The <strong>-all</strong> option 495is new in release 1.12.</p> 496<p>This command requires the <strong>modify</strong> privilege.</p> 497</section> 498<section id="get-principal"> 499<span id="id7"></span><h3>get_principal<a class="headerlink" href="#get-principal" title="Permalink to this headline">¶</a></h3> 500<blockquote> 501<div><p><strong>get_principal</strong> [<strong>-terse</strong>] <em>principal</em></p> 502</div></blockquote> 503<p>Gets the attributes of principal. With the <strong>-terse</strong> option, outputs 504fields as quoted tab-separated strings.</p> 505<p>This command requires the <strong>inquire</strong> privilege, or that the principal 506running the the program to be the same as the one being listed.</p> 507<p>Alias: <strong>getprinc</strong></p> 508<p>Examples:</p> 509<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">getprinc</span> <span class="n">tlyu</span><span class="o">/</span><span class="n">admin</span> 510<span class="n">Principal</span><span class="p">:</span> <span class="n">tlyu</span><span class="o">/</span><span class="n">admin</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span> 511<span class="n">Expiration</span> <span class="n">date</span><span class="p">:</span> <span class="p">[</span><span class="n">never</span><span class="p">]</span> 512<span class="n">Last</span> <span class="n">password</span> <span class="n">change</span><span class="p">:</span> <span class="n">Mon</span> <span class="n">Aug</span> <span class="mi">12</span> <span class="mi">14</span><span class="p">:</span><span class="mi">16</span><span class="p">:</span><span class="mi">47</span> <span class="n">EDT</span> <span class="mi">1996</span> 513<span class="n">Password</span> <span class="n">expiration</span> <span class="n">date</span><span class="p">:</span> <span class="p">[</span><span class="n">never</span><span class="p">]</span> 514<span class="n">Maximum</span> <span class="n">ticket</span> <span class="n">life</span><span class="p">:</span> <span class="mi">0</span> <span class="n">days</span> <span class="mi">10</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> 515<span class="n">Maximum</span> <span class="n">renewable</span> <span class="n">life</span><span class="p">:</span> <span class="mi">7</span> <span class="n">days</span> <span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> 516<span class="n">Last</span> <span class="n">modified</span><span class="p">:</span> <span class="n">Mon</span> <span class="n">Aug</span> <span class="mi">12</span> <span class="mi">14</span><span class="p">:</span><span class="mi">16</span><span class="p">:</span><span class="mi">47</span> <span class="n">EDT</span> <span class="mi">1996</span> <span class="p">(</span><span class="n">bjaspan</span><span class="o">/</span><span class="n">admin</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span><span class="p">)</span> 517<span class="n">Last</span> <span class="n">successful</span> <span class="n">authentication</span><span class="p">:</span> <span class="p">[</span><span class="n">never</span><span class="p">]</span> 518<span class="n">Last</span> <span class="n">failed</span> <span class="n">authentication</span><span class="p">:</span> <span class="p">[</span><span class="n">never</span><span class="p">]</span> 519<span class="n">Failed</span> <span class="n">password</span> <span class="n">attempts</span><span class="p">:</span> <span class="mi">0</span> 520<span class="n">Number</span> <span class="n">of</span> <span class="n">keys</span><span class="p">:</span> <span class="mi">1</span> 521<span class="n">Key</span><span class="p">:</span> <span class="n">vno</span> <span class="mi">1</span><span class="p">,</span> <span class="n">aes256</span><span class="o">-</span><span class="n">cts</span><span class="o">-</span><span class="n">hmac</span><span class="o">-</span><span class="n">sha384</span><span class="o">-</span><span class="mi">192</span> 522<span class="n">MKey</span><span class="p">:</span> <span class="n">vno</span> <span class="mi">1</span> 523<span class="n">Attributes</span><span class="p">:</span> 524<span class="n">Policy</span><span class="p">:</span> <span class="p">[</span><span class="n">none</span><span class="p">]</span> 525 526<span class="n">kadmin</span><span class="p">:</span> <span class="n">getprinc</span> <span class="o">-</span><span class="n">terse</span> <span class="n">systest</span> 527<span class="n">systest</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span> <span class="mi">3</span> <span class="mi">86400</span> <span class="mi">604800</span> <span class="mi">1</span> 528<span class="mi">785926535</span> <span class="mi">753241234</span> <span class="mi">785900000</span> 529<span class="n">tlyu</span><span class="o">/</span><span class="n">admin</span><span class="nd">@BLEEP</span><span class="o">.</span><span class="n">COM</span> <span class="mi">786100034</span> <span class="mi">0</span> <span class="mi">0</span> 530<span class="n">kadmin</span><span class="p">:</span> 531</pre></div> 532</div> 533</section> 534<section id="list-principals"> 535<span id="id8"></span><h3>list_principals<a class="headerlink" href="#list-principals" title="Permalink to this headline">¶</a></h3> 536<blockquote> 537<div><p><strong>list_principals</strong> [<em>expression</em>]</p> 538</div></blockquote> 539<p>Retrieves all or some principal names. <em>expression</em> is a shell-style 540glob expression that can contain the wild-card characters <code class="docutils literal notranslate"><span class="pre">?</span></code>, 541<code class="docutils literal notranslate"><span class="pre">*</span></code>, and <code class="docutils literal notranslate"><span class="pre">[]</span></code>. All principal names matching the expression are 542printed. If no expression is provided, all principal names are 543printed. If the expression does not contain an <code class="docutils literal notranslate"><span class="pre">@</span></code> character, an 544<code class="docutils literal notranslate"><span class="pre">@</span></code> character followed by the local realm is appended to the 545expression.</p> 546<p>This command requires the <strong>list</strong> privilege.</p> 547<p>Alias: <strong>listprincs</strong>, <strong>get_principals</strong>, <strong>getprincs</strong></p> 548<p>Example:</p> 549<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">listprincs</span> <span class="n">test</span><span class="o">*</span> 550<span class="n">test3</span><span class="nd">@SECURE</span><span class="o">-</span><span class="n">TEST</span><span class="o">.</span><span class="n">OV</span><span class="o">.</span><span class="n">COM</span> 551<span class="n">test2</span><span class="nd">@SECURE</span><span class="o">-</span><span class="n">TEST</span><span class="o">.</span><span class="n">OV</span><span class="o">.</span><span class="n">COM</span> 552<span class="n">test1</span><span class="nd">@SECURE</span><span class="o">-</span><span class="n">TEST</span><span class="o">.</span><span class="n">OV</span><span class="o">.</span><span class="n">COM</span> 553<span class="n">testuser</span><span class="nd">@SECURE</span><span class="o">-</span><span class="n">TEST</span><span class="o">.</span><span class="n">OV</span><span class="o">.</span><span class="n">COM</span> 554<span class="n">kadmin</span><span class="p">:</span> 555</pre></div> 556</div> 557</section> 558<section id="get-strings"> 559<span id="id9"></span><h3>get_strings<a class="headerlink" href="#get-strings" title="Permalink to this headline">¶</a></h3> 560<blockquote> 561<div><p><strong>get_strings</strong> <em>principal</em></p> 562</div></blockquote> 563<p>Displays string attributes on <em>principal</em>.</p> 564<p>This command requires the <strong>inquire</strong> privilege.</p> 565<p>Alias: <strong>getstrs</strong></p> 566</section> 567<section id="set-string"> 568<span id="id10"></span><h3>set_string<a class="headerlink" href="#set-string" title="Permalink to this headline">¶</a></h3> 569<blockquote> 570<div><p><strong>set_string</strong> <em>principal</em> <em>name</em> <em>value</em></p> 571</div></blockquote> 572<p>Sets a string attribute on <em>principal</em>. String attributes are used to 573supply per-principal configuration to the KDC and some KDC plugin 574modules. The following string attribute names are recognized by the 575KDC:</p> 576<dl class="simple"> 577<dt><strong>require_auth</strong></dt><dd><p>Specifies an authentication indicator which is required to 578authenticate to the principal as a service. Multiple indicators 579can be specified, separated by spaces; in this case any of the 580specified indicators will be accepted. (New in release 1.14.)</p> 581</dd> 582<dt><strong>session_enctypes</strong></dt><dd><p>Specifies the encryption types supported for session keys when the 583principal is authenticated to as a server. See 584<a class="reference internal" href="../conf_files/kdc_conf.html#encryption-types"><span class="std std-ref">Encryption types</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a list of the 585accepted values.</p> 586</dd> 587<dt><strong>otp</strong></dt><dd><p>Enables One Time Passwords (OTP) preauthentication for a client 588<em>principal</em>. The <em>value</em> is a JSON string representing an array 589of objects, each having optional <code class="docutils literal notranslate"><span class="pre">type</span></code> and <code class="docutils literal notranslate"><span class="pre">username</span></code> fields.</p> 590</dd> 591<dt><strong>pkinit_cert_match</strong></dt><dd><p>Specifies a matching expression that defines the certificate 592attributes required for the client certificate used by the 593principal during PKINIT authentication. The matching expression 594is in the same format as those used by the <strong>pkinit_cert_match</strong> 595option in <a class="reference internal" href="../conf_files/krb5_conf.html#krb5-conf-5"><span class="std std-ref">krb5.conf</span></a>. (New in release 1.16.)</p> 596</dd> 597<dt><strong>pac_privsvr_enctype</strong></dt><dd><p>Forces the encryption type of the PAC KDC checksum buffers to the 598specified encryption type for tickets issued to this server, by 599deriving a key from the local krbtgt key if it is of a different 600encryption type. It may be necessary to set this value to 601“aes256-sha1” on the cross-realm krbtgt entry for an Active 602Directory realm when using aes-sha2 keys on the local krbtgt 603entry.</p> 604</dd> 605</dl> 606<p>This command requires the <strong>modify</strong> privilege.</p> 607<p>Alias: <strong>setstr</strong></p> 608<p>Example:</p> 609<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">set_string</span> <span class="n">host</span><span class="o">/</span><span class="n">foo</span><span class="o">.</span><span class="n">mit</span><span class="o">.</span><span class="n">edu</span> <span class="n">session_enctypes</span> <span class="n">aes128</span><span class="o">-</span><span class="n">cts</span> 610<span class="n">set_string</span> <span class="n">user</span><span class="nd">@FOO</span><span class="o">.</span><span class="n">COM</span> <span class="n">otp</span> <span class="s2">"[{""type"":""hotp"",""username"":""al""}]"</span> 611</pre></div> 612</div> 613</section> 614<section id="del-string"> 615<span id="id11"></span><h3>del_string<a class="headerlink" href="#del-string" title="Permalink to this headline">¶</a></h3> 616<blockquote> 617<div><p><strong>del_string</strong> <em>principal</em> <em>key</em></p> 618</div></blockquote> 619<p>Deletes a string attribute from <em>principal</em>.</p> 620<p>This command requires the <strong>delete</strong> privilege.</p> 621<p>Alias: <strong>delstr</strong></p> 622</section> 623<section id="add-policy"> 624<span id="id12"></span><h3>add_policy<a class="headerlink" href="#add-policy" title="Permalink to this headline">¶</a></h3> 625<blockquote> 626<div><p><strong>add_policy</strong> [<em>options</em>] <em>policy</em></p> 627</div></blockquote> 628<p>Adds a password policy named <em>policy</em> to the database.</p> 629<p>This command requires the <strong>add</strong> privilege.</p> 630<p>Alias: <strong>addpol</strong></p> 631<p>The following options are available:</p> 632<dl class="simple"> 633<dt><strong>-maxlife</strong> <em>time</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) Sets the maximum 634lifetime of a password.</p> 635</dd> 636<dt><strong>-minlife</strong> <em>time</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) Sets the minimum 637lifetime of a password.</p> 638</dd> 639<dt><strong>-minlength</strong> <em>length</em></dt><dd><p>Sets the minimum length of a password.</p> 640</dd> 641<dt><strong>-minclasses</strong> <em>number</em></dt><dd><p>Sets the minimum number of character classes required in a 642password. The five character classes are lower case, upper case, 643numbers, punctuation, and whitespace/unprintable characters.</p> 644</dd> 645<dt><strong>-history</strong> <em>number</em></dt><dd><p>Sets the number of past keys kept for a principal. This option is 646not supported with the LDAP KDC database module.</p> 647</dd> 648</dl> 649<dl class="simple" id="policy-maxfailure"> 650<dt><strong>-maxfailure</strong> <em>maxnumber</em></dt><dd><p>Sets the number of authentication failures before the principal is 651locked. Authentication failures are only tracked for principals 652which require preauthentication. The counter of failed attempts 653resets to 0 after a successful attempt to authenticate. A 654<em>maxnumber</em> value of 0 (the default) disables lockout.</p> 655</dd> 656</dl> 657<dl class="simple" id="policy-failurecountinterval"> 658<dt><strong>-failurecountinterval</strong> <em>failuretime</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) Sets the allowable time 659between authentication failures. If an authentication failure 660happens after <em>failuretime</em> has elapsed since the previous 661failure, the number of authentication failures is reset to 1. A 662<em>failuretime</em> value of 0 (the default) means forever.</p> 663</dd> 664</dl> 665<dl class="simple" id="policy-lockoutduration"> 666<dt><strong>-lockoutduration</strong> <em>lockouttime</em></dt><dd><p>(<a class="reference internal" href="../../basic/date_format.html#duration"><span class="std std-ref">Time duration</span></a> or <a class="reference internal" href="../../basic/date_format.html#getdate"><span class="std std-ref">getdate time</span></a> string) Sets the duration for 667which the principal is locked from authenticating if too many 668authentication failures occur without the specified failure count 669interval elapsing. A duration of 0 (the default) means the 670principal remains locked out until it is administratively unlocked 671with <code class="docutils literal notranslate"><span class="pre">modprinc</span> <span class="pre">-unlock</span></code>.</p> 672</dd> 673<dt><strong>-allowedkeysalts</strong></dt><dd><p>Specifies the key/salt tuples supported for long-term keys when 674setting or changing a principal’s password/keys. See 675<a class="reference internal" href="../conf_files/kdc_conf.html#keysalt-lists"><span class="std std-ref">Keysalt lists</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a list of the 676accepted values, but note that key/salt tuples must be separated 677with commas (‘,’) only. To clear the allowed key/salt policy use 678a value of ‘-‘.</p> 679</dd> 680</dl> 681<p>Example:</p> 682<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">add_policy</span> <span class="o">-</span><span class="n">maxlife</span> <span class="s2">"2 days"</span> <span class="o">-</span><span class="n">minlength</span> <span class="mi">5</span> <span class="n">guests</span> 683<span class="n">kadmin</span><span class="p">:</span> 684</pre></div> 685</div> 686</section> 687<section id="modify-policy"> 688<span id="id13"></span><h3>modify_policy<a class="headerlink" href="#modify-policy" title="Permalink to this headline">¶</a></h3> 689<blockquote> 690<div><p><strong>modify_policy</strong> [<em>options</em>] <em>policy</em></p> 691</div></blockquote> 692<p>Modifies the password policy named <em>policy</em>. Options are as described 693for <strong>add_policy</strong>.</p> 694<p>This command requires the <strong>modify</strong> privilege.</p> 695<p>Alias: <strong>modpol</strong></p> 696</section> 697<section id="delete-policy"> 698<span id="id14"></span><h3>delete_policy<a class="headerlink" href="#delete-policy" title="Permalink to this headline">¶</a></h3> 699<blockquote> 700<div><p><strong>delete_policy</strong> [<strong>-force</strong>] <em>policy</em></p> 701</div></blockquote> 702<p>Deletes the password policy named <em>policy</em>. Prompts for confirmation 703before deletion. The command will fail if the policy is in use by any 704principals.</p> 705<p>This command requires the <strong>delete</strong> privilege.</p> 706<p>Alias: <strong>delpol</strong></p> 707<p>Example:</p> 708<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>kadmin: del_policy guests 709Are you sure you want to delete the policy "guests"? 710(yes/no): yes 711kadmin: 712</pre></div> 713</div> 714</section> 715<section id="get-policy"> 716<span id="id15"></span><h3>get_policy<a class="headerlink" href="#get-policy" title="Permalink to this headline">¶</a></h3> 717<blockquote> 718<div><p><strong>get_policy</strong> [ <strong>-terse</strong> ] <em>policy</em></p> 719</div></blockquote> 720<p>Displays the values of the password policy named <em>policy</em>. With the 721<strong>-terse</strong> flag, outputs the fields as quoted strings separated by 722tabs.</p> 723<p>This command requires the <strong>inquire</strong> privilege.</p> 724<p>Alias: <strong>getpol</strong></p> 725<p>Examples:</p> 726<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">get_policy</span> <span class="n">admin</span> 727<span class="n">Policy</span><span class="p">:</span> <span class="n">admin</span> 728<span class="n">Maximum</span> <span class="n">password</span> <span class="n">life</span><span class="p">:</span> <span class="mi">180</span> <span class="n">days</span> <span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> 729<span class="n">Minimum</span> <span class="n">password</span> <span class="n">life</span><span class="p">:</span> <span class="mi">00</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> 730<span class="n">Minimum</span> <span class="n">password</span> <span class="n">length</span><span class="p">:</span> <span class="mi">6</span> 731<span class="n">Minimum</span> <span class="n">number</span> <span class="n">of</span> <span class="n">password</span> <span class="n">character</span> <span class="n">classes</span><span class="p">:</span> <span class="mi">2</span> 732<span class="n">Number</span> <span class="n">of</span> <span class="n">old</span> <span class="n">keys</span> <span class="n">kept</span><span class="p">:</span> <span class="mi">5</span> 733<span class="n">Reference</span> <span class="n">count</span><span class="p">:</span> <span class="mi">17</span> 734 735<span class="n">kadmin</span><span class="p">:</span> <span class="n">get_policy</span> <span class="o">-</span><span class="n">terse</span> <span class="n">admin</span> 736<span class="n">admin</span> <span class="mi">15552000</span> <span class="mi">0</span> <span class="mi">6</span> <span class="mi">2</span> <span class="mi">5</span> <span class="mi">17</span> 737<span class="n">kadmin</span><span class="p">:</span> 738</pre></div> 739</div> 740<p>The “Reference count” is the number of principals using that policy. 741With the LDAP KDC database module, the reference count field is not 742meaningful.</p> 743</section> 744<section id="list-policies"> 745<span id="id16"></span><h3>list_policies<a class="headerlink" href="#list-policies" title="Permalink to this headline">¶</a></h3> 746<blockquote> 747<div><p><strong>list_policies</strong> [<em>expression</em>]</p> 748</div></blockquote> 749<p>Retrieves all or some policy names. <em>expression</em> is a shell-style 750glob expression that can contain the wild-card characters <code class="docutils literal notranslate"><span class="pre">?</span></code>, 751<code class="docutils literal notranslate"><span class="pre">*</span></code>, and <code class="docutils literal notranslate"><span class="pre">[]</span></code>. All policy names matching the expression are 752printed. If no expression is provided, all existing policy names are 753printed.</p> 754<p>This command requires the <strong>list</strong> privilege.</p> 755<p>Aliases: <strong>listpols</strong>, <strong>get_policies</strong>, <strong>getpols</strong>.</p> 756<p>Examples:</p> 757<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">listpols</span> 758<span class="n">test</span><span class="o">-</span><span class="n">pol</span> 759<span class="nb">dict</span><span class="o">-</span><span class="n">only</span> 760<span class="n">once</span><span class="o">-</span><span class="n">a</span><span class="o">-</span><span class="nb">min</span> 761<span class="n">test</span><span class="o">-</span><span class="n">pol</span><span class="o">-</span><span class="n">nopw</span> 762 763<span class="n">kadmin</span><span class="p">:</span> <span class="n">listpols</span> <span class="n">t</span><span class="o">*</span> 764<span class="n">test</span><span class="o">-</span><span class="n">pol</span> 765<span class="n">test</span><span class="o">-</span><span class="n">pol</span><span class="o">-</span><span class="n">nopw</span> 766<span class="n">kadmin</span><span class="p">:</span> 767</pre></div> 768</div> 769</section> 770<section id="ktadd"> 771<span id="id17"></span><h3>ktadd<a class="headerlink" href="#ktadd" title="Permalink to this headline">¶</a></h3> 772<blockquote> 773<div><div class="line-block"> 774<div class="line"><strong>ktadd</strong> [options] <em>principal</em></div> 775<div class="line"><strong>ktadd</strong> [options] <strong>-glob</strong> <em>princ-exp</em></div> 776</div> 777</div></blockquote> 778<p>Adds a <em>principal</em>, or all principals matching <em>princ-exp</em>, to a 779keytab file. Each principal’s keys are randomized in the process. 780The rules for <em>princ-exp</em> are described in the <strong>list_principals</strong> 781command.</p> 782<p>This command requires the <strong>inquire</strong> and <strong>changepw</strong> privileges. 783With the <strong>-glob</strong> form, it also requires the <strong>list</strong> privilege.</p> 784<p>The options are:</p> 785<dl class="simple"> 786<dt><strong>-k[eytab]</strong> <em>keytab</em></dt><dd><p>Use <em>keytab</em> as the keytab file. Otherwise, the default keytab is 787used.</p> 788</dd> 789<dt><strong>-e</strong> <em>enc</em>:<em>salt</em>,…</dt><dd><p>Uses the specified keysalt list for setting the new keys of the 790principal. See <a class="reference internal" href="../conf_files/kdc_conf.html#keysalt-lists"><span class="std std-ref">Keysalt lists</span></a> in <a class="reference internal" href="../conf_files/kdc_conf.html#kdc-conf-5"><span class="std std-ref">kdc.conf</span></a> for a 791list of possible values.</p> 792</dd> 793<dt><strong>-q</strong></dt><dd><p>Display less verbose information.</p> 794</dd> 795<dt><strong>-norandkey</strong></dt><dd><p>Do not randomize the keys. The keys and their version numbers stay 796unchanged. This option cannot be specified in combination with the 797<strong>-e</strong> option.</p> 798</dd> 799</dl> 800<p>An entry for each of the principal’s unique encryption types is added, 801ignoring multiple keys with the same encryption type but different 802salt types.</p> 803<p>Alias: <strong>xst</strong></p> 804<p>Example:</p> 805<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">ktadd</span> <span class="o">-</span><span class="n">k</span> <span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">foo</span><span class="o">-</span><span class="n">new</span><span class="o">-</span><span class="n">keytab</span> <span class="n">host</span><span class="o">/</span><span class="n">foo</span><span class="o">.</span><span class="n">mit</span><span class="o">.</span><span class="n">edu</span> 806<span class="n">Entry</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">host</span><span class="o">/</span><span class="n">foo</span><span class="o">.</span><span class="n">mit</span><span class="o">.</span><span class="n">edu</span><span class="nd">@ATHENA</span><span class="o">.</span><span class="n">MIT</span><span class="o">.</span><span class="n">EDU</span> <span class="k">with</span> <span class="n">kvno</span> <span class="mi">3</span><span class="p">,</span> 807 <span class="n">encryption</span> <span class="nb">type</span> <span class="n">aes256</span><span class="o">-</span><span class="n">cts</span><span class="o">-</span><span class="n">hmac</span><span class="o">-</span><span class="n">sha1</span><span class="o">-</span><span class="mi">96</span> <span class="n">added</span> <span class="n">to</span> <span class="n">keytab</span> 808 <span class="n">FILE</span><span class="p">:</span><span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">foo</span><span class="o">-</span><span class="n">new</span><span class="o">-</span><span class="n">keytab</span> 809<span class="n">kadmin</span><span class="p">:</span> 810</pre></div> 811</div> 812</section> 813<section id="ktremove"> 814<span id="id18"></span><h3>ktremove<a class="headerlink" href="#ktremove" title="Permalink to this headline">¶</a></h3> 815<blockquote> 816<div><p><strong>ktremove</strong> [options] <em>principal</em> [<em>kvno</em> | <em>all</em> | <em>old</em>]</p> 817</div></blockquote> 818<p>Removes entries for the specified <em>principal</em> from a keytab. Requires 819no permissions, since this does not require database access.</p> 820<p>If the string “all” is specified, all entries for that principal are 821removed; if the string “old” is specified, all entries for that 822principal except those with the highest kvno are removed. Otherwise, 823the value specified is parsed as an integer, and all entries whose 824kvno match that integer are removed.</p> 825<p>The options are:</p> 826<dl class="simple"> 827<dt><strong>-k[eytab]</strong> <em>keytab</em></dt><dd><p>Use <em>keytab</em> as the keytab file. Otherwise, the default keytab is 828used.</p> 829</dd> 830<dt><strong>-q</strong></dt><dd><p>Display less verbose information.</p> 831</dd> 832</dl> 833<p>Alias: <strong>ktrem</strong></p> 834<p>Example:</p> 835<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kadmin</span><span class="p">:</span> <span class="n">ktremove</span> <span class="n">kadmin</span><span class="o">/</span><span class="n">admin</span> <span class="nb">all</span> 836<span class="n">Entry</span> <span class="k">for</span> <span class="n">principal</span> <span class="n">kadmin</span><span class="o">/</span><span class="n">admin</span> <span class="k">with</span> <span class="n">kvno</span> <span class="mi">3</span> <span class="n">removed</span> <span class="kn">from</span> <span class="nn">keytab</span> 837 <span class="n">FILE</span><span class="p">:</span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">krb5</span><span class="o">.</span><span class="n">keytab</span> 838<span class="n">kadmin</span><span class="p">:</span> 839</pre></div> 840</div> 841</section> 842<section id="lock"> 843<h3>lock<a class="headerlink" href="#lock" title="Permalink to this headline">¶</a></h3> 844<p>Lock database exclusively. Use with extreme caution! This command 845only works with the DB2 KDC database module.</p> 846</section> 847<section id="unlock"> 848<h3>unlock<a class="headerlink" href="#unlock" title="Permalink to this headline">¶</a></h3> 849<p>Release the exclusive database lock.</p> 850</section> 851<section id="list-requests"> 852<h3>list_requests<a class="headerlink" href="#list-requests" title="Permalink to this headline">¶</a></h3> 853<p>Lists available for kadmin requests.</p> 854<p>Aliases: <strong>lr</strong>, <strong>?</strong></p> 855</section> 856<section id="quit"> 857<h3>quit<a class="headerlink" href="#quit" title="Permalink to this headline">¶</a></h3> 858<p>Exit program. If the database was locked, the lock is released.</p> 859<p>Aliases: <strong>exit</strong>, <strong>q</strong></p> 860</section> 861</section> 862<section id="history"> 863<h2>HISTORY<a class="headerlink" href="#history" title="Permalink to this headline">¶</a></h2> 864<p>The kadmin program was originally written by Tom Yu at MIT, as an 865interface to the OpenVision Kerberos administration program.</p> 866</section> 867<section id="environment"> 868<h2>ENVIRONMENT<a class="headerlink" href="#environment" title="Permalink to this headline">¶</a></h2> 869<p>See <a class="reference internal" href="../../user/user_config/kerberos.html#kerberos-7"><span class="std std-ref">kerberos</span></a> for a description of Kerberos environment 870variables.</p> 871</section> 872<section id="see-also"> 873<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2> 874<p><a class="reference internal" href="../../user/user_commands/kpasswd.html#kpasswd-1"><span class="std std-ref">kpasswd</span></a>, <a class="reference internal" href="kadmind.html#kadmind-8"><span class="std std-ref">kadmind</span></a>, <a class="reference internal" href="../../user/user_config/kerberos.html#kerberos-7"><span class="std std-ref">kerberos</span></a></p> 875</section> 876</section> 877 878 879 <div class="clearer"></div> 880 </div> 881 </div> 882 </div> 883 </div> 884 <div class="sidebar"> 885 886 <h2>On this page</h2> 887 <ul> 888<li><a class="reference internal" href="#">kadmin</a><ul> 889<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li> 890<li><a class="reference internal" href="#description">DESCRIPTION</a></li> 891<li><a class="reference internal" href="#options">OPTIONS</a></li> 892<li><a class="reference internal" href="#database-options">DATABASE OPTIONS</a></li> 893<li><a class="reference internal" href="#commands">COMMANDS</a><ul> 894<li><a class="reference internal" href="#add-principal">add_principal</a></li> 895<li><a class="reference internal" href="#modify-principal">modify_principal</a></li> 896<li><a class="reference internal" href="#rename-principal">rename_principal</a></li> 897<li><a class="reference internal" href="#delete-principal">delete_principal</a></li> 898<li><a class="reference internal" href="#change-password">change_password</a></li> 899<li><a class="reference internal" href="#purgekeys">purgekeys</a></li> 900<li><a class="reference internal" href="#get-principal">get_principal</a></li> 901<li><a class="reference internal" href="#list-principals">list_principals</a></li> 902<li><a class="reference internal" href="#get-strings">get_strings</a></li> 903<li><a class="reference internal" href="#set-string">set_string</a></li> 904<li><a class="reference internal" href="#del-string">del_string</a></li> 905<li><a class="reference internal" href="#add-policy">add_policy</a></li> 906<li><a class="reference internal" href="#modify-policy">modify_policy</a></li> 907<li><a class="reference internal" href="#delete-policy">delete_policy</a></li> 908<li><a class="reference internal" href="#get-policy">get_policy</a></li> 909<li><a class="reference internal" href="#list-policies">list_policies</a></li> 910<li><a class="reference internal" href="#ktadd">ktadd</a></li> 911<li><a class="reference internal" href="#ktremove">ktremove</a></li> 912<li><a class="reference internal" href="#lock">lock</a></li> 913<li><a class="reference internal" href="#unlock">unlock</a></li> 914<li><a class="reference internal" href="#list-requests">list_requests</a></li> 915<li><a class="reference internal" href="#quit">quit</a></li> 916</ul> 917</li> 918<li><a class="reference internal" href="#history">HISTORY</a></li> 919<li><a class="reference internal" href="#environment">ENVIRONMENT</a></li> 920<li><a class="reference internal" href="#see-also">SEE ALSO</a></li> 921</ul> 922</li> 923</ul> 924 925 <br/> 926 <h2>Table of contents</h2> 927 <ul class="current"> 928<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">For users</a></li> 929<li class="toctree-l1 current"><a class="reference internal" href="../index.html">For administrators</a><ul class="current"> 930<li class="toctree-l2"><a class="reference internal" href="../install.html">Installation guide</a></li> 931<li class="toctree-l2"><a class="reference internal" href="../conf_files/index.html">Configuration Files</a></li> 932<li class="toctree-l2"><a class="reference internal" href="../realm_config.html">Realm configuration decisions</a></li> 933<li class="toctree-l2"><a class="reference internal" href="../database.html">Database administration</a></li> 934<li class="toctree-l2"><a class="reference internal" href="../dbtypes.html">Database types</a></li> 935<li class="toctree-l2"><a class="reference internal" href="../lockout.html">Account lockout</a></li> 936<li class="toctree-l2"><a class="reference internal" href="../conf_ldap.html">Configuring Kerberos with OpenLDAP back-end</a></li> 937<li class="toctree-l2"><a class="reference internal" href="../appl_servers.html">Application servers</a></li> 938<li class="toctree-l2"><a class="reference internal" href="../host_config.html">Host configuration</a></li> 939<li class="toctree-l2"><a class="reference internal" href="../backup_host.html">Backups of secure hosts</a></li> 940<li class="toctree-l2"><a class="reference internal" href="../pkinit.html">PKINIT configuration</a></li> 941<li class="toctree-l2"><a class="reference internal" href="../otp.html">OTP Preauthentication</a></li> 942<li class="toctree-l2"><a class="reference internal" href="../spake.html">SPAKE Preauthentication</a></li> 943<li class="toctree-l2"><a class="reference internal" href="../dictionary.html">Addressing dictionary attack risks</a></li> 944<li class="toctree-l2"><a class="reference internal" href="../princ_dns.html">Principal names and DNS</a></li> 945<li class="toctree-l2"><a class="reference internal" href="../enctypes.html">Encryption types</a></li> 946<li class="toctree-l2"><a class="reference internal" href="../https.html">HTTPS proxy configuration</a></li> 947<li class="toctree-l2"><a class="reference internal" href="../auth_indicator.html">Authentication indicators</a></li> 948<li class="toctree-l2 current"><a class="reference internal" href="index.html">Administration programs</a><ul class="current"> 949<li class="toctree-l3 current"><a class="current reference internal" href="#">kadmin</a></li> 950<li class="toctree-l3"><a class="reference internal" href="kadmind.html">kadmind</a></li> 951<li class="toctree-l3"><a class="reference internal" href="kdb5_util.html">kdb5_util</a></li> 952<li class="toctree-l3"><a class="reference internal" href="kdb5_ldap_util.html">kdb5_ldap_util</a></li> 953<li class="toctree-l3"><a class="reference internal" href="krb5kdc.html">krb5kdc</a></li> 954<li class="toctree-l3"><a class="reference internal" href="kprop.html">kprop</a></li> 955<li class="toctree-l3"><a class="reference internal" href="kpropd.html">kpropd</a></li> 956<li class="toctree-l3"><a class="reference internal" href="kproplog.html">kproplog</a></li> 957<li class="toctree-l3"><a class="reference internal" href="ktutil.html">ktutil</a></li> 958<li class="toctree-l3"><a class="reference internal" href="k5srvutil.html">k5srvutil</a></li> 959<li class="toctree-l3"><a class="reference internal" href="sserver.html">sserver</a></li> 960</ul> 961</li> 962<li class="toctree-l2"><a class="reference internal" href="../../mitK5defaults.html">MIT Kerberos defaults</a></li> 963<li class="toctree-l2"><a class="reference internal" href="../env_variables.html">Environment variables</a></li> 964<li class="toctree-l2"><a class="reference internal" href="../troubleshoot.html">Troubleshooting</a></li> 965<li class="toctree-l2"><a class="reference internal" href="../advanced/index.html">Advanced topics</a></li> 966<li class="toctree-l2"><a class="reference internal" href="../various_envs.html">Various links</a></li> 967</ul> 968</li> 969<li class="toctree-l1"><a class="reference internal" href="../../appdev/index.html">For application developers</a></li> 970<li class="toctree-l1"><a class="reference internal" href="../../plugindev/index.html">For plugin module developers</a></li> 971<li class="toctree-l1"><a class="reference internal" href="../../build/index.html">Building Kerberos V5</a></li> 972<li class="toctree-l1"><a class="reference internal" href="../../basic/index.html">Kerberos V5 concepts</a></li> 973<li class="toctree-l1"><a class="reference internal" href="../../formats/index.html">Protocols and file formats</a></li> 974<li class="toctree-l1"><a class="reference internal" href="../../mitK5features.html">MIT Kerberos features</a></li> 975<li class="toctree-l1"><a class="reference internal" href="../../build_this.html">How to build this documentation from the source</a></li> 976<li class="toctree-l1"><a class="reference internal" href="../../about.html">Contributing to the MIT Kerberos Documentation</a></li> 977<li class="toctree-l1"><a class="reference internal" href="../../resources.html">Resources</a></li> 978</ul> 979 980 <br/> 981 <h4><a href="../../index.html">Full Table of Contents</a></h4> 982 <h4>Search</h4> 983 <form class="search" action="../../search.html" method="get"> 984 <input type="text" name="q" size="18" /> 985 <input type="submit" value="Go" /> 986 <input type="hidden" name="check_keywords" value="yes" /> 987 <input type="hidden" name="area" value="default" /> 988 </form> 989 990 </div> 991 <div class="clearer"></div> 992 </div> 993 </div> 994 995 <div class="footer-wrapper"> 996 <div class="footer" > 997 <div class="right" ><i>Release: 1.21.3</i><br /> 998 © <a href="../../copyright.html">Copyright</a> 1985-2024, MIT. 999 </div> 1000 <div class="left"> 1001 1002 <a href="../../index.html" title="Full Table of Contents" 1003 >Contents</a> | 1004 <a href="index.html" title="Administration programs" 1005 >previous</a> | 1006 <a href="kadmind.html" title="kadmind" 1007 >next</a> | 1008 <a href="../../genindex.html" title="General Index" 1009 >index</a> | 1010 <a href="../../search.html" title="Enter search criteria" 1011 >Search</a> | 1012 <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__kadmin">feedback</a> 1013 </div> 1014 </div> 1015 </div> 1016 1017 </body> 1018</html>