[OpenAFS] AFS version of sudo for admin ?

Anders Magnusson ragge@ltu.se
Fri, 17 Dec 2010 15:59:31 +0100


John Tang Boyland wrote:
> Does anyone know of a "sudo" like command for AFS admin commands?
> 	admindo vos release pkg.foo
> It would be nice, but not essential to have the token stick around
> for 5 minutes in case you need to do another admindo soon afterwards.
>   
Make a simple script (heimdal):

#!/bin/sh
kinit $USER/admin $*

If you want the ccache to stay around for a while then do something more 
clever like:

#!/bin/sh
export KRB5CCNAME=/tmp/aksu.$USER
if klist -t ; then
    /usr/bin/pagsh -c "aklog; $*"
else
    kinit -l 300 $USER/admin $*
fi

-- Ragge