Kanboard: Q: How can I reset the admin pw?

Created on 7 May 2015  路  6Comments  路  Source: kanboard/kanboard

Quick and dirty? Thx.

Most helpful comment

1) Generate a new password with the function password_hash() from a PHP >= 5.5 shell:

$ php -a
Interactive shell

php > echo password_hash('admin', PASSWORD_DEFAULT);
$2y$10$i1VwOewr1H8NGHisJutM/eFkudRoFjWE2PaTIbEUsphDcbZXgsyG6

2) Replace the existing password in the database:

UPDATE users SET password='replace_me' WHERE username='admin';

All 6 comments

1) Generate a new password with the function password_hash() from a PHP >= 5.5 shell:

$ php -a
Interactive shell

php > echo password_hash('admin', PASSWORD_DEFAULT);
$2y$10$i1VwOewr1H8NGHisJutM/eFkudRoFjWE2PaTIbEUsphDcbZXgsyG6

2) Replace the existing password in the database:

UPDATE users SET password='replace_me' WHERE username='admin';

Thx a lot. I solved it in a similar way in the meantime. But this will help other as well, I am sure :dancer:

I don't have access to the interactive shell... (ovh serveur mutualis茅).
I have only one user (the admin user) and changed the default password, then forgot it :/
I copied db.sqlite from my web server to my local drive.
Renamed server/db.sqlite > db.sqlite_old
Used SQLite DataBase Browser to execute this query:

  • UPDATE users SET password='' WHERE username='admin';

Then saved the change and upload the modified db.sqlite to my server.
But I can't login, the password input needs a value :/

Second try:

  • UPDATE users SET password='azerty' WHERE username='admin';

Still have a "Identifiant ou mot de passe incorrect"
How can I change admin password ?
Do I have to reinstall everything ?

The password is hashed -> php password_hash()

You could generate a password hash or use the default one in your db update $2y$10$i1VwOewr1H8NGHisJutM/eFkudRoFjWE2PaTIbEUsphDcbZXgsyG6

UPDATE users SET password='$2y$10$i1VwOewr1H8NGHisJutM/eFkudRoFjWE2PaTIbEUsphDcbZXgsyG6' WHERE username='admin';

Great ! It's ok ! Thank you !

What do you do if you have PHP 5.3.3 and the function password_hash return "PHP Fatal error: Call to undefined function"?

Forgot the admin password.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ConsultorML picture ConsultorML  路  4Comments

dlocke picture dlocke  路  7Comments

vova-deep picture vova-deep  路  5Comments

stertingen picture stertingen  路  3Comments

jaiume picture jaiume  路  7Comments