title: Kerberos auto update for "renew until"
body: <p>Given with keywords like <strong>Kerberos "renew until" auto</strong>, doesn't find threads that can solve my problem, so posting here. </p>
  
  <p>I create a keytab which contains following ticket lifetime info</p>
  
  <pre><code>Valid starting: 09/14/2018 13:05:01 
  Expires: 09/15/2018 13:05:01
  renew until: 09/19/2018 09:26:37
  </code></pre>
  
  <p>Based on <a href="https://stackoverflow.com/questions/43189044/hadoop-kerberos-ticket-auto-renew">Hadoop kerberos ticket auto renew</a></p>
  
  <p>I am able to renew ticket extending <strong>Expires</strong> date without a problem. </p>
  
  <p>Now another problem is <strong>renew until</strong> is set to expire after 7 days. </p>
  
  <p>My question: </p>
  
  <ul>
  <li><p>Which command similar to <code>kinit -R</code> can auto extend <strong>renew until</strong> date so that I don't need to reissue <code>kinit -kt mine.keytab my-principal</code> for getting a new ticket for my keytab? </p></li>
  <li><p>Or any API that can achieve the same effect? With following Hadoop APIs, based on <a href="https://www.cloudera.com/documentation/enterprise/5-14-x/topics/sg_kerberos_troubleshoot.html" rel="nofollow noreferrer">https://www.cloudera.com/documentation/enterprise/5-14-x/topics/sg_kerberos_troubleshoot.html</a>, I can execute the code but I don't find <strong>renew until</strong> gets updated.</p>
  
  <pre><code>UserGroupInformation.loginUserFromKeytab(principal, keyPath)
  val currentUser = UserGroupInformation.getCurrentUser()   
  currentUser.checkTGTAndReloginFromKeytab
  val currentUser1 = UserGroupInformation.getLoginUser
  currentUser1.checkTGTAndReloginFromKeytab`
  </code></pre>
  
  <p><code>klist</code> shows that the date in the <strong>renew until</strong> section remains the same.     </p></li>
  </ul>
  
  <p>Edit: formatting</p>