Manual Login got disabled

Manual Login got disabled

by Ashish Rauthan -
Number of replies: 4

Hello,

Our admin access was through manual login option,  which is not appearing now,  seems it got disabled.

We have enabled OIDC/OpenID Connect login.    We do not have any admin access now,  and can only access as student.

Main admin also doesn't have site admin rights.

Please suggest how can we enable manual login option,  preferably through config files.  Didn't found any option in root folder config.php.

Ver. : Moodle 3.11dev+ (Build: 20210416),   Windows, Myql

Thanks in Advance!

Ashish

Average of ratings: -
In reply to Ashish Rauthan

Re: Manual Login got disabled

by Ken Task -
Picture of Particularly helpful Moodlers

'Moodle 3.11dev+ (Build: 20210416)' is a development version of 3.11 and thus is probably prone to errors.   So first suggestion is to acquire a 3.11 supported/non-dev version of the code and upgrade site.

While 'manual' authentication should never be removed or disabled, at least 2 accounts should always be set to manual ... user ID 2 - the initial installer - should always be left for manual.

You could query your moodle db mdl_user table for ID 2 to see if that has changed.

Also, to assure that auth is available to your site, you could add a line to config.php like:

$CFG->auth='manual';

That would restrict all logins to manual.

'SoS', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Manual Login got disabled

by Ashish Rauthan -
Thanks alot Ken! for your prompt response.
Got enabled manual login & created more site admin.

1.However, with this able to enable either one auth type (manual or OIDC), how can we enable both.
2. How can I access moodle db, as I am new to the technology. What all needs to be installed to access it, What is the access to login in db.
Which db it is using - directory strcuture shows mysql however siteadmin shows :- mariadb (5.5.5-10.4.8-MariaDB)
version 10.2.29 is required and you are running 10.4.8

Thanks Again!
In reply to Ashish Rauthan

Re: Manual Login got disabled

by Ken Task -
Picture of Particularly helpful Moodlers

Wow!  Basically you are asking how to admin both Moodle and the server OS and the DB server.

So, what we are doing via config.php file locks authentications to those given on that line.   Don't run a OIDC myself so don't know how Moodle would tag that auth method.   But you can find out:

First - MariaDB (yours is old) is a 'drop in' replacement for MySQL.  So the commands and access to the DB server are actually using 'mysql' commands.

To find the DB info (where hosted, login, password to use - ie, credentials) for the DB server look at your config.php file.

Using those credentials and the mysqlclient on your server:

[] you fill in .. [ENTER] means you press ENTER key on your keyboard.

mysql -u [login] -p[password] [ENTER]

When you see the mysql> prompt type: show databases; [ENTER] ... include the ';' at the end of that command and all commands issued while in the client environment.

The above command should verify the DB name seen in config.php is also seen in the client .... for example, name is 'moodle'.

From mysql prompt: use moodle; [ENTER]

To find out the tag for OIDC and see all users auth method from the mysql prompt, this query:

select id,auth,firstname,lastname from mdl_users;

That query could take some time to respond but you should see the tag for OIDC.

If you did:

select id,auth,firstname,lastname from mdl_users where auth like 'manual';

you should see ID 1, guest, ID 2, initial admin, and whatever additional account you created.

In config.php, add the tag for OIDC.

Now that locks in those auth and as long as that line is in config.php those are the only auth you can use.

That should get you by the issues at present (barring any other that you've not discovered yet) ... reason I say that, think you have an old moodle which is probably in need of upgrade + upgrade to MariaDB + PHP.

You might want to continue to use the environment check to plan your upgrade.

Also see:

http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases

Search for any Moodle docs on upgrading.  You might not be able to go from your current version to highest version in one step.

Also read/study up on any links you find in/on:

https://docs.moodle.org/311/en/MySQL

Your adventure begins!

Also note: won't be supplying commands to issue all the time ... it's time for you to learn! smile

'SoS', Ken