[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] How can I add a user from a public form



> The users will not be able to register just for the mail service,
they have
> to complete a registration form for the organisation first then the
details
> are forwarded to our CGI script to create a user account on the RAQ
to
> allocate them an e-mail address, it is this process we want to
automate
> hence the original request.

Well, with 1000 planned users I hope there are no other sites/users on
this server; but here goes...

Create a front-end script to take all of the details from the
customer.
Write the details to a comma-delimited file.
Write a cron-jobbed script to pick up the csv file, go through it line
by line, and pass the variables to the Shell Tools (which are already
installed on your server and will make the new users show up in the
GUI).
When it's done, the cron-jobbed script deletes the original
comma-delimited file and sits back for another 15 minutes or so before
it looks to see if another file of user's data has been created.

The script you need to pass the user info to is
/usr/sbin/cobalt/adduser. Read the script for all of the different
variables you can give it (options are at the bottom, or just do 'man
adduser').
I've got scripts like this set up to automatically add new clients &
domains to the machine - along with other things (dropping the new
client info into a MySQL database, emailing me, sending out
account-access details to the new clients, etc.) set up on my machine
and it works great thanks to Jeff Bilicki's Shell Tools.

Good luck...

CarrieB