[38906] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Is there a "batchable" way to do ktutil list

daemon@ATHENA.MIT.EDU (Ken Hornstein)
Wed Apr 21 06:41:44 2021

Message-ID: <202104211035.13LAZlgU016017@hedwig.cmf.nrl.navy.mil>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
To: "Dan Mahoney (Gushi)" <danm@prime.gushi.org>
In-Reply-To: <fdbc2f7f-9311-a240-4b6a-4345c129d5c0@prime.gushi.org>
MIME-Version: 1.0
Date: Wed, 21 Apr 2021 06:38:43 -0400
Cc: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

>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
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post