Hello Claus, 

> thanks for the quick reply.
> 
> > > 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.
> >
> > Are you shure that they're in md5 encrypted? Standard is crypt i 
> > think, but i'm not 100Percent shure.
> 
> I think so. They are much longer than the regular crypt.
> 
> And John the Ripper says: (FreeBSD MD5 [32/32])
> 
> The password in shadow looks for example like this:
> :$1$ATYc.SUn$biCykrMxmCK4iJpvrtwfJ/:

After a little google time i have found this. FreeBSD doesn't
have stored the passwords in /etc/shadow! FreeBSD uses a DB3
Database to store the passwords, and this file is in 
/etc/spwd.db and in /etc/pwd.db. Look at this URI, there is a 
manpage:
http://www.freebsd.org/cgi/man.cgi?query=pwd_mkdb&sektion=8&apropos=0&manpat
h=FreeBSD+5.4-RELEASE+and+Ports

But WAIT! You have written this before:
> > > I am running web-cyradm on a Debian Sarge Server.
Why yow write FreeBSD? I went to be confused :-)

> > > 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?
> >
> > No, i think you must write it in php or perl to do this. 
> Look at the 
> > sql structure it is very simple to understand the structure.
> 
> That is what I was trying to avoid. I have nearly no 
> knowledge of php or perl.

Consulting? :-)

> 
> > > I mean insert them into the mysql db and if needed (in 
> case of plain 
> > > text passwords) convert them into md5.
> >
> > If you wan't to convert the passwords to md5, you must have the 
> > passwords in plaintext so that you can use this in your sql query:
> > "INSERT INTO tablename(username, password, ...) VALUES('marcel', 
> > '".md5($:POST["password"])."', '...');" Then he writes the 
> passes in md5.
> 
> That helped.
> I tried something just right now
> 
> echo bla | md5sum comes to something different then select md5('bla');
> 
> But echo -n bla | md5sum matches with select md5('bla');
> 
> So getting the useraccounts and passwords into the db now 
> shouldn't be much of a problem anymore for me.

You should first set up a correct web-cyradm Installation including
postfix, cyrus-* as well. Configure Web-Cyradm and pam to use md5
as password encrytion method. Set up a correct MX record in your DNS 
Server so that you get a fqdn with reverse lookup. Take this a your 
primary domain.(the other mailboxes and virtual domains are only virtual!)

Create a domain and two mailboxes if the server is behind a dialup line.
If the server is dedicated, one mailbox is enough. 

Now test the setup and try this: testsaslauthd -u username -p password -s
imap|pop|smtp
if you get a SUCCESS, try in MUA and send some mail around the World. :-)

be shure to have a correct setup and working Mailserver with web-cyradm
working in md5 password encryption mode. If so, you can try to migrate
"one" mailaccount from your txt file and add it in the mysql database.
Look in web-cyradm if there is a new domain/mailbox in the database, if
so try to connect with MUA and so on....

> 
> > > That should be enough, as the users inbox can be created 
> when they 
> > > receive their first email, shouldn't it?
> >
> > If you have set up the correct users and Pathes the web-cyradm uses 
> > the cyradm programm to create or delete the mailboxes in 
> cyrus-imapd. 
> > The first mail woul'd only be delivered to the mailbox if 
> the cyradm 
> > has created the mailbox in cyrus-imapd, or if the user logs 
> in with a 
> > mua, then cyrus-imapd will create the folders, if there 
> aren't exists.
> 
> So the mailboxes have to be created too.

Web-cyradm does this for you if your setup is correctly!
But the info that this is needet is fine, i wish i had it at
my first configuring steps. :-)

> 
> If I remember correctly there is even a tool which can do a 
> batch import/create of users mailboxes for cyrus. I'll have a 
> look into the web-cyradm source and maybe I'll do it with a 
> selfmade script.

I thought your php knowledge isn't enoug for that? You don't chenge
sourcecode from pam_mysql or other software if you don't know what
you're doing. You will become undefinable errors and noone can help
with these behaviours. sorry.

> 
> > > *
> > > 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.
> >
> > At the to you have wrote, that you have configured the pam 
> module with 
> > crypt!
> > There are two Parameters you must set! 1. in pam files, 2. in 
> > web-cyradm config file.
> 
> I know.

Thats fine.

regards 
   Marcel


.::::::::::::::::::::::::::::::::::::::::::::::::::::::.

  Marcel Hartmann
  Tel. 04 41 - 960 34 49        Fax 04 41 - 960 34 47
  Internet                              www.marcel-hartmann.com
  e-Mail                                [EMAIL PROTECTED]

`::::::::::::::::::::::::::::::::::::::::::::::::::::::`

_______________________________________________
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