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