First of all create two files one contains username and other passwords. here i'm using file users as username file and file pass as password file and script is:
#!/bin/bash arr=(`cut -f1 users`) for i in `cat pass` do useradd ${arr[$x]}; echo $i|passwd --stdin ${arr[$x]}; x=$[$x+1]; done