The administrator changed the password for the user

Hello everyone, If the user forgot the password, the mailbox can not be used, how to retrieve the account?

Hi @Dexter

If you have the username of the student then you can change the password for that student using LMS shell, using below command:
python manage.py lms changepassword <user_name>

2 Likes

@anjali Thank you, anjali. Since I am a teacher, not a developer, I will send it to the developer later.

Hi @Dexter,
If you have access to your Django administration panel ( http://your-domain.tld/admin ) then you can use its auth / users part to find a user object and change its password. however it would be a better idea to change the email address and ask him/her to reset his/her password from the login page.

Thank you, Mahyard, I can access to Django administration panel. But I can’t find a place to change my password.

No problem @Dexter,
User passwords are not displayed anywhere, but the password storage details are displayed. unfortunately your system is in a language I can’t understand but there should be a link to a password change form Included below those information which allows you to change user’s password. I’ve attached an image which shows you that link in an English system.

Thank you, mahyard. I can see a linked entry in your image.


But on my page, there is no link to the sentence below the password.

I cannot help you further. Just I can guess that you have not some related permissions.
BTW better to call your system administrator and ask him to do it for you.

Thank you, Mahyard. I’ll ask the system administrator.

Just as a note, the option to change the user password on the django admin panel was removed on Ironwood, so the only way to recover it is by running the command suggested above.

4 Likes

finally I found a solution for this,
if you want to enable your staff members to reset some body’s password from Django administration console,
add this line to your settings file, under the FEATURES block:

ENABLE_CHANGE_USER_PASSWORD_ADMIN: true,
4 Likes

Can you please explaining it a bit better?
I don’t really get where I should add the line.
In lms/studio.yml?

It depends on the release you have installed.
for Juniper and newer releases, YES.
locate FEATURES in your lms.yml and add it to the block.

FEATURES:
    ...
    ENABLE_CHANGE_USER_PASSWORD_ADMIN: true

then restart LMS and CMS services.

I manually reset a person’s password via the “./manage.py lms changepassword” command, but when I went to log in to their account with the temporary password, it still said they were locked out. What’s the way to override the lock out too? (I’m on Lilac FWIW)

Tambien se puede hacer con un plugin, se coloca un archivo con el nombre tutor-tutor_tutor_enable_change_user_password_admin.yml en el directorio /home/useredx/.local/share/tutor-plugins/ con el siguiente contenido:

name: enable_change_user_password_admin
version: 0.1.0
patches:
  openedx-common-settings: |
    #: common/djangoapps/student/admin.py
    FEATURES["ENABLE_CHANGE_USER_PASSWORD_ADMIN"] = True

Luego en la consola se corren los siguientes comandos:
tutor plugins enable enable_change_user_password_admin
tutor config save
tutor local stop
tutor local start -d

1 Like