[23073] in Kerberos
Re: Using Perl to clear policy
daemon@ATHENA.MIT.EDU (Digant C Kasundra)
Fri Dec 17 16:51:05 2004
From: Digant C Kasundra <digant@uta.edu>
To: Kerberos <kerberos@mit.edu>
In-Reply-To: <1103224425.10993.2.camel@localizer.uta.edu>
Content-Type: text/plain
Message-Id: <1103296019.16568.2.camel@localizer.uta.edu>
Mime-Version: 1.0
Date: Fri, 17 Dec 2004 09:06:59 -0600
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu
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@mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos