Non-interactive (Unattended) password change under Ubuntu

Last night I had programmatically created a large number of users on a server. Today, I started getting emails from the users complaining that their new accounts didn’t work. Turns out my user creation script had not set their passwords correctly, so I needed to reset everyone’s password. Try as I might, I could not find an automagic method to do so with passwd; thankfully, it turns out there is...