i did this (authenticate via Kerberos using CGI) not too long ago. i couldn't find a Module that easily did exactly what i wanted. the closest was Authen::Krb5::Easy, but it used the /etc/krb5.keytab file instead of passwords to get a principal. so i hacked it to do what i wanted... just a change from calling krb5_get_init_creds_keytab to krb5_get_init_creds_password in the Easy.xs file and tweaking the arglist and documentation.

WARNING: since i only used this module in one application (with it's own private /lib/perl) i didn't get around to renaming it to something like Authen::Krb5::Easy::Password or the like. should you use it, be warned... i wouldn't put it where another Perl user could use it thinking it was the real Authen::Krb5::Easy module...

# simple useage use Authen::Krb5::Easy; my ($user, $password) = @ARGV; if ( Authen::Krb5::Easy::kinit( $user, $password ) ) { print "Authentication success!$/"; } else { print "Authentication failure!$/"; }

you can try it if you like ... Authen-Krb5-Easy-0.90-hacked.tgz


In reply to Re: Re: •Re: Accessing Authenticated User's Password From CGI by zengargoyle
in thread Accessing Authenticated User's Password From CGI by enoch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.