useradd -p
i had a similar issue and found this helpful...as i'm not sure if the link is correct this is what i just happened to have copied from the guys response ...
"OK. Create your text file so that each line contains one username and its password, separated by one or more space or tab characters. For example, a line from this file might read:
harvey orange
The script to read it is below. This is actually a simpler than the other one, because it doesn't have to construct the usernames.
#! /bin/bash
# Creates a set of new users and assigns them passwords.
# User names and passwords are read from the standard input.
while read user password junk
do if useradd -m -g 501 "$user"
then if echo "$password" | passwd --stdin "$user"
then : # User successfully created.
else echo >&2 "Cannot set password for user $user"
fi
else echo >&2 "Cannot create user $user"
fi
done
" -- linuxquestions guy...(whose name, unfortunately, escapes me)
now name the script what ever u wish and execute it as follows:
#$: ./[name of script] <[list of users and passwords]
let me know it this helps....and do a search for "useradd -p"