"passwords cannot be reset on this site" unexpected change

"passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Number of replies: 19

Hi,

We've been using Moodle happily for a while and just come across my first issue where I'd appreciate calling on the lovely community for troubleshooting support!

Our students are our external freelancers and this week reported that the password reset feature was no longer working, as the reset email says: "Hi [name], Someone (probably you) has requested a new password for your account on '[site]Unfortunately passwords cannot be reset on this site. Please email your contact at [site] if you need further assistance." It's the same for my test user now sad

I've searched the forums etc and checked:

  • Site Admin > Plugins > Authentication > Manage Authentication. The only Available Authentication Plugins are Manual Accounts (used for all our accounts) and No login (unused).
  • Site Admin > Plugins > Authentication > Manage Authentication. The Common Settings > Forgotten password URL is blank.
  • Site Admin > Users > Define Roles > all roles except Guest have “moodle/user:changeownpassword” set to Allow. (Setting Guest to Allow as well made no difference – no harm in testing.)

I’m at a loss for what the issue is or what to check next. Any ideas please?

We’ve not knowingly run any updates/upgrades. The only change recently made was to test out guest access in one test course (thus also doing: Site admin > Plugins > Authentication > Manage Authentication, changed "Guest login button" to "Show"; changed back to Hide after testing. And Site admin > Plugins > Enrolments > Manage enrol plugins > enabled Guest access (eye open); changed back to disabled after). Strangely but possibly coincidentally, after that we noticed certain course content was invisible to people; it transpired that View page content, View folder content, View resource, View choice activity had changed from "Allow" to "Not Set" for most roles and needed changing back. I was therefore expecting the password reset to be a roles issue but I can’t spot it!

Thanks in advance!

Georgina

Average of ratings: -
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Just some further testing:
- when I go to my test user > Preferences > This user's role assignments, they definitely have a Student role in 14 courses (and Student role has “moodle/user:changeownpassword” set to Allow).
- Site Admin > Users > Check system permissions, for the test user, shows they still don't have changeownpassword set to Allow. (But we don't assign roles system-wide for students, only per-course, so I'm not sure if this is relevant. We've never assigned student roles system-wide so I'm still unclear why the password change permission has been lost.)
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
And what about the authenticated user - do they have changeownpassword set to Allow?
In reply to Mary Cooch

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Hi, thank you for helping smile
Yes, they do - all roles have changeownpassword set to Allow except Guest. I've just triple checked Student, Authenticated user, and Authenticated user on frontpage roles; changeownpassword definitely says Allow.
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Have you tried setting it back to not set and saving. Then test and if still no luck, try setting it back again to allow?
In reply to Emma Richardson

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Thanks Emma! I hadn't actually tried that, so...
1. I set student/user/frontpage roles to have changeownpassword set to Not Set and saved each. I tested and got the same "passwords cannot be reset on this site" email.
2. I set all three back to Allow and saved. I tested and still got the same "passwords cannot be reset on this site" email.

I'm still stumped - was hoping for inspiration striking over the weekend! We upgraded recently and our Server > Environment shows 3.11.2+ (Build 20210805) but there are a few minor releases since then, so I wonder if we can fit in another upgrade and see if that triggers resetting anything...
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Check that there is not a strange space in the password change url setting.
I am grasping at this point...how about as an admin - can you reset your password?
In reply to Emma Richardson

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
No strange space in the forgotten password URL sad
Good question re admins too! I shouldn't have been too nervous to do that. I used the forgotten password link for my admin username and the email was as expected:
...
A password reset was requested for your account '[username]' at [site] Moodle.
To confirm this request, and set a new password for your account, please go to the following web address: [link] (This link is valid for 30 minutes from the time this reset was first requested.)
If this password reset was not requested by you, no action is needed.
...
And the reset process worked fine. But I do have a system-assigned role.

This inspired more testing:
1. site administrators can reset their password
2. users that have Student role assigned via courses cannot (eg my test user)
3. users assigned a User Creator role (changeownpassword=Allow) system-wide (using Permissions > Assign System Roles) *can* reset their password
(I gave my test user this role - it is to let some colleagues create user accounts for our freelancers - and they could reset their password; after removing the User Creator role the test user couldn't reset their password).
4. users assigned the Manager role (changeownpassword=Allow) system-wide *can* reset their password
(I gave my test user this role using Permissions > Assign System Roles and they could reset their password; after removing the role again the test user couldn't reset their password).
5. users assigned the Manager role in a single course *cannot* reset their password
(I gave my test user this role from a course they were previously just a student on, and the reset password email told them passwords can't be reset on the site)

So that seems to narrow it down to a problem with course-assigned roles not passing on the permissions. Perhaps I can create a Can Change Password role and assign it to all users at the system level for an immediate fix. But I'm still obviously curious and keen to understand what's gone on here, as there could be other ramifications...
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
So, now the question is - is this on every course or could it be that the role has been overridden just on one course? Check your other permissions - update profile for example?
In reply to Emma Richardson

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Well, if I use Site Admin > Permissions > Check System Permissions, the test user has no permissions at all.

The 'student' role does have editownprofile: Allow as well. Logged in as my test user, I do *not* see the "Edit profile" link that I am used to seeing when logged in as my site administrator user. So this permission is not applied either.

As the test user, I can see/access all 14 courses I'm enrolled on (via cohort enrolment, no recent changes), and I have just completed a quiz there. 'Student' profile has 'Attempt quizzes' set to Allow. So that permission is working too.

It is odd given that the previous week the test user could see all their courses and some activities/resources, but couldn't see any *pages*. After changing the 'student' role to change 'view page content' from Not Set to Allow, they could then see pages. I don't know how it changed originally, but this permission does now work.

So, is it just a subset of permissions that are not working - just user-related ones? We don't have any other user: ones set to Allow to test, though.

Does this help at all? Thanks for your continued ideas!
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Well, if I use Site Admin > Permissions > Check System Permissions, the test user has no permissions at all.

Well that is a definite issue. It is as though your students are actually losing the authenticated user role or the authenticated user is no longer a system role maybe? When I look at a student on my site, they have all kinds of system permissions including reset own password...
I would take a look at the authenticated user role - perhaps it is no longer applied at the system level?
In reply to Emma Richardson

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Oh, go to Users/Permissions/User Policies and check that Authenticated User is still showing as the default role for all users...
In reply to Emma Richardson

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Aha! No, there's nothing there and I can't set anything (I think I had scanned this page when browsing for inspiration but the lack of options made me pass it by):

So this dropdown should say Authenticated user? The note there does suggest that, too. It sounds like this is our problem - great news, I like to have it identified, we're a step closer to the solution! Thank you!

Now to figure out how we can edit this... I checked the Authenticated user role:

And tried ticking all the Context Types and saving, but after that, it still wasn't listed as an option in the 'default role for all users' dropdown. Worth a shot but need to figure this out properly. Hmm...
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Georgina Parsons -
Okay with this information, I could do more searching of the forums and the trick was to tick the System context type as suspected, *but also* change the Role Archetype to 'None'. Only then did Authenticated User appear as an option in the 'default role for all users' dropdown.

Now I've set it in the default role, the test user has been able to reset their password!

I will now try to find out if a real student user can reset their password themselves for peace of mind, and also carefully check the Authenticated User role to ensure it's right here.

But on the whole I think this might be fixed! Thanks so much Emma for helping me navigate this one, really appreciated smile
Average of ratings: Useful (1)
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
You are welcome - this one really had me puzzled...it was a fun adventure of discovery..lol!
In reply to Georgina Parsons

Re: "passwords cannot be reset on this site" unexpected change

by Charles McCoy -
Georgina I have a question for you we lost the Admin Pass and we know the user name and email address, but once we place it in we received this message.

There is no record of that reset request. Please initiate a new password reset request.

Can you advise on what we would need to do to reset this password?

Thank you,
Charles
In reply to Charles McCoy

Re: "passwords cannot be reset on this site" unexpected change

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon intrusion ...

@Charles ... one can reset the original admin password ... really any manual account ... via command line.

From command line, in moodlecode/admin/cli/ there is a 'reset_password.php' script.   Must provide, when prompted, the account login (like 'admin').   That checks to see if that account is using manual auth.   If found to be manual, you will be prompted for password which must follow the password set up for the site ... like required number of CAPS, or numbers, etc.

'SoS', Ken

In reply to Ken Task

Re: "passwords cannot be reset on this site" unexpected change

by Charles McCoy -

Ken 


Thank you for your response,  I'm sorry but I'm not sure what what you're referring to here. I found the 'reset_password.php' script you were referring to, but not sure what to do after that. Can you please advise. The message I sent out was asking why I received this message as I never come across this when resetting a password.  

Thank you, 

Charles

moodle error


In reply to Charles McCoy

Re: "passwords cannot be reset on this site" unexpected change

by Ken Task -
Picture of Particularly helpful Moodlers

@Charles ... maybe et. al. (manual authentications)

In:

https://moodle.org/mod/forum/discuss.php?d=429662#p1730968

You asked ...

"Can you advise on what we would need to do to reset this password?"

Realize 'you' referring to someone else ... that's why the 'pardon intrustion'.

If user account uses manual auth, you, as server admin who can access via ssh to run command line only scripts, can 'reset' manual auth users passwords.

Also realize that all in this thread are looking at GUI only and no one had mentioned that manual auth account passwords can be reset via command line.

'SoS', Ken

In reply to Mary Cooch

Re: "passwords cannot be reset on this site" unexpected change

by Charles McCoy -
Mary I have a question for you we lost the Admin Pass and we know the user name and email address, but once we place it in we received this message.

"There is no record of that reset request. Please initiate a new password reset request."

Can you advise on what we would need to do to reset this password?

Thank you,
Charles