This might do it.
User.all.update_all(password: 'not a good idea')
You can impersonate users. So maybe you don’t need do do this?
Or you can Google “ruby loop array” for an example of how loops work.
And you can do User.find(id) and save a few keystrokes.