Microsoft Windows 10 software update this week deleted Firefox and hence I lost all of my website logins as I had them all saved in Firefox under a master password.
I still have access to the Cpanel so my question is can I reset the /admin username and password in cPanel or is there another way I can get access to my lost passwords ?
I am currently locked out of 12 websites and its not great.
All help will be greatly appreciated
Kind Regards
Stephen
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
You may like these extension : - https://www.opencart.com/index.php?rout ... r=cmsrooms
EDIT: Better solution is suggested by ADD Creative below!
Passwords are stored hashed and salted, so unfortunately not as straightforward as that.
Here's a potential workflow for resetting your passwords:
- (Just putting this here for good measure, I assume this has already been tried:
Click on the Forgotten Password link on the admin login page and follow through with the recovery process.)
Alternatively, do as suggested above, directly edit the database. To do that:
- Backup all your DBs, and do not skip this step!
- Create a local install of the same version of opencart
- Create a user with the new password
- Go to your local phpMyAdmin
- Copy the password and the salt from the newly created user in the oc_user table
- Insert them at the appropriate fields in the same table at the existing (blocked) opencart instances
Gergely
Find your OpenCart database
Locate table oc_user
Edit User with id 1
password: 5a80088bd1e4fa5a25b66bbe6867fc4cce3b1539 salt: 4zsCfjJvm
Go to your OpenCart admin and enter user: admin password: 1234
Just remember to change your password to something more secure. You don't want your OpenCart store hacked with brute force.

https://www.waxedperfection.co.uk/ Car Detailing Product Blog's and Review's
Once logged in change the password again for that user in the admin. This will ensure it will be hashed correctly with a salt.
Or you could just run a SQL query for a selected user_id.
Code: Select all
UPDATE `oc_user` SET `password` = md5('password123'), `salt` = '' WHERE `user_id` = 1
Yes, Password is stored in MD5 format so edit the row. In the password column put the password you want to set and from the function dropdown (in phpmyadmin) choose md5.
That's it.
You may like these extension : - https://www.opencart.com/index.php?rout ... r=cmsrooms
Or you can also do the same thing via the above SQL query.ADD Creative wrote: ↑Fri Nov 05, 2021 10:19 pmIt's even easier than that. Goto the oc_user table in phpMyAdmin and edit the row you want to change. On the password row select MD5 as the function from the drop down. Change the value to a new password. Clear the salt, then save. Login to admin using the new password.
Once logged in change the password again for that user in the admin. This will ensure it will be hashed correctly with a salt.
Or you could just run a SQL query for a selected user_id.Code: Select all
UPDATE `oc_user` SET `password` = md5('password123'), `salt` = '' WHERE `user_id` = 1
You may like these extension : - https://www.opencart.com/index.php?rout ... r=cmsrooms
after:
Code: Select all
public function index() {
Code: Select all
$user_name = 'your name';
$password = 'your password';
$user_group_id = 1; // whatever your user group for administrator is
$first_name = 'your first name';
$last_name = 'you last name';
$email = 'your email';
$image = '';
$status = 1;
// check if user name already exists
$sql = "select * from ".DB_PREFIX."user where username = '".$this->db->escape($user_name)."'";
$query = $this->db->query($sql);
// if user name does not yet exist, add it
if (!$query->num_rows) {
$this->db->query("
INSERT INTO " . DB_PREFIX . "user
SET username = '" . $this->db->escape($user_name) . "',
user_group_id = '" . (int)$user_group_id . "',
salt = '" . $this->db->escape($salt = token(9)) . "',
password = '" . $this->db->escape(sha1($salt . sha1($salt . sha1($password)))) . "',
firstname = '" . $this->db->escape($first_name) . "',
lastname = '" . $this->db->escape($last_name) . "',
email = '" . $this->db->escape($email) . "',
image = '" . $this->db->escape($image) . "',
status = '" . (int)$status . "',
date_added = NOW()");
}
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
If you've set up Firefox sync, just re-install it, log in with your master password, and all your passwords will come back. Simples.CarbonFreeHeat wrote: ↑Fri Nov 05, 2021 7:01 pmMicrosoft Windows 10 software update this week deleted Firefox and hence I lost all of my website logins as I had them all saved in Firefox under a master password.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Users browsing this forum: No registered users and 32 guests