Tuesday, October 2, 2012

leave kerberos AFS tokens behind for root

To access the AFS home directory on a VM where we login as root and have no AFS tokens, we have to export the AFS tokens for the user whose directories we want to access. e.g. if test-user wants to access his AFS home as root from a VM, I must:

  1. Get kerberos tickets for my username
  2. Forward my tickets to the VM by logging in
  3. Note the tickets cache filename
  4. Logout of the VM
  5. Get non forwardable root tickets 
  6. Login to the VM as root
  7. Export the tickets cache "export KRB5CCNAME=/tmp/filename" from 3
  8. Get new AFS tokens with afslog
  9. Now the access to the AFS cell of test-user should be enabled

This also shows that your kerberos tickets can be misused if they are not destroyed before exit.