logo       

Authen::Krb5 Help: msg#00047

Subject: Authen::Krb5 Help
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();

if (Authen::Krb5::get_in_tkt_with_password($clientp,$serverp, $PASSWORD,$cc)) {
        print "Success!!!\n";
        my $sasl=new Authen::SASL(mechanism=> "GSSAPI SASL");
        my $pop=Net::POP3->new($SERVER)
                or die "Unable to connect to mail server: ",$!,"\n";
        if ($pop->auth($sasl) > 0) {
                my $messages=$pop->list()
                        or die "Unable to get messages: ",$!,"\n";
        }
        else {
                print "Authentication failed: ",$!,"\n";
        }
}
else {
        print "Unable to get Kerberos ticket: ",Authen::Krb5::error(),"\n";
}

Authen::Krb5::free_context();


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.





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe