kinit
securityLinux/Unix/macOS
The kinit command is one of the most frequently used commands in Linux/Unix-like operating systems. kinit Obtain and cache Kerberos ticket-granting ticket
Quick Reference
Command Name:
kinit
Category:
security
Platform:
Linux/Unix/macOS
Basic Usage:
kinit [options] [arguments]
Common Use Cases
Syntax
kinit [options] [principal]
Options
Option | Description |
---|---|
-l lifetime |
Specify ticket lifetime (e.g., 10h for 10 hours) |
-r renewable_life |
Specify renewable lifetime (e.g., 7d for 7 days) |
-s start_time |
Specify a start time for the ticket (e.g., +1h for 1 hour from now) |
-f |
Request a forwardable ticket |
-p |
Request a proxiable ticket |
-c cache_name |
Use an alternate credentials cache |
-k |
Obtain the ticket using a keytab |
-t keytab_file |
Specify the keytab file to use |
-A |
Request address-less tickets |
-n |
Request anonymous processing |
-S service |
Request a ticket for a specific service |
-v |
Verbose output mode |
-R |
Renew a ticket |
-T |
Get a ticket based on a ticket (renewal) |
Examples
How to Use These Examples
The examples below show common ways to use the kinit
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
kinit