Hello Claus,
 
You can use script (cyr_adduser.pl - see the link) to create users in the cyrus 
DB and insert users into MySQL using scripts from my post here:
http://www.mail-archive.com/[email protected]/msg00600.html
 
I've created userssql_add.txt file, which looks like this:
sleshem:dV2HgJefAbFqI:edu.haifa.ac.il:edu.haifa.ac.il:Shosh:Leshem
aklemer:tguxshr/unccc:edu.haifa.ac.il:edu.haifa.ac.il:Anat:Klemer
 
And this is for mysql import:
# mysql --local-infile=1 -u root -p
mysql> USE mail;
mysql> LOAD DATA LOCAL INFILE '/srv/www/import_users/userssql_add.txt'
  INTO TABLE accountuser
  FIELDS TERMINATED BY ':' 
  LINES TERMINATED BY '\n';
Query OK, 2 rows affected (0.00 sec)
Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
 
This is working for me and I'm using short usernames in my installation of 
web-cyradm.
 
 
Best Regards,
Leon Kolchinsky

________________________________

От: [EMAIL PROTECTED] от имени Claus Grill
Отправлено: Ср, 24.08.2005 14:05
Кому: [email protected]
Тема: [Web-cyradm] Import users into mysql and md5sum



Dear list,

I am trying to get aprox. 200 Users into web-cyradm using a mysql db.

I'd like to use md5 for the password encryption.

The users old passwords are stored in /etc/shadow. They are md5 encrypted, but
it seems, that it is not compatible with the md5 in the mysql table.

I am running web-cyradm on a Debian Sarge Server.

Everything Authentication, TLS, ... works fine, at the moment I am using
$CRYPT = "crypt". But it rather like to use md5.

I just really would like to bulk import the users into mysql along with their
current password.

I can generate a textfile with username and password (If necessary even new
ones in plain text). Is there a script which can do this? I mean insert them
into the mysql db and if needed (in case of plain text passwords) convert them
into md5.

That should be enough, as the users inbox can be created when they receive
their first email, shouldn't it? I'd just have to set the right parameter in
imapd.conf, which I can't remember right now. BTW I am running cyrus 2.1.18.

I have tried to generate a test md5 like this: echo "test" | md5sum.

But the result differed from the md5 in the password field when I created it
via the web interface.

Any help or hints will be appreciated.

Regards,

Claus Grill
_______________________________________________
This mailing list is hosted and supported
by bit-heads GmbH | http://www.bit-heads.ch

_______________________________________________
Web-cyradm mailing list
[email protected]
http://www.web-cyradm.org/mailman/listinfo/web-cyradm


<<winmail.dat>>

_______________________________________________
This mailing list is hosted and supported
by bit-heads GmbH | http://www.bit-heads.ch

_______________________________________________
Web-cyradm mailing list
[email protected]
http://www.web-cyradm.org/mailman/listinfo/web-cyradm

Reply via email to