Locked myself out of moodle installation

Locked myself out of moodle installation

by Andrew Fovargue -
Number of replies: 3

Moodle 3.8

Ive been setting up a new moodle system for school and was going well until i logged out to try a different use and now i cant even access the site to log back in. No matter what i try to do all i get is: You don't have permission to view this list of courses.

I dont know what ive changed but how do i get back in to sort it out - i dont want to have to delete everything and start again.

Ive tried looking at the command line but dont understand how to get it set up in the first place (Moosh), im fairly happy with the idea that if it was set up i could run commands ok.

Ive tried editing a few of the files to see if it was a simple change of a value from 1 to 0 but nothing done makes any difference. Had a look in these files: index.php (in root moodle folder), appearance.php (in admin\settings), frontpage.php (in same location).

My site is at: https://spaldinghighschool.co.uk

Any help is greatly appreciated. Thanks

Average of ratings: -
In reply to Andrew Fovargue

Re: Locked myself out of moodle installation

by Ken Task -
Picture of Particularly helpful Moodlers

First, if you edited any core file, undo what you did.  Never edit any core file unless you really know what you are doing! smile

Second ... you mentioned moosh ... did you install site with Moosh? or issue any moosh commands?

Third ... try this ...
Using browser, go to https://site/report/configlog/
You should be forced to login ... login and the page will show what config changes you made ... and hopefully be able to navigate via browser to https://site/admin/ find area of change, and then change.

You might have spent time with theme ... related?

Edit config.php file and add this line:

$CFG->theme='classic';

To force site to use classic theme.

And check auth ... using ssh,

cd /path/to/moodlecode/admin/cli/

Then execute php cfg.php |grep auth [ENTER]

What does the 'auth' line show?

IF none of above works ... we'll try something else!!

'SoS', Ken


Average of ratings: Useful (1)
In reply to Andrew Fovargue

Re: Locked myself out of moodle installation

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
The site seems quite functional - loads just fine and even allows a log in as guest - when exactly are you getting stuck? Is it not taking your login?
In reply to Emma Richardson

Re: Locked myself out of moodle installation

by Andrew Fovargue -

Thanks - I got it sorted - tried a few of the previous suggestions but couldnt quite get it sorted. Ended up deleting it and restarting