Moodle 3.2.2 Authentication external DB via Oracle

Moodle 3.2.2 Authentication external DB via Oracle

by Olivia Nazeka -
Number of replies: 8

Dear community,

I was trying to set up the external authentication, here are my settings(db_enabled.png), and I tested it and all normal(test_enabled.png), test proceed normally, but when I try to login with the account from the external database, I have this error(result_error.png).

My question is, this error is about the database, but the database test is normal, could you please help me?

Moodle: 3.2.2+ (Build: 20170324)

Moodle database: Postgresql 9.6.5

The external database that I wanna connect: Oracle

Php:5.6.32

Ubuntu 16.

Thank you in advance!

===============================================images==================================================

db_enabled.pngdb_enabled_settings


test_enabled.png

test_enabled

result_error.png

result_error


Average of ratings: -
In reply to Olivia Nazeka

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Moodle Admin -

Hi, maybe it's because of the salt? have you tried that? adding salts?

In reply to Moodle Admin

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Olivia Nazeka -

hi Talgat,

Thank you for the reply,  yes I have tried to add salt, although I'm not very good at coding,  here is my code(image), I have only changed this and then deleted it, now the auth.php is in default.  But the database error is same, there were no changes by adding that line to the code.


image:

salt

In reply to Olivia Nazeka

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Olivia Nazeka -

Want to share some progress, I have changed the settings like this, 

settings_for_external_db

added apostrophe  in username and password field,  no the database error is gone, but still can't log in with the external database credentials,  the database is md5 hash,  in old system(Moodle 2.9),  I have compared the code, noticed that there is some custom code in auth.php, some code working with salted formats.  Please help me if you have some experience with salted passwords.  Thanks.

In reply to Olivia Nazeka

Re: Moodle 3.2.2 Authentication external DB via Oracle

by bell mars -

In my case , i didn't edit any file for external DB authentication process , every thing is ok ,i could login with all users, except usernames with '/' symbol , i couldn't login in with that after syncing all users (using  Scheduled Tasks) , sorry i have no idea about (salt) i wish someone can help ..

In reply to bell mars

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Olivia Nazeka -

Hi, 

Thank you for the reply and sharing your experience. I set up the external database but nothing happened, now still working with the auth.php.

In reply to Olivia Nazeka

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Luis de Vasconcelos -

Does anybody still use oci8 for Oracle? surprise

You shouldn't need those quotes in the username and password fields. The problem is something else.

Have you tried changing the Password format  from Plain text to something else?

In reply to Luis de Vasconcelos

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Olivia Nazeka -
Hi, Thank you for the reply.

I have removed those quotes, and it should be password format issues because, in my external database, it was MD5 + salt, so I should modify the auth.php and need some custom code for adding the salt.  still working with those PHP codes.

In reply to Olivia Nazeka

Re: Moodle 3.2.2 Authentication external DB via Oracle

by Sam Suresh -
Picture of Plugin developers
Hi Olivia! Did you solve this? I'm facing same problem now. Love to see some hints. 


Thank you.