[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Mysql's ENENCRYPT function keeps changing its mind... (and causes a courier headache)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list

I am in the process of rebuilding one of the few emails servers I maintain.
Using the packages courier-pop,  courier-authdaemon and courier-authmysql 
(from sarge) we have a configuration which keeps all our user data in a mysql 
database. Which is functioning on another server running (checked) the same 
package versions.

courier-authdaemon=0.42.2-10
courier-authmysql=0.42.2-10
courier-pop=0.42.2-10
mysql-client=4.0.16-2
mysql-server=4.0.16-2

Because courier (seemingly) only understands CRYPT encrypted passwords i have 
in the past used mysql's ENCRYPT () function to set the passwords in the 
table. 
Previously i have had no problems with this but today (as i reconfigure the 
server) it seems that every time i run 
UPDATE table SET password_crypt = ENCRYPT('passphrase') WHERE .....
or somesuch mysql inserts different data, e.g:

mysql>
UPDATE popbox SET password_crypt= ENCRYPT('passphrase') WHERE 
local_part="david" AND domain_name ="domain.tld";
SELECT password_crypt  FROM popbox WHERE local_part="david" AND 
domain_name="domain.tld";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

+----------------+
| password_crypt |
+----------------+
| P8wbA/tS5aY5E  |
+----------------+
1 row in set (0.00 sec)

mysql> UPDATE popbox SET password_crypt= ENCRYPT('passphrase') WHERE 
local_part="david" AND domain_name ="domain.tld"; SELECT password_crypt  FROM 
popbox WHERE local_part="david" AND domain_name="domain.tld";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

+----------------+
| password_crypt |
+----------------+
| T8bkeomjE6G8c  |
+----------------+
1 row in set (0.00 sec)

mysql>


etc. as it happens none of these passwords seem to work with courier.

Could someone give me a pointer at how to get mysql "behaving" or, even better 
a way to make courier accept the use of MD5sum passwords we also have stored.

Many thanks

- -- 
David Leggett
david@asguard.org.uk
Get my public GPG key from http://www.asguard.org.uk/~david/david.asc
Fingerprint: 51FA 58C2 0515 D0EE 7EA6 5AEB D944 B73E 5151 764
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAWhxC2US3PlFRdkkRAjQ9AJkBnzVKYA+Ylr0H1stBlEOGUAvQDgCggiMh
4cBQyx17Il2mxfYIdWyEgsY=
=UY4P
-----END PGP SIGNATURE-----



Reply to: