I'm using kinit to log into a server that my sys admin didn't anticipate us using. It seems that the default location for the config file is /etc/krb5.conf
, but I don't have root access so I can't edit this file to add a new server. How can I pass kinit a custom config file?
Asked
Active
Viewed 4.7k times
26

Shep
- 7,990
- 8
- 49
- 71
3 Answers
28
OK, solved the problem: the default config file location can be overridden by setting the KRB5_CONFIG
environment variable

Shep
- 7,990
- 8
- 49
- 71
-
I need the same for java kinit command. Is there any Environment variable for it? – Kumar May 28 '15 at 06:17
21
I had the same issue today. Here's the command that worked for me, for future reference:
env KRB5_CONFIG=/path/to/custom/krb5.conf kinit <your..args..here>

Cita Secari
- 311
- 2
- 3
16
Try using
on Win
-Djava.security.krb5.conf=C:/IBM/IBMSSO/krb5.ini
on non Win
-Djava.security.krb5.conf=/opt/IBM/IBMSSO/krb5.conf
Example on Windows (with IBM Java)
java -Djava.security.krb5.conf=C:/IBM/IBMSSO/krb5.ini com.ibm.security.krb5.internal.tools.Kinit -k -t C:/IBM/IBMSSO/SSOICNTilo.keytab HTTP/myserver.123.com@123.COM
-
7For kinit.exe, the parameter has to be in quotes: `kinit.exe -J-Dsun.security.krb5.debug=true -J-D"java.security.krb5.conf=C:\mypath\my_krb5.ini"` – Olivier Faucheux Aug 21 '15 at 11:54