49688 FreeBSD Batch user creation
This project was awarded to webta for $100 USD.Get free quotes for a project like this
I need a perl script. The script will take a file as input. The inputted file will be a URL of a CSV containing two fields "email" and "password". The password field is optional and may be present/absent on a line by line basis. The perl script will look through each row of data, removing non-alphanumeric characters from the password and validating proper email address formatting. The perl script will check the file at "/usr/local/etc/postfix/virtual" to see if there is already an entry there for the email address. If there is, the perl script will send an email to an administrator specifying the email address it failed to created because it already exists. The script will then skip to the next user to be created. Usernames following a format of STRINGXXX, where STRING is a hard-coded variable in the perl script, and by default will be set to "user". The script will scan the "/usr/home" directory for subdirectories that have STRING as a substring in them. It will find the highest, numerically, name user subdirectory. So, if in a directory, you have user001 user002 user003 user004 user005 The perl script will identify "user055" as the highest username, and will create the next user as "user056". The password is an optional field in the CSV. Some users will have it, some won't. If the password is blank, the perl script will autocreate a lowercase 12-character alphanumeric password. The perl script will then take the email address and extract the domain name. It will check the file "/usr/local/etc/postfix/[url removed, login to view]" for the domain in question. If it doesn't see the domain, it will add it. The perl script will revisit the file at "/usr/local/etc/postfix/virtual" and make an alias entry for the email address to the username The perl script will then issue a "postfix reload" command The perl script will then send an email to an administrator with a list of: username, password, email, status [Where status is a 1 or 0 based on if it was created] The file /usr/local/etc/postfix/virtual has the following format: #Comment #Comment #Comment #Comment email [tab] username email [tab] username email [tab] username The file /usr/local/etc/postfix/[url removed, login to view] has the following format: domain domain domain domain domain domain
Browse Related Skills
Other things people do on Freelancer
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online