Using Perl to clear policy

Digant C Kasundra digant at uta.edu
Thu Dec 16 14:13:45 EST 2004


Does anyone have a code snippet on how to use Perl to clear someone's
policy?  I'm using Authen::Krb5::Admin and I'm trying the following to
no avail:

my $krb5_princ = Authen::Krb5::parse_name( $principal )
        or 
        dienice( $eventid, $ERROR_TAG, 
        	"kadmin_reset_password: (parse_name)" . Authen::Krb5::error );

my $kadm5_princ = $kadm5->get_principal( $krb5_princ )
        or
        dienice( $eventid, $ERROR_TAG, 
        	"kadmin_reset_password: (get_princ)" . Authen::Krb5::error );

$kadm5_princ->policy_clear()
        or dienice( $eventid, $ERROR_TAG, 
        	"kadmin_reset_password: (policy none)"
            . Authen::Krb5::Admin::error );

$kadm5->modify_principal($kadm5_princ)
        or dienice( $eventid, $ERROR_TAG, 
        	"kadmin_reset_password: (modify_principal)"
            . Authen::Krb5::Admin::error );

I also tried $kadm5_princ->policy_clear, and  $kadm5_princ->policy("");



More information about the Kerberos mailing list