Force Password Change at first logon

Force Password Change at first logon

par Vernon Williams,
Nombre de réponses : 17

I have uploaded around 700 students into the database.  However, at the moment they all have the same password.  How can I force a password change the first time they logon?

Many thanks for any help.

KVW.

Moyenne des évaluations: -
En réponse à Vernon Williams

Re: Force Password Change at first logon

par Marc Dastous,

I can't wait for the answer to this one, I realized after I uploaded 2300 users that this was the case surprise

Marc

En réponse à Marc Dastous

Re: Force Password Change at first logon

par Martin Dougiamas,
Avatar Core developers Avatar Documentation writers Avatar Moodle HQ Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers
In Moodle 1.5, if you set user passwords to "changeme", then they will be asked for a new password after the first time they log in.
En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par Marc Dastous,

Good morning Martin,

I am aware of this feature.  However, what can you do if you bulk upload users?What field would be used to toggle this to "active"?

And secondly, is there a way to change all users already in the database to force them to change/confirm their password on their next login?

Marc

En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par Barbaros Aslan,
Hi Martin,
Is there any parameter in the prepared upload user text file to force password change at first logon.  (such as ...Course1,Group1,changeme=yes)
En réponse à Barbaros Aslan

Re: Force Password Change at first logon

par Res Hotz-Pohlmann,

If you like SQL you can do this job by running the following SQL statement directly in your moodle database:

insert into mdl_user_preferences

(userid, name, value)

select id as userid, 'auth_forcepasswordchange' as name, '1' as value

from mdl_user

where password = '201f00b5cd5d65a1c118e5c31431514c'

Just replace the red password code with the contents of the password field of the table mdl_user of the last imported useres.

En réponse à Res Hotz-Pohlmann

Re: Force Password Change at first logon

par Edward Hewlett,
Thank-you, thank-you, thank-you! You have no idea how helpful this tip has been!

This really is a feature that should be implemented for bulk user uploads...
En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par warmac -,
why does force password change feature not redirect users back to main area instead it keeps them stuck in the change password mode is this a bug ?

I tried it myself and it doesn't redirect just keeps you locked in the change password page even after you changed it

En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par warmac -,
Hey Martin that changeme doesn't work at least on my end, all it does is consider changeme as the new password and if you enter changeme for the password then it directs you to changepassword page, strange no ?
En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par Rui Boon Tan,
I had written a script that will force uploaded users to chage their password at their first login, instead of having the administrator to change it by hand. ( I used the auth_forcepasswordchange field. ) Hope it will solve someone's problem.
By the way, i had just started learning php, so if there is any bug, feel free to reply.
Moyenne des évaluations:Useful (1)
En réponse à Rui Boon Tan

Re: Force Password Change at first logon

par Res Hotz-Pohlmann,

If you like SQL you can do this job by running the following SQL statement directly in your moodle database:

insert into mdl_user_preferences

(userid, name, value)

select id as userid, 'auth_forcepasswordchange' as name, '1' as value

from mdl_user

where password = '201f00b5cd5d65a1c118e5c31431514c'

Just replace the red password code with the contents of the password field of the table mdl_user of the last imported useres.

En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par Rui Boon Tan,
Sorry, slight mistake (extra ' at line 53). Updated one attached
En réponse à Rui Boon Tan

Re: Force Password Change at first logon

par warmac -,
has anyone figured out the bug on force password change yet that keeps user stuck in the change password mode ?

En réponse à Rui Boon Tan

Re: Force Password Change at first logon

par Chris Thompson,

Hello im having the same problem with bulk upload, i am new to this and i was wodering if you could tell me what to do with the file you have created above.

Thanks

En réponse à Chris Thompson

Re: Force Password Change at first logon

par Rui Boon Tan,
You will have to upload the file to your moodle directory (something like "/home/www.example.com/htdocs/moodle") and then access the file by typing the location of the file (eg. "www.example.com/moodle/forcepasswordchange-updated.php").
By filling in the lowerlimit field with 3 and submit, the script will force all users except the default admin to change their password at the next login. If you only want to force password change for the latest batch upload, type in the lowest numeric id that moodle display
Hope that this will be useful
En réponse à Martin Dougiamas

Re: Force Password Change at first logon

par wendy ng,

how do I disable forcepasswordchange upon first login then? And why do users prompted for password change upon first login?