Is there a "batchable" way to do ktutil list

Ken Hornstein kenh at cmf.nrl.navy.mil
Wed Apr 21 06:38:43 EDT 2021


>Is there another command that is more script-friendly?  If not, can 
>someone share a good way to pass args to the MIT ktutil?

I think "klist -k" does what you want.  You can pass arguments to ktutil
in a script via stdin and parse the output (we do that via a script),
that looks something like:

	(echo "rkt $keytab" ; echo "list") | ktutil | [parse output]

The script this is from is so old, it predates the widespread use of the
'printf' command; that would probably be cleaner now.

--Ken


More information about the Kerberos mailing list