Created
January 7, 2020 12:36
-
-
Save alces/1e430a7099f79b965b973ee45688835c to your computer and use it in GitHub Desktop.
Check all Kerberos keytabs in the current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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