Kinit tool for obtaining Kerberos v5 tickets.
java.lang.Object
|
+--com.ibm.security.krb5.internal.tools.Kinit
public class Kinit
extends java.lang.Object
Kinit tool for obtaining Kerberos v5 tickets.
Kinit(java.lang.String[] args)
Constructs a new Kinit object.
static void | main(java.lang.String[] args) |
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Kinit
public Kinit(java.lang.String[] args)
throws java.io.IOException,
RealmException,
KrbException
Constructs a new Kinit object.
java.io.IOException - if an I/O error occurs.
RealmException - if the Realm could not be instantiated.
KrbException - if error occurs during Kerberos operation.
main
public static void main(java.lang.String[] args)
The main method is used to accept user command line input for ticket request.
Use java com.ibm.security.krb5.tools.Kinit -help to bring up help menu.
We currently only support file-based credentials cache. By default, a cache file named krb5cc_{user.name} would be generated at {user.home} directory to store the ticket obtained from KDC. For instance, on Windows NT, it could be c:\winnt\profiles\qwedf\krb5cc_qwedf, in which qwedf is the {user.name}, and c:\winnt\profile\qwedf is the {user.home}. {user.home} is obtained by Kerberos from Java system property "user.home". If in some case {user.home} is null (which barely happens), the cache file would be stored in the current directory that the program is running from. {user.name} is operating system's login username. It could be different from user's principal name. One user could have multiple principal names, but the primary principal of the credentials cache could only be one, which means one cache file could only store tickets for one specific user principal. If the user switches the principal name at the next Kinit, the cache file generated for the new ticket would overwrite the old cache file by default. To avoid overwriting, you need to specify a different directory or different cache file name when you request a new ticket.
Cache file location
KRB5CCNAME is case sensitive and is all upper case.
KDC Communication Timeout
Kinit communicates with the Key Distribution Center (KDC) to acquire a ticket-granting ticket, that is, the credential. This communication can be set to timeout if the KDC does not respond within a certain period. The timeout period can be set (in milliseconds) in the Kerberos configuration file in the libdefaults stanza (to be applicable to all KDCs) or in individual KDC stanzas. The default timeout value is 30 seconds.