is there any way that I can recover the admin password?
short of a new install?
thanks
recovering admin password
Moderator: mkoch227
1. Save this code as a PHP file (like reset_pass.php):
2. Upload it to your server in the Hesk folder
3. Open it in your browser, the main admin password will be reset to "admin"
4. delete the file from the server
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";
?>
3. Open it in your browser, the main admin password will be reset to "admin"
4. delete the file from the server
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
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
This is a grete product!!
thanks
-
- Posts: 12
- Joined: Wed May 14, 2008 12:46 pm
-
- Posts: 12
- Joined: Wed May 14, 2008 12:46 pm
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.