forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: ringsidephotos on January 31, 2019, 04:32:34 pm

Title: Can't Login to my website using Coppermine
Post by: ringsidephotos on January 31, 2019, 04:32:34 pm
I can't login to my website, which is using Coppermine. I haven't been on my site in a long time and I can't remember my login or password (please don't ask how that's possible... two surgerys last year, stress, memory loss). My site is ringsidephotos.com and I have a customized Coppermine installed. My webhosting (Lunarpages) says they don't store this data (login/password). Also, when I click on the lost password, it shows "Selected user does not exist!" I don't know how that's possible. What can I do to get into my website as the administrator?
Title: Re: Can't Login to my website using Coppermine
Post by: FansCityEu on January 31, 2019, 06:40:13 pm
This happened to a few clients of mine when they upgraded to 1.6.x a few months back, when we made PHP 7.2 mandatory.

Steps:

1. Login to cPanel
2. Go to "Databases" > PhpMyAdmin
3.  Select your database
4. Go to cpg_users or (yourprefix_users), click on that table
5. You will see your user, click on "copy, change user_name to anything (admin2, for example), in user_password place a new password using MD5 Function (see: https://prnt.sc/mev75x) and click on "continue"
6. Login to your CPG gallery with that new user and change your old user's password through there.

You can also try just to change your user's user_password with MD5 function but sometimes does not work.
Title: Re: Can't Login to my website using Coppermine
Post by: Phill Luckhurst on January 31, 2019, 10:01:48 pm
FansCityEu

While your intentions are good, in truth the method you outline can cause more problems. A lot has changed in the database with the move to 1.6.x making it more important than ever to run update.php . There is quite a lot included in that script which is why it is mandatory to run it.

Please also be aware that version 1.6.x salts the passwords in a much more secure manner than either plain text or md5.
Title: Re: Can't Login to my website using Coppermine
Post by: ringsidephotos on February 02, 2019, 04:27:21 pm
Phil,
If the solution mentioned can cause more problems, what do you suggest I do?
Title: Re: Can't Login to my website using Coppermine
Post by: ringsidephotos on February 02, 2019, 04:28:56 pm
Also, I know I have a much older version. How can I find out what version I have? Perhaps it's easier to retrieve my login and password with an older version?
Title: Re: Can't Login to my website using Coppermine
Post by: ron4mac on February 02, 2019, 05:42:32 pm
The CPG version you are running is 1.5.46. The 6-step method to reset your password pointed out by FansCityEu should work for you without causing issue.
Title: Re: Can't Login to my website using Coppermine
Post by: Phill Luckhurst on February 02, 2019, 06:43:41 pm
Ok, just to clarify my comment above to FansCityEu, I was purely mentioning this for those that have upgraded where it is really important to run update.php. This site is still, Thanks Ron for checking, on CPG 1.5.x so this is purely password recovery. I will move this to the 1.5.x forums.
Title: Re: Can't Login to my website using Coppermine
Post by: Αndré on March 14, 2019, 09:52:56 pm
For your information (as I've added the password salting to cpg1.6.x): it's fine to set the password string to a md5 hashed password even in cpg1.6.x, but you need to clear the user_password_salt field in addition, otherwise it won't work. Coppermine will salt it on next successful login of that user, as it's done for every non-salted password (they don't get salted all at once on upgrade, as that's just possible if we know the actual password).