I need a shell script to run on a Debian Linux server that will create users from a CSV file.
When the script runs, it should create a user with the same properties as if it were entered manually (one at a time) from the command line. This means a directory must be created at /home/username and that each user will be able to connect to this particular home directory using a FTP client. The user's password is also within the CSV file.
I would also like a second more advanced version which additionally creates MySQL user with a database.
Both scripts should have some error checking to ensure we don't try to create duplicate users or databases.
I have attached 2 sample CSV files.