in reply to authenticate via cgi-bin

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

Replies are listed 'Best First'.
Re: Re: authenticate via cgi-bin
by submersible_toaster (Chaplain) on Jan 09, 2003 at 23:17 UTC

    Brilliant - simple solution. ++ mce , --submersible_toaster and his high horse (read above), for which I can only apologise for , and attribute to ..erm ... gross somethingorother... but definatly gross


    I can't believe it's not psellchecked