Hi Marcel,
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/:
> > 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.
>
> Whith the new pam_mysql-pre Version you can use md5 ass well.
According to the Readme in /usr/share/doc/libpam-mysql:
md5(Y) Used to decide if passwords should be encrypted using MD5
So this support should be included in the default debian sarge package.
> > 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.
> > 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.
> Then you must change in
> pamfiles the crypt=3 for md5 encryption and in config.inc.php from
> web-cyradm
> use md5 too.
Ok. That was clear.
> > 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.
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 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.
The problem was that the md5sums differed.
> > Any help or hints will be appreciated.
>
> I hope this helps a little bit.
This helped quite a lot for now. Thanks very much.
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