Gentlemen (and women): I believe it is NOT an Exim issue but a database issue coupled with the encryption algorithm used. Likely the password encryption algorithm produces the encrypted password given and it happens to be 102 characters in length to store it - thus MySql will take the resultant data and truncate the unnecessary blank characters and store the encrypted result in the variable array of 255 characters... Just my two cents... CHAR and VARCHAR, I believe are implemented the same way, meaning CHAR is not static either -- VARCHAR means variable character and MySql goes out of its way to minimize storing anything unnecessary -- like blank characters -- so not reading the details of your issue I believe you have 102 characters because it is necessary to store your password in its encrypted state, the other characters that you think are missing I believe are just thrown away by MySql in its storage. You can have UP TO 255 CHARacters with VARCHAR and if you use say CHAR(52) you would be able to store UP TO 52 characters. See: http://dev.mysql.com/doc/refman/5.0/en/char.html and on the left you can see the documentation for the nuances of your particular MySql Version.... regards, Robert On 7/9/12 1:58 PM, Mark Shearar wrote:
Thanks Gordon,
Crypt is definitely varchar(255) yet any new user I create definitely only has 102 characters in that field. I assume then that varchar(255) doesn't define the maximum number of characters allowed in a particular field but rather defines how many characters should always be in that field? Ie any value therein should always be 256 characters? To be honest, I've no idea where to go from here nor how to check why it's populating that field with only 102 characters.
Mark
-----Original Message----- From: users-bounces(a)exim4u.org [mailto:users-bounces(a)exim4u.org] On Behalf Of gecko(a)exim4u.org Sent: 03 July 2012 08:30 PM To: Exim4U General Discussion Subject: Re: [Exim4U] Unable to change password without breaking login
The crypt field should be 256 characters in length since it is defined as varchar(255) in the file that you referenced in your first email:
http://exim4u.org/svn/exim4u_src/trunk/mysql_setup/mysql.sql
The crypt field use to be defined as varchar(48) and was changed to varchar(255) because of problems discovered with the Debian implementation of PHP 5.3 with a 48 character crypt field.
I would investigate why your crypt field is 102 characters in length instead of 256. Refer to:
http://users.exim4u.org/debian-ubuntu-php-5-3-crypt-problem-td3601265.html
where nightkid stated:
"A short dig into the code shows that crypt_password('any string') with the default MD5 method returns a 200 symbol line instead of the old 48 symbols, probably due to the new MD5 code in PHP 5.3."
FYI,
Gordon
Hi Gordon,
When I look in the users table I can see the new user I created with the correct localpart, the correct username (email address) and the correct password in "clear". The crypt table contains 102 characters so I assume that's correct, the uid and gid are the same as my exim4u user and group. I remember from the previous two installations that when I changed the siteadmin password the correct password would show in the clear table, just not sure if the "crypt" changed at all. I'm not sure if this is relevant but looking in apache2/error.log I see
PHP Notice: Undefined index: realname in /var/www/exim4u/config/variables.php on line 106, referer: http://domain.tld/exim4u/index.php PHP Notice: Undefined index: realname in /var/www/exim4u/config/variables.php on line 106, referer: http://domain.tld/exim4u/index.php PHP Notice: Undefined index: localpart in /var/www/exim4u/config/variables.php on line 108, referer: http://domain.tld/exim4u/index.php PHP Notice: Undefined index: domain in /var/www/exim4u/config/variables.php on line 116, referer: http://domain.tld/exim4u/index.php
Mark
-----Original Message----- From: users-bounces(a)exim4u.org [mailto:users-bounces(a)exim4u.org] On Behalf Of gecko(a)exim4u.org Sent: 02 July 2012 11:47 PM To: Exim4U General Discussion Subject: Re: [Exim4U] Unable to change password without breaking login
A good starting point would be to use mysql or phpmyadmin to verify the database's variables after you change the siteadmin password or setup a new local domain. That is, verify with mysql or phpmyadmin that the siteadmin
On 07/03/2012 06:52 AM, Mark Shearar wrote: the following: password was changed appropriately and/or that the new account credentials are correct.
The siteadmin password is not stored in variables.php. There is an erroneous reference to this in the INSTALL doc but that has been fixed in the trunk. Gordon
On 07/02/2012 03:35 PM, Mark Shearar wrote:
Hi all,
I'm having problems logging in to a fresh exim4u installation. If I leave the default siteadmin password as CHANGE then I can log in no problem but as soon as I change the password I cannot log in anymore. If I create a local domain and try log in as that administrator I can't log in either. On my latest attempt I used http://exim4u.org/svn/exim4u_src/trunk/mysql_setup/mysql.sql so that crypt was set to varchar(255) and to make sure I didn't miss anything else.
Is there anything else I can look at? And, btw, I can't seem to find the siteadmin password in variables.php?
My environment is as follows:
Exim version 4.80
PHP 5.4.4-2
MySQL 5.5.24-4
Apache 2.2.16
Thanks
Mark
_______________________________________________ users mailing list users(a)exim4u.org https://exim4u.org/mailman/listinfo/users
_______________________________________________ users mailing list users(a)exim4u.org https://exim4u.org/mailman/listinfo/users
_______________________________________________ users mailing list users(a)exim4u.org https://exim4u.org/mailman/listinfo/users
_______________________________________________ users mailing list users(a)exim4u.org https://exim4u.org/mailman/listinfo/users
_______________________________________________ users mailing list users(a)exim4u.org https://exim4u.org/mailman/listinfo/users