AWK script to automatically create users

Job ID: 33971499

Budget: €8 – €30 EUR

Hello,
I have to make a simple script that creates users (commande useradd).
The script takes information from a user.txt file.
Each user is created with "NAME + SURNAME" in field comment.
Of course users can login.

Each user has "groupe1" as primary group and next groups are secondary groups for them,
if groups are secondary groups for them.
if the group doesn't exist (have to check if exist in /etc/passwd file) write a warning message and create them.

The user has to change his password for his first connexion.

If you run the script second time it don't have to create existing user.

Then create between 5 and 10 files in personal repository of each created user. Each file has a size between 5 Mo and 50 Mo.

Thanks you.
Related categories: Linux Shell Script Scripting Bash Scripting Bash