WordPress: force users to change password on first login

I’ve put together a quick plugin at https://github.com/lumpysimon/wp-force-password-change in response to your question and a recent client request for exactly the same thing.

It adds a user meta field on registration, then checks for the presence of this when a user is logged in. If it’s not there, they are redirected to the edit profile page and an admin notice is displayed. After they change their password the user meta field is removed.