Nfs – manually expire a kerberos ticket for a session

kerberosnfs

I am using NFS service over kerberos. The client mounting the NFS share obtains the ticket from kdc server and works perfect in terms of accessing the NFS share.
My requirement is that I need to expire the ticket in between accessing the NFS share to see how application behaves in that case, I tried 2 ways, first to issue a renewable ticket lets say for 10 min lifetime and then re-request to renew the same ticket with a shorter lifetime say 5 sec and secondly doing the same with a non renewable ticket. In both the cases the access to NFS does not stop until the initial ticket of 10 min gets expired even though the ticket in cache shows expired.But I expected the access to be denied after renewal request of 5 sec lifetime.

Best Answer

To manually expire a kerberos ticket for a session, we just need to run

kdestroy 
Related Topic