Manual authentication is not working

Manual authentication is not working

by Abu Ali -
Number of replies: 6

dear moodle team

we are using moodle 3.9 and i have integrated the Moodle with the team using the O365. we have connected this pluggin with Azure directory. before we used to enroll the students throguh CSV file but right now we are not able to enroll the students throught CSV.  we used to write the 

username, password, first name, lastname, email, course1

123, 123! , abc, xyz , abc@office.com,M1

like that

but now it required username in terms of email. by using the email i have enrolled the students in different courses through csv. OpenID Connect is working fine for the students but login and password boxes are not working to login.

anyone tell me what i will do to work both, Oidc & manual authentication?


Average of ratings: -
In reply to Abu Ali

Re: Manual authentication is not working

by Susmitha Nori -
HI

I have similar issue where I am unable to login as Manual admin user that I have setup during Moodle installation and now only Office 365 users are allowed login but none of the Office 365 users are admin and atleast one user do not have access to Site Administration in Moodle.

Any suggestions on how can i can the login method so that both manual and OpenID login methods work ?

Thank you on advance
In reply to Susmitha Nori

Re: Manual authentication is not working

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers
Assuming that you remember the admin's password, load such a URL into the browser:
[your_moodle_address]/login/index.php?username=admin

On the login page you will also be able to change that login to anything else, and use that account's password.

Manual authentication cannot be blocked in Moodle, and you should always be able to use the above method to log into a manual account.
In reply to Przemek Kaszubski

Re: Manual authentication is not working

by Susmitha Nori -

HI

Thank you so much for responding. I do know the admin password definitely. 

But I get redirected to the below link automatically when I change the URL to as suggested above.

https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&;.....

I am avoiding to copy complete URL for security reasons but I get automatically redirected to authenticate with Office365 account. Any php files need to changed or updated for this redirection ?

Thank you for helping out. 


In reply to Susmitha Nori

Re: Manual authentication is not working

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers
Tough one.

The only thing I can think of is direct database access to your Moodle and making sure that you don't have alternateloginurl specified.

I don't have a running 365 authentication Moodle instance to inspect any deeper, sorry.
In reply to Przemek Kaszubski

Re: Manual authentication is not working

by Susmitha Nori -

HI Przemek

Thank so much for help you are providing. I do not see any alternateloginurl in my DB tables 

Instead can you please suggest me if there is a way to make any user full admin for Moodle site from backend like DB or config files etc. IF i can make atleast one o365 user as full admin from backend that can help me presume. 

Thanks again


In reply to Susmitha Nori

Re: Manual authentication is not working

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers
Take my reply with CAUTION.
Maybe you'll want to ask this question on the general Moodle Help forum, or failing that in the "General developer forum" - you'll find links on https://moodle.org/course/view.php?id=5 . Or search site:moodle.org your_query_here on google.

Here's what I found, although I have NOT tested, I have just observed the DB settings as they changed after I added another admin from the admin GUI:

If you have DB access, then in table mdl_config there is a field "siteadmins". Here, using a comma as delimiter (without any spacing), you can add the user id for another admin. Do not delete the first value (most likely "2") - this is the id of the main administrator set when Moodle was first installed. Cf. my PHPMyAdmin screenshot (in Polish).

You need to know that user id that you want to add - these you should be able to review in the mdl_user table. Or else choose the id of the user you can log in as - that corresponds to a working o365 account / authentication, and use that. Or else maybe the table mdl_auth_oauth2_linked_login will help.

Again. I have NOT tested this procedure... I don't think you can break anything this way, but I want to be honest.

HTH.

Przemek
Attachment 2020-11-11 , 14_29_06 - pktest.amu.edu.pl _ localhost _ moodle _ mdl_config _ phpMyAdmin 5.0.2 - Mozilla Firefox.png
Average of ratings: Useful (1)