Using Perl to clear policy
Digant C Kasundra
digant at uta.edu
Fri Dec 17 10:06:59 EST 2004
I figured it out with the help of the author of Authen::Krb5::Admin.
policy_clear() doesnt' return a value so the or die
statement was killing it. Removing that statement fixed it.
On Thu, 2004-12-16 at 13:13, Digant C Kasundra wrote:
> 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("");
>
> ________________________________________________
> Kerberos mailing list Kerberos at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
More information about the Kerberos
mailing list