[Solved] Shell scripting

I am new to write scripts.
I want help to write a shell script to create 10 users and passwords to users.
Can any please help me.

What have you started with???

Each OS will have it's own variation. What are you running on? uname -a

Robin
Liverpool/Blackburn
UK

i am running in linux

.... and the Linux variant? Is it (big breath) SuSe, RHEL (Red Hat), Debian, CentOS, ......

mkdir -p /home/admin/useraccounts
for (( i=0; i<=500; i++ )) 
do
        #Create users whose name starts with baci, 
        #so this script will create baci1, baci2, baci3 etc depending on i value.   
   useradd baci$i
   < /dev/urandom tr -dc A-Na-n1-9_ |\
   head -c8 > /tmp/passwd.txt
        #this command is bit tricky, < /dev/urandom  
        #will generate all the random characters which are not even present
        #on keyboard.. and tr -dc A-Na-n1-9, will display only characters
        #which are from A to N, a to n and 1 to 9. This is to avoide o(small o),  
        #O(capital o), 0(numerical zero) characters in order to remove 
        #confusion in the password.  #And there is no character limit.   so head -c8
        #will limit the random characters to just 8
 
done   # was missing!!!  (VBE)

i found this example but i dont need the random password, i want my own passwords to users and each user has to take one password from the passwd.txt file

What is the point since a user can after type passwd to change it...

redhat

i just want to take the passwords to users from the text file which wrote in a text file in sequence

Since to connect they will need a passwd if you force one, meaning you are going to give them with the login name, why ask to choose since they can change it again?
I give always the same... And force user to change after 1rst connection... ( If he doesnt at mext connection he will fail and lock his account...)

tq you all.i have solution for it