Can't login with password hash nor reset the pass via other means #5256
Replies: 3 comments
-
Hi, i tryed the solution from issue #853 on latest kanboard releast and interactive shell with PHP8.2.5 and 7.3.10 successful. No Mail send:
can you try this short solution (from your kanboard-root folder) ? <?php
DEFINE('DS', DIRECTORY_SEPARATOR );
require_once __DIR__ . DS . 'data' . DS . 'config.php';
try {
$conn = new PDO("mysql:" .
"host=" . DB_HOSTNAME . "; " .
( DB_PORT != null ?: "port= ". DB_PORT ."; ").
"dbname=" . DB_NAME, DB_USERNAME, DB_PASSWORD);
$conn->exec("SET CHARACTER SET utf8"); // Sets encoding UTF-8
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "UPDATE `" . DB_NAME . "`.`users` SET `users`.`password`= :newpassword WHERE `users`.`username`='admin'";
$statement = $conn->prepare($sql);
$statement->bindValue(":newpassword", password_hash('admin', PASSWORD_DEFAULT));
echo $statement->execute();
unset($conn);
}
catch(PDOException $e) {
echo $e->getMessage();
} regards |
Beta Was this translation helpful? Give feedback.
-
You can also use Kanboard command line tool to reset the password, for example: For reference: https://docs.kanboard.org/v1/admin/cli/#reset-user-password |
Beta Was this translation helpful? Give feedback.
-
Thanks for this, was worried the app lacks support. |
Beta Was this translation helpful? Give feedback.
-
Checklist
Actual behaviour
using hashed password fails
password reset link fails
Expected behaviour
expected to be able to reset my admin password using the method described in issue 853
expected to reset password via password reset
link fails, nothing happens
Steps to reproduce
generate password hash
alter mysql table for user and add pass hash
or
request password reset.
Screenshots
Logs
tail
Configuration
Beta Was this translation helpful? Give feedback.
All reactions