Reason id '3'?

Reason id '3'?

by Zachary Blazier -
Number of replies: 8

I am trying to track down a reason id.  I can't find anything on this or where I might find more information.  I have been searching these forums and others for a couple hours and have had no luck.  Here is the error I am getting in  Site Administration > Reports > Logs "site logs, site errors, today, All actions, Other, standard log"  



1:16 PM,Jul 14XXXX-SystemSystemUser login failedLogin failed for the username 'XXXX' for the reason with id '3'.web10.0.0.0


Possibly relevant info:
There is nothing in the apache logs.
Ubuntu 12.04 server
Moodle 2.7


Any help would be appreciated.
Average of ratings: -
In reply to Zachary Blazier

Re: Reason id '3'?

by Guillermo Madero -

Hello Zachary,

While the message is cryptic, reason with "id = 3" just means that someone tried to log in with a valid username but with a wrong password. "id = 1" would mean that someone tried to log in with an invalid username.

Average of ratings: Useful (5)
In reply to Guillermo Madero

Re: Reason id '3'?

by Zachary Blazier -

Thank you so much!  This makes perfect sense based on other troubleshooting.  Is there someplace that the id's are documented?  


In reply to Guillermo Madero

Re: Reason id '3'?

by Federica Marra -

Hi Guillermo, thanks for your answer.
Do you know what does it mean "for reason with id=2"? where can I find a brief guide with this error messages? I looked in the documentation and I couldn't find it.

Thanks!

In reply to Zachary Blazier

Re: Reason id '3'?

by Hartmut Scherer -

Hi Zachary,

Thanks for posting this login failure. At our site,id'3' is an admin account. Several students reported a login failure. When I go to Site administration -> Reports -> Logs, this is what I see:

a) After the user viewed a message from id'3', the login fails many times, but not always.

b) The log file reports "cli" as origin, not the web. (I don't know what cli stands for)

c) The reason for the login failure is always id'3', not any other id.

Here are the screenshots:

Mary Jane login failed











Below is another user, also with a login failure:

Nainoth login failure





Now the next one (Mayson) doesn't fit the pattern. He has not viewed a message with id'3' nor did he switch from "cli" to "web" in the right column.

Mayson failed login











And here is another one where I cannot see a pattern.

Nailynn login failed







Does anybody know why an admin account can cause so many login failures? Most of the computer are in our library, but not all.

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Reason id '3'?

by Narissa Tuawhiorangi -
Picture of Core developers

CLI stands for Command Line Interface.  Are you running a script to sync users?

Does anyone know where to find the list of error codes?

In reply to Narissa Tuawhiorangi

Re: Reason id '3'?

by Hartmut Scherer -

Thanks for your reply, Narissa. There may be a script running in the background, but I haven't installed a script to synchronize users. I didn't even know that such a script is available. 

With kind regards,

Hartmut

In reply to Zachary Blazier

Re: Reason id '3'?

by Shannon Harris -
/** Login attempt successful. */
define('AUTH_LOGIN_OK', 0);
/** Can not login because user does not exist. */
define('AUTH_LOGIN_NOUSER', 1);
/** Can not login because user is suspended. */
define('AUTH_LOGIN_SUSPENDED', 2);
/** Can not login, most probably password did not match. */
define('AUTH_LOGIN_FAILED', 3);
/** Can not login because user is locked out. */
define('AUTH_LOGIN_LOCKOUT', 4);
/** Can not login becauser user is not authorised. */
define('AUTH_LOGIN_UNAUTHORISED', 5);
Average of ratings: Useful (7)
In reply to Shannon Harris

Re: Reason id '3'?

by lital l -

Hi,

How can I define new login error

something like this define('AUTH_LOGIN_NEW_ERROR', 6); ?

Thanks