[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Batch email accounts creation on RAQ4
- Subject: Re: [cobalt-users] Batch email accounts creation on RAQ4
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Tue Nov 12 13:56:03 2002
- Organization: Befriend Internet Services LLC
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
"Pizza Box manager" <cobalt-list@xxxxxxxxxxxxx> wrote:
> we have a list of hundreds of email accounts to create under
> the same domain name /virtual host on a Cobalt machine,
I'll assume that you plan on creating users with email accounts. If you
simply want to create email aliases that forward off-box it's even simpler.
I'll elaborate if that's the case.
> how can this be done in patch - ie editing the system file
> directly and not entering them manually one by one ?
Take a look at the Cobalt shell scripts. In particular
/usr/sbin/cobalt/adduser. more /usr/sbin/cobalt/adduser or
/usr/sbin/cobalt/adduser to see flags and usage.
> What should the format be like, and in which files should these be added ?
Create a text file with the following fields in any order: name, username,
password, quota, email address(es) with one record per line. If you need to
get more complex than that it should be straightforward. Then write a bash
script (or script in your favorite language) to loop through the file 1 line
at a time and execute adduser (the one I reference above, not the one in
/usr/sbin) with the proper flags. Then the users will be created on the
system and in the backend db / GUI. When I do something like this I usually
separate the fields with a bar (|) as in:
Steve Werby|b012002|gfd#231K|100|steve@xxxxxxxx
Of course you'll need to create a variable for the site's group (since all
users are for the same site) and if anything like the quota is the same for
all users you'll probably want to use a variable for that. Hope this gets
you on the right track.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/