how to set default TGT file path

Greg Hudson ghudson at mit.edu
Tue Dec 23 11:15:56 EST 2014


On 12/23/2014 04:38 AM, Shuaijie Wang wrote:
> By default, kinit will generate TGT file under /tmp. Is there any way to
> specify other directory to put TGT in?

Gwenael already pointed out the KRB5CCNAME environment variable.  In
addition, MIT krb5 1.11 adds the default_ccache_name krb5.conf variable
with parameter expansion and the DEFCCNAME configure parameter.  These
two new variables support parameter expansion as documented here:


http://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html#parameter-expansion

So for example, you could put in krb5.conf:

    [libdefaults]
    default_ccache_name = FILE:/var/tmp/krb5cc_%{euid}

or at build time:

    ./configure DEFCCNAME='DIR:/var/krb5/%{username}'


More information about the Kerberos mailing list