I've tried search first but couldn't find an answer I was looking for. So here goes:
For testing pruposes I have to create multiple users at once. My thought was... shell scripting. Now I have managed to create a script that allows me to just give the amount of users I need and it will create them.
So when I say createuser.sh 10, 10 users will be created with the names "user1, user2,... user10".
These users however do not have passwords. When I try to use passwd <username> it ofcourse asks to input a password and verify this. The question here is, is there a way to let the script do this for me? So when user1 is created it will set its password to something like password1 without me typing it in?
I though maybe if I use chpasswd with a file where I have the usernames: passwords would work but I get the message it's missing the new password...
Using useradd <username> -p <password> didn't work either.
Now I'm pretty new at shell scripting and the use of linux.
I'm using Bash on Debian 3.1 Sarge. Any help and/or tips are greatly welcomed