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:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...