Bobcares

How to reset administrator password of Coppermine photo gallery

by | Oct 12, 2016

In Coppermine photo gallery, user passwords can be easily reset using ‘Forgot password’ link in the gallery login page.

The new password generation link would be mailed to the email account corresponding to that user.

Coppermine photo gallery password reset

Coppermine photo gallery password reset

 

But in cases where the email server is not working or someone hacked your account and changed the settings, you may have to reset the password via backend.

Today we’ll see how to reset the administrative password for Coppermine photo gallery from the backend.

1. Identify the database

Coppermine photo gallery stores all the information in database. The first step to reset administrative password is to identify this database name.

The Coppermine configuration file is found in the ‘includes’ folder in the website gallery folder. The file name would be ‘config.inc.php’ and it contains the database details.

coppermine-photo-gallery-2

Coppermine photo gallery config file

 

Find the database name from the entry corresponding to the ‘dbname’ in the config file. This is the database which contains the table to update the user password.

2. Take a backup of the database

Before making any database updates, it is advisable to take a backup of the database using the ‘mysqladmin’ tool.

This is a precautionary measure to ensure that the gallery can be restored in case a wrong sql query ends up crashing the entire database and the gallery.

3. Update user password in the database

You can access the database either via back-end using ‘mysql’ command or from the front-end using phpMyAdmin.

To update the password via backend, connect to MySQL server. Now select the database using ‘use databasename’ command.

The table ‘CPG_users’ in the database contain the details of the users in the gallery. To update the password, execute the command:

UPDATE `cpg_users` SET `user_password` = MD5( 'new_password' ) WHERE `user_name` = "administrator";

Provide a new strong password for the user ‘administrator’. The username can vary based on the user for which you need to update the password for.

Reset administrator password for Coppermine photo gallery

Reset administrator password for Coppermine photo gallery

 

To update the password from phpMyAdmin, go to cPanel -> MySQL Databases -> phpMyAdmin option.

Choose the Coppermine photo gallery database from the left panel. The database tables will be listed underneath. Click on the table ‘cpg_users‘ from that.

The rows in the table ‘cpg_users’ will be displayed on the right panel. From the rows, select the one with the ‘user_name‘ field as ‘administrator’.

Provide the new password in the ‘user_password‘ field corresponding to that user and choose the MD5 encryption. Update the row by clicking on ‘Go’.

Now you would be able to login to Coppermine photo gallery using the new password you have set.

In short..

Today we discussed how to reset the password for Coppermine photo gallery administrator or any user. It is very important to perform all database updates with caution.

Whenever a database name change, username change or database user password update is done, these changes should be updated in the config file too, for the gallery to work.

At Bobcares, we strictly advise setting strong passwords for Coppermine photo gallery users. We also update all vulnerable software to their latest secure versions to avoid hacks.

If you’d like to know how to manage your websites and manage photo galleries with zero downtime, we’d be happy to talk to you.

 

Get a FREE consultation

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

Talk to our technical support specialist today to know how we can keep your service top notch!

TALK TO AN EXPERT NOW!




Bobcares provides Outsourced Hosting Support and Outsourced Server Management for online businesses. Our services include Hosting Support Services, server support, help desk support, live chat support and phone support.

1 Comment

  1. Nida Bidwell

    Wohh just what I was looking for, appreciate it for posting.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF