recovering admin password
Posted: Thu Jan 29, 2009 5:29 pm
is there any way that I can recover the admin password?
short of a new install?
thanks
short of a new install?
thanks
Code: Select all
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','');
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/database.inc.php');
hesk_dbConnect();
$sql = "UPDATE `".$hesk_settings['db_pfix']."users` SET `pass`='499d74967b28a841c98bb4baaabaad699ff3c079' WHERE `id`=1 LIMIT 1";
hesk_dbQuery($sql);
echo "Admin password reset to: admin";
?>
Thanks - your method is cleaner than mine - I was going to created an 40 character hash string from a known password and the edited the mysql data directly.Klemen wrote:1. Save this code as a PHP file (like reset_pass.php):2. Upload it to your server in the Hesk folderCode: Select all
<?php define('IN_SCRIPT',1); define('HESK_PATH',''); require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/database.inc.php'); hesk_dbConnect(); $sql = "UPDATE `".$hesk_settings['db_pfix']."users` SET `pass`='499d74967b28a841c98bb4baaabaad699ff3c079' WHERE `id`=1 LIMIT 1"; hesk_dbQuery($sql); echo "Admin password reset to: admin"; ?>
3. Open it in your browser, the main admin password will be reset to "admin"
4. delete the file from the server
Thinking about it, I should really link into the core of hesk, and allow the assignment of categories for each aswell...DanielWalters6 wrote:Vexel: I did just that too.
I'm working on a php page which will allow the administrator to list up to 30 usernames at a time, and by generating a 40 character hash like you described, assign them all a password.
I'm working on the code to email each of the new users with their new passwords.