Bash for multiple accounts with auto-gen passwords

Hello,

I am studying few things on unux and scripting. I need a script to create bulk users in unux. I need some assistance from you for creating 100 or more User IDs using a bash script:

Here's my requirements:

  1. I need to create 100 or even more user ids of different naming
    conventions. So, I would like to have a separate file(Example:
    usernames.txt) where I can paste the user ids, Name for Each ID, Group Name
    or GID, Serial Number) and call that file in the script

  2. The script should contain the block of code that will auto-generate
    random 8-character long alphanumeric and mixed-case passwords without
    special characters or symbols(Something like

< /dev/urandom tr -dc
A-Za-z0-9_ | head -c8 ) 

for each ID and these system-generated passwords should be saved in a different file after the script is run. (Example:
passwords.txt)

I googled but couldn't find a solid script for my above requirements.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.