External authtentication disabled but still querying database server

External authtentication disabled but still querying database server

by Nicolas Mathon -
Number of replies: 9

Hi!

In the past, we used external authentication with manual authentication. We switched to manual only. Yesterday, the SQL Server account has been disabled and I'm getting a SQL Server Authentication failed message in the event log of the server coming from the Moodle web server IP.

The external auth is disabled in Moodle and I blanked the parameters for database server, username and password. I'm still getting the error in the event log each time a user log in Moodle. So I assume that the system is still checking for the external DB...

 

We are using Moodle 2.2 on Windows (Apache) with a SQL Server database.

 

Thank you for your help,

Nicolas

Average of ratings: -
In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Richard Still -
can't back this up with code but I have been working on suspending user accounts created by an external db today and it looks like when the AUTH method for the user is 'db' moodle will check the external database for their record each login (I assume to do any updates required in the external db plugin setup) try checking mdl_users table for users where AUTH = 'db' you probably need to change their auth type to something like 'manual' stop it firing requests to the external db
In reply to Richard Still

Re: External authtentication disabled but still querying database server

by Nicolas Mathon -

Hi! Well, the problem happens when I log with the admin account and it is auth manual in mdl_user table.

I have 22 CAS, 44689 manual and 37 db (not used).

Thank you for posting!

 

In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Nicolas Mathon -

By the way, the "DB" ares are weird...

Example:

email@domain.net.1337788431

What is this?

Thanks!

In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Richard Still -
with the external plugin that happens when the record gets set to deleted, the username gets replaced with "email.timedeleted" and I think the email gets replaced with the password o.O I expect that happened when you blanked out the external DB details if the plugin was automated previously and you haven't disabled it - could be that the errors are coming when it attempts to run? for example my webserver is running on a pair of linux nodes - I automated the auth and enrol plugins on one of the nodes using cron so if i login as root and do "# crontab -l" I can see a pair of cron lines where the scripts are being executed you might want to look for similar on yours or post the error to remove the guesswork smile
In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Lawrence N -

Is there a cron/scheduled task to run the external database sync? That may need to be turned off ...

In reply to Lawrence N

Re: External authtentication disabled but still querying database server

by Nicolas Mathon -

No Cron on the external DB...

 

The only cron is MoodleCron for Windows (service) that runs every 30 minutes.

In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Richard Still -
post the error
In reply to Richard Still

Re: External authtentication disabled but still querying database server

by Nicolas Mathon -

Well... There is no error!

Except from SQL Server, I get this warning each time a user log in:

DATE/TIME:    2013-06-06 10:07:39
DESCRIPTION:    Login failed for user 'MyUserName'. [CLIENT: IP_ADDRESS]

COMMENT:    (None)
JOB RUN:    (None)

DB Plugin is disabled and I changed the username in the parameters and still get the old username in the error.

In reply to Nicolas Mathon

Re: External authtentication disabled but still querying database server

by Nicolas Mathon -

Hi! I finally found the problem...

 

The DB call was triggered by: enrol_database plugin!

Thanks!

Nicolas