Quick and dirty? Thx.
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:
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:
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.
Most helpful comment
1) Generate a new password with the function
password_hash()from a PHP >= 5.5 shell:2) Replace the existing password in the database: