Thanks for the reply. I finally figured out what is happening but I don't know how to fix it. It seems that 'get_in_tkt_with_password' does not create a TGT first and without that it can't get a ticket. The question now becomes, what method in Authen::Krb5 obtains a TGT? It is not apparent from the POD (there is, 'build_principal_ext(p)' but that doesn't seem to work and the POD indicates it is legacy anyway) how to do that.

On May 22, 2006, at 1:48 PM, Sherm Pendley wrote:

On May 22, 2006, at 9:49 AM, Dennis Putnam wrote:

I hope this is the appropriate form for this as I am trying to write a script that obtains a Kerberos ticket for my pop server. I am getting a Kerberos error from 'get_in_tkt_with_password'. The error is "No credentials cache found." My kdc log only shows 'badlogin'. My script is below. Can someone spot the error or at least point me to a more appropriate form? Thanks.

#!/usr/bin/perl -w
#
# Script that reads mail from the POP server to attach it to a case in
# aimaudit via web services to the imaging system.

use strict;
use Net::POP3;
use Authen::Krb5;

my $USERNAME="myusername";
my $PASSWORD="mypassword";
my $SERVICE="pop";
my $SERVER="popserver.mydomain.com";

my $ac=Authen::Krb5::init_context();
defined $ac or die "Fatal: Unable to establish Kerberos context\n";

my $clientp=Authen::Krb5::parse_name($USERNAME);
my $serverp=Authen::Krb5::sname_to_principal($SERVER, $SERVICE,KRB5_NT_SRV_HST);
my $cc=Authen::Krb5::cc_default();

Have you tried creating a new credentials cache here, instead of using the default?

        my $cc = Authen::Krb5::Ccache::initialize($serverp);

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org




Dennis Putnam
Sr. IT Systems Administrator
AIM Systems, Inc.
11675 Rainwater Dr., Suite 200
Alpharetta, GA  30004
Phone: 678-240-4112
Main Phone: 678-297-0700
FAX: 678-297-2666 or 770-576-1000
The information contained in this e-mail and any attachments is strictly confidential. If you are not the intended recipient, any use, dissemination, distribution, or duplication of any part of this e-mail or any attachment is prohibited. If you are not the intended recipient, please notify the sender by return e-mail and delete all copies, including the attachments.


Reply via email to