Tuesday 22 September 2015

Koralling Kerberos Keytabs

So, on my Mac using OS X 10.10, I can happily use the ktutil command to view a Kerberos key tab: -

ktutil -k bpm855.keytab list

bpm855.keytab:

Vno  Type              Principal                  Aliases
  3  arcfour-hmac-md5  HTTP/bpm855.uk.ibm.com@UK  

but, on Red Hat Linux, this doesn't seem to work quite as well - I need to use several commands: -

ktutil 
ktutil:  rkt bpm855.keytab
ktutil:  list
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    3                HTTP/bpm855.uk.ibm.com@UK
ktutil:
  quit

Thankfully, the internet came to the rescue: -


Create a shell macro: -

rkt() { echo -e "read_kt $1\nlist\nquit" | ktutil | grep -v "^ktutil:";}

Read the key tab: -

rkt bpm855.keytab 

ktutil:  read_kt bpm855.keytab
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    3                HTTP/bpm855.uk.ibm.com@UK

which is nice.

Thanks Internet, I owe you :-)

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...