Force Password Change at first logon

Force Password Change at first logon

Vernon Williams - келді
Number of replies: 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.

In reply to Vernon Williams

Re: Force Password Change at first logon

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

In reply to Marc Dastous

Re: Force Password Change at first logon

Martin Dougiamas - келді
Core developers қатысушының суреті Documentation writers қатысушының суреті Moodle HQ қатысушының суреті Particularly helpful Moodlers қатысушының суреті Plugin developers қатысушының суреті 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.
In reply to Martin Dougiamas

Re: Force Password Change at first logon

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

In reply to Martin Dougiamas

Re: Force Password Change at first logon

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)
In reply to Barbaros Aslan

Re: Force Password Change at first logon

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.

In reply to Martin Dougiamas

Re: Force Password Change at first logon

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

In reply to Martin Dougiamas

Re: Force Password Change at first logon

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 ?
In reply to Martin Dougiamas

Re: Force Password Change at first logon

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.
In reply to Rui Boon Tan

Re: Force Password Change at first logon

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.

In reply to Martin Dougiamas

Re: Force Password Change at first logon

Rui Boon Tan - келді
Sorry, slight mistake (extra ' at line 53). Updated one attached
In reply to Rui Boon Tan

Re: Force Password Change at first logon

warmac - - келді
has anyone figured out the bug on force password change yet that keeps user stuck in the change password mode ?

In reply to Rui Boon Tan

Re: Force Password Change at first logon

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

In reply to Chris Thompson

Re: Force Password Change at first logon

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