Look at the answer here,which says unless you have a whole lot of users to add the best way is to use adduser (for adding users) and usermod (for adding a user to a group) which takes care of a lot of things. If you still wish for some pre-made script, there is one here and another one here, but I do not know if they really work for you

It is my solution. I created file /tmp/userlist and added all users name, after completion of script it will create users and you can find user name and given random password in file /tmp/userlist-created. I know it is not perfect solution.