RE: NetReg: Authentication failed error

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Dieudonne, Jose (dieudonj@arcadia.edu)
Date: Wed Feb 04 2004 - 10:03:17 CST


Charles,
I saw that you modified the register.cgi script. Have you made any
changes in the variables.pl?

Jose

-----Original Message-----
From: Charles Scheidecker [mailto:charles.scheidecker@wartburg.edu]
Sent: Wednesday, February 04, 2004 10:14 AM
To: netreg@southwestern.edu
Subject: Re: NetReg: Authentication failed error

Robert Lowe wrote:

>
>
> Baron M Rawlins wrote:
>
>> I'm ashamed to say it, but we never looked into changing the IMAP
>> auth code, maybe we'll get around to that over spring break?
>> Instead, our helpdesk staff simply sends a test email to student, and

>> then they register okay.
>
>
> Well, perhaps Bruce can verify for us. :-) I did find documentation
> for Net::IMAP::Simple, but it's rather sparse. I didn't ever plan on
> using this auth method, and since I didn't write it, I never tested
it.
> It would be nice to clean up the code though...
>
> -Robert
>
>> ----- Original Message -----
>> From: Robert Lowe <mailto:Robert.H.Lowe@lawrence.edu>
>> To: netreg@southwestern.edu <mailto:netreg@southwestern.edu>
>> Sent: Friday, January 23, 2004 10:29 AM
>> Subject: Re: NetReg: Authentication failed error
>>
>>
>>
>> Baron M Rawlins wrote:
>>
>> > I had the same problem here a while ago (Netreg 1.3rc2 / IMAP
>> auth) > Turned out that the authentication function returned the

>> number of
>> > messages in the users Inbox.
>> > The students authenticated successfully, but had zero
messages.
>> Thus the
>> > 'authentication failed' message when allive==0 or !alive,
>> depending on
>> > your code.
>>
>> So, how did you resolve this? I assume alive returns a negative
>> value
>> when authentication fails? If so, then the code should mimick
>> what is
>> there for POP authentication.
>>
>> -Robert
>>
>>
>>
**********************************************************************
>> To unsubscribe from this list, send an e-mail message to
>> majordomo@southwestern.edu <mailto:majordomo@southwestern.edu>
>> containing a single line with the words:
>> unsubscribe netreg
>> Send requests for assistance to: owner-netreg@southwestern.edu
>> <mailto:owner-netreg@southwestern.edu>
>>
>>
**********************************************************************
>
>
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg
> Send requests for assistance to: owner-netreg@southwestern.edu
> **********************************************************************

I got this to work by changing the following lines:

    elsif ($AUTH_METHOD eq "IMAP") {
      $imap = new Net::IMAP::Simple( "$IMAPSERVER" );
      $alive = $imap->login( $FORM{'user'}, $FORM{'pass'} );
      $imap->quit();
      unless ($alive) {
        error("Authentication Failed");
      }
    }

to this:

    elsif ($AUTH_METHOD eq "IMAP") {
      $imap = new Net::IMAP::Simple( "$IMAPSERVER" );
      $alive = $imap->login( "$FORM{'user'}\@wartburg.edu",
$FORM{'pass'} );
      $alive = $imap->mailboxes();
      $imap->quit();
      unless ($alive) {
        error("Authentication Failed<P>Please check that you have
entered your Username and Password correctly.");
      }
    }

Getting a count of how many mailboxes are present is a much more
accurate way to determine if the connection was successful, because it
will always return at least 1 if it was a success - at least with the
IMAP system we're using, which is Imail from Ipswitch. Hope you all
find this helpful.

Charles

-- 
Charles Scheidecker
Network Specialist
Wartburg College ITS
(319)352-8519
charles.scheidecker@wartburg.edu

********************************************************************** To unsubscribe from this list, send an e-mail message to majordomo@southwestern.edu containing a single line with the words: unsubscribe netreg Send requests for assistance to: owner-netreg@southwestern.edu ********************************************************************** ********************************************************************** To unsubscribe from this list, send an e-mail message to majordomo@southwestern.edu containing a single line with the words: unsubscribe netreg Send requests for assistance to: owner-netreg@southwestern.edu **********************************************************************


New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:43 CDT