[BlueOnyx:01471] Re: Automatically create users from a file

Rodrigo Ordonez Licona rodrigo at xnet.com.mx
Mon Jun 22 20:05:59 -05 2009


You might use the import function from Bluequartz / Blueonyx, a file is
created with the informacion needed ,
you can load if from the user interface.

You might try to replicate that behaviour, 

(I am refering to the import option at USER MANAGEMENT - IMPORT, WHEN YOU
ARE INSIDE A VSITE)

However michael already mentioned the location of the command line scripts

Hth

Rodrigo O
XNet
 

-----Original Message-----
From: blueonyx-bounces at blueonyx.it [mailto:blueonyx-bounces at blueonyx.it] On
Behalf Of Ken Marcus - Precision Web Hosting, Inc.
Sent: Lunes, 22 de Junio de 2009 10:51
To: BlueOnyx General Mailing List
Subject: [BlueOnyx:01466] Re: Automatically create users from a file


----- Original Message -----
From: "Manuel Bona" <mbona at svalero.es>
To: "BlueOnyx General Mailing List" <blueonyx at blueonyx.it>
Sent: Sunday, June 21, 2009 10:02 PM
Subject: [BlueOnyx:01465] Re: Automatically create users from a file


> Some examples of these scripts?
> I lost something and no where to start
>
> thanks
> Manuel Bona
> mbona at vmgrupo.es
>
> Michael Stauber escribió:
>> Hi Manuel,
>>
>>
>>> I need to create users automatically every hour from a file, as is done
>>> from the control panel BlueOnyx in: *Site Management > User Management >
>>> Import > Url*
>>>
>>
>> That is a bit unusual.
>>
>> You could write a script that parses your textfile and then uses the
>> "/usr/sbin/cadduser" command to create the desired user(s).
>>
>> Here are the commands that the 5100R-shell-tools provide:
>>
>> /usr/sbin/cadduser
>> /usr/sbin/caddvsite
>> /usr/sbin/cdeluser
>> /usr/sbin/cdelvsite
>> /usr/sbin/clistuser
>> /usr/sbin/clistvsite
>> /usr/sbin/cmoduser
>> /usr/sbin/cmodvsite
>>
>> They allow you to add / modify / delete sites and users from the command 
>> line.
>>
>>
>>> You also need to remove users who have more than 6 months without access
>>> to e-mail account.
>>>
>>
>> User logins to POP3, IMAP and SMTP is of course logged in 
>> /var/log/maillog and
>> /var/log/secure. But as those logs are rotated and packed frequently.
>>
>> So you'd have to set up a script that builds a list of users, parses the 
>> logs
>> at least once a day and builds a small database that keeps track of who 
>> logged
>> in when for the last time. Based on that you could then use 
>> /usr/sbin/cdeluser
>> to delete users that haven't logged in to email in the last six months.
>>
>>
>
>
Manuel

>From a perl script it would be something like

system("/usr/sbin/cadduser --name=$adminuser --password='$password'
--fullname='adminuser 
controls FTP and siteadmin 
access' --fqdn=$hostname.$domainname --admin
--adminPassword='$serveradminpassword' 
  --quota=$sitequota ");





----
Ken Marcus
Ecommerce Web Hosting by
Precision Web Hosting, Inc.
http://www.precisionweb.net



_______________________________________________
Blueonyx mailing list
Blueonyx at blueonyx.it
http://www.blueonyx.it/mailman/listinfo/blueonyx





More information about the Blueonyx mailing list