[24698] in Kerberos

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

Perl question

daemon@ATHENA.MIT.EDU (Digant C Kasundra)
Thu Sep 22 12:42:13 2005

From: Digant C Kasundra <digant@uta.edu>
To: Kerberos <kerberos@mit.edu>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Thu, 22 Sep 2005 11:36:38 -0500
Message-Id: <1127406998.18435.5.camel@localizer.uta.edu>
Mime-Version: 1.0
Errors-To: kerberos-bounces@mit.edu

Hello folks,

I'm trying to find a way to authenticate a username and password pair
regardless of whether the password is expired or not.  When using
Authen::Krb5, if an accounts pw is expired, regardless of the password I
use to try to get a ticket, it will give me the error that the password
is expired.  How can I verify the username and password?

	my $kprinc = Authen::Krb5::parse_name( $uid );
	
	my $kservprinc = Authen::Krb5::sname_to_principal( 
						$KRB5_REALM, 
						'krbtgt', 
						'NT_SRV_HST'
					);
					
	my $kcc = Authen::Krb5::cc_default();
	
	$kcc->initialize( $kservprinc );
	
	my $kerror = Authen::Krb5::get_in_tkt_with_password( 
			$kprinc,
			$kservprinc,
			$pw,
			$kcc
		);
		
	#1 means successful authentication, undef otherwise.
	if ($kerror eq 1) {
		return $ACCEPT;
	} 
	else {
		my $errorcode = Authen::Krb5::error();
		write_to_log( $eventid, "Kerberos returned error $errorcode: "
			. Authen::Krb5::error( $errorcode ) );
	}
________________________________________________
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