Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check all Kerberos keytabs in the current directory
#!/bin/bash
# Check all keytabs in the current directory
for kt in *.keytab
do
pr=$(klist -k $kt | tail -1 | awk '{print $2}')
echo -n "${kt}: "
kinit -kt $kt $pr > /dev/null 2>&1 && echo OK || echo FAILED
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment