Kinit

Overview#

The kinit command obtains or renews a Kerberos ticket-granting ticket from the Key Distribution Center options specified in the /etc/krb5.conf file or DNS SRV records if you do not specify these options on the command-line.

To test the operation of Kerberos, request a Ticket Granting Ticket (TGT) with the Kinit command, as shown below. Any valid Kerberos Principal (AD User) can be substituted for "Administrator".

   kinit -p Administrator@LAB.EXAMPLE.COM
   Password for Administrator@LAB.EXAMPLE.COM: ****
or
   kinit -p Administrator@LAB.EXAMPLE.COM%password
If you get no errors You can verify that you have correctly obtained a ticket using the klist tool.

Troubleshooting#

Note: The realm name is Case-sensitive and is usually UPPERCASE.

There are many possible reason why you can't get a ticket.

kinit: krb5_get_init_creds: unable to reach any KDC in realm EXAMPLE.COM

Such a error says that the server is not reachable. Check those points :

kinit - obtain and cache Kerberos ticket-granting ticket

Synopsis#

kinit
[-V] [-l lifetime] [-s start_time] [-r renewable_life] [-p | -P] [-f | -F] [-a] [-A] [-C] [-E] [-v] [-R] [-k [-t keytab_file]] [-c cache_name] [-n] [-S service_name][-T armor_ccache] [-X attribute[=value]] [principal]

Description#

kinit obtains and caches an initial ticket-granting ticket for principal.

Options#

OpenSSL pkinit#

The following attributes are recognized by the OpenSSL pkinit pre-authentication mechanism:

Environment#

Kinit uses the following environment variables:

Files#

/tmp/krb5cc_[uid]
default location of Kerberos 5 credentials cache (uidNumber is the decimal UID of the user).
/etc/krb5.keytab
default location for the local host's keytab file.

More Information#

There might be more information for this subject on one of the following: