Originally Posted by James0806
for i in 1 2 3 4 5; do useradd user$i; echo user$i | passwd --stdin user$i; done
I found this while googling i just want to create some users and allowing them to change their passwords after their first login using script
Ok...and your question/problem is what? Or is this another homework question?
Read the man page on the useradd command, read up on how to set a default on password expiration, and (again) read one of the MANY bash scripting tutorials.