How to create user account with a 'newusers' run from a cron job?
How to create user account with a 'newusers' command run from a cron job?
Thank you in advance guys! |
First, welcome to LQ!
Second, have you read any of the 'man' pages yet? What distribution are you using? why are you looking to run 'newusers' from a cron job? Is this homework? A good place to start is: Code:
man crontab |
Hi,
I have got a little project I'm doing, I need to write a bash/php script which creates a linux user, MYSQL database, and emails them of such details. The user accounts should be created with 'newusers' command run from cron job. I read the 'man' pages but still don't know how to do it :/ Thanks! |
And man newusers
Your first step is to define which info is required in a file. As your script is using newusers, I suggest that you keep the format the same as required by newusers. You can use the gecos field to store the email address and database name.
You can test everything and once you're happy, add it to cron |
All times are GMT -5. The time now is 11:02 AM. |