Hi,

First of all, it is not my idea to use system passwords. It is the one of the project mgr. And why not use system passwords???? One can ftp or telnet to the machine anyway, and it is to be used only in our intranet. Nobody can access this machine from the internet.

This said, I came up with this solution, it changes the verify subroutine in Merlyn WT 61 (see link in my original post).

sub verify { my $username=shift || die "missing argument"; my $passwd=shift || die "missing argument"; require Net::FTP; my $t = new Net::FTP("localhost"); my $rc=0; if ( $t->login($username, $passwd) ) { $rc=1; } $t->quit(); return $rc; }
This is not an elegant technique, but it works quite performant.

Net::FTP is faster than Net::Telnet so I prefer this one. And since the machine is also an ftp server there is no harm.


---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium


In reply to Re: authenticate via cgi-bin by mce
in thread authenticate via cgi-bin by mce

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.