Avoid unnecessary kinit calls.
Cleaning up example.
No-op when kerberos is off.