Can't log in

larryl

Joined: 2002-09-16
Posts: 47
Posted: Fri, 2012-04-13 22:34


Gallery version (not just "2"): 2.3
PHP version (e.g. 5.1.6): 5.2.17
PHPInfo Link (see FAQ): http://allenhost.com/phpinfo.php
Webserver (e.g. Apache 1.3.33): apache 2.0.64
Database (e.g. MySql 5.0.32): mysql 5.0.95
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux): linux
Browser (e.g. Firefox 2.0): Chrome 18, IE 9

I suddenly can't log into my Gallery installation that has been running for years.

I've tried the recover password link. Captcha is not allowing me to continue, telling me the letters I enter are incorrect. I know I'm typing them correctly.

I've tried changing the password directly in the database.

I've tried logging in with multiple users, including admin. No joy.

I've tried the manual login link from the FAQ - no luck.

Apache, mysql, and php have not been upgraded since the last time I could log in.

I maintain about 30 Gallery sites of different flavors and versions for my customers and have recovered or reset passwords dozens or hundreds of times, so this is very frustrating.

I would appreciate any helpful suggestions.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2012-04-14 10:53

This is solvable but first ...

larryl wrote:
I've tried changing the password directly in the database.

What exactly did you do here?

Which exact database table(s) and field(s) did you edit and did you just type in the new password you wanted or did you craft a G2 password hash as required?

--
dakanji.com

 
larryl

Joined: 2002-09-16
Posts: 47
Posted: Sat, 2012-04-14 13:04

table > g2_User
field > g_HashedPassword

I modified it through phpMyAdmin and selected the MD5 function.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2012-04-15 19:17

You shouldn't have done that without confirming first whether G2 actually stores the password as a simple MD5 hash. (Hint: It doesn't)

Anyway, take the attached file, change the extension to ".php", drop it into your gallery' "lib/support" folder, navigate to the file with your browser and follow the onscreen instructions to force a change to your password. It will also disable the captcha module so you will need to reactivate it after.

It is valid for G2 v2.3.1 and below as the new v2.3.2 has a new password hashing routine.
Update to this version once you gain access and do not edit the database in future without fully understanding what you are doing.

Good luck!

--
dakanji.com

 
larryl

Joined: 2002-09-16
Posts: 47
Posted: Sun, 2012-04-15 02:56

Thanks for the help. The database interaction was just a frustrated effort to get it working based on a random post here by someone who obviously was wrong.

The attached file didn't work in lib/tools since it was looking for security.inc, so I put it in lib/support and ran it there. It did seem to work correctly and I'm able to log in.

Thanks again.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2012-04-15 04:18

My mistake. I meant lib/support.

Nice to know you are back up and running as the script had an error (looks like it didn't stop the process).

--
dakanji.com