I am converting some scripts from an ancient SuSe install, after a swap to ubuntu. These scripts uses a tool called mkpasswd, which sets user passwords. I wonder if there is something similar for Ubuntu so I don't have to code it myself. The tool is very simple. It reads a file like
username1:password2
username2:password2
....
usernameN:passwordN
And sets the passwords on the users.