Why is kerberos collection not listing valid principals?

297 Views Asked by At

Each cache in folder:

$ ls -l ~/mycache
total 20
-rw------- 1 username username  998 Jan  1 10:18 a.REALM.cache
-rw------- 1 username username 1778 Jun  6 14:58 b.REALM.cache
-rw------- 1 username username 1665 Aug 31 12:22 c.REALM.cache
-rw------- 1 username username    4 Aug 31 15:50 primary

Kerberos environment variable:

$ echo $KRB5CCNAME
DIR:/home/username/mycache

By using klist -l:

Principal name                 Cache name
--------------                 ----------

But when changing to a specific cache it lists correctly:

$ echo $KRB5CCNAME
FILE:/home/username/mycache/c.REALM.cache
$ klist -l
Principal name                 Cache name
--------------                 ----------
[email protected]           FILE:/home/username/mycache/c.REALM.cache (Expired)

I'm expecting that the cache collection lists each principal inside the collection. How can I do that?

1

There are 1 best solutions below

0
On

So the issue is with how the kerberos is initialized inside of the collection. At the time of logging in it should use the option '-c':

$ kinit -kt file.keytab -c DIR::/home/username/mycache/tkt_c.REALM.cache

Afterwards by using klist -l or klist -A you can view the cached tickets:

$ klist -l
Principal name                 Cache name
--------------                 ----------
[email protected]           DIR::/home/username/mycache/tkt_c.REALM.cache