[GH-ISSUE #1555] Unable to log in as admin, even after a successful and verified manual password reset. #975

Closed
opened 2026-03-02 11:54:05 +03:00 by kerem · 4 comments
Owner

Originally created by @bigZos on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1555

Describe the Bug

I am completely locked out of my Karakeep admin account (myemail@example.com). When I try to log in, it says "Incorrect username or password," even though I am certain the password is correct (it's saved in my password manager).

Steps to Reproduce

  1. Attempt to log in as myemail@example.com with the correct password. Login fails.
  2. Follow the official FAQ procedure for a locked-out administrator.
  3. Enter the running container with docker compose exec web sh.
  4. Install sqlite with apk add sqlite.
  5. Connect to the database with sqlite3 /data/db.db.
  6. Run the official SQL command to reset the password: update user set password='$2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa' where email='myemail@example.com';
  7. Verify the change: Run SELECT password FROM user WHERE email = 'myemail@example.com';
  8. Verification result: The command correctly returns the new hash ($2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa), confirming the database was updated successfully.
  9. Restart the container with docker compose restart web.
  10. Attempt to log in again as myemail@example.com with the new password adminadmin.

Expected Behaviour

After manually updating the password hash in the database and verifying that the change was written correctly, I expect to be able to log in with the new password (adminadmin).

The login still fails with an "Incorrect username or password" error, even though the database contains the correct password hash.

Screenshots or Additional Context

No response

Device Details

No response

Exact Karakeep Version

Karakeep v0.24.1

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @bigZos on GitHub (Jun 7, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1555 ### Describe the Bug I am completely locked out of my Karakeep admin account (myemail@example.com). When I try to log in, it says "Incorrect username or password," even though I am certain the password is correct (it's saved in my password manager). ### Steps to Reproduce 1. Attempt to log in as myemail@example.com with the correct password. Login fails. 2. Follow the official FAQ procedure for a locked-out administrator. 3. Enter the running container with docker compose exec web sh. 4. Install sqlite with apk add sqlite. 5. Connect to the database with sqlite3 /data/db.db. 6. Run the official SQL command to reset the password: update user set password='$2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa' where email='myemail@example.com'; 7. Verify the change: Run SELECT password FROM user WHERE email = 'myemail@example.com'; 8. Verification result: The command correctly returns the new hash ($2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa), confirming the database was updated successfully. 9. Restart the container with docker compose restart web. 10. Attempt to log in again as myemail@example.com with the new password adminadmin. ### Expected Behaviour After manually updating the password hash in the database and verifying that the change was written correctly, I expect to be able to log in with the new password (adminadmin). The login still fails with an "Incorrect username or password" error, even though the database contains the correct password hash. ### Screenshots or Additional Context _No response_ ### Device Details _No response_ ### Exact Karakeep Version Karakeep v0.24.1 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:54:05 +03:00
Author
Owner

@MohamedBassem commented on GitHub (Jun 7, 2025):

Hey, there was a change in the last release that broke this docs. The docs is fixed in the unreleased version here: https://docs.karakeep.app/next/FAQ#lost-password

Basically, there's a small change in the reset query to also reset the salt.

<!-- gh-comment-id:2952700988 --> @MohamedBassem commented on GitHub (Jun 7, 2025): Hey, there was a change in the last release that broke this docs. The docs is fixed in the unreleased version here: https://docs.karakeep.app/next/FAQ#lost-password Basically, there's a small change in the reset query to also reset the salt.
Author
Owner

@bigZos commented on GitHub (Jun 7, 2025):

Hi, thanks for the updated command. Unfortunately, the password reset is still not working.

I followed the new procedure exactly. I can verify the database write was successful, but the login still fails.

What I did:

Ran the command: update user set password='$2a$10$...', salt='' where email='myemail@example.com';

Immediately verified the result with: SELECT password, salt FROM user WHERE email = 'myemail@example.com';

The output correctly showed the new password hash and an empty salt:

$2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa|
After restarting the container, login with the password adminadmin still fails with "Incorrect username or password".

This seems to confirm the database is being updated correctly, but the application's authentication logic is not verifying the new password properly.

<!-- gh-comment-id:2952724718 --> @bigZos commented on GitHub (Jun 7, 2025): Hi, thanks for the updated command. Unfortunately, the password reset is still not working. I followed the new procedure exactly. I can verify the database write was successful, but the login still fails. What I did: Ran the command: update user set password='$2a$10$...', salt='' where email='myemail@example.com'; Immediately verified the result with: SELECT password, salt FROM user WHERE email = 'myemail@example.com'; The output correctly showed the new password hash and an empty salt: $2a$10$5u40XUq/cD/TmLdC0yZ82ePENE6hpkbodJhsp7.e/BgZssU05DDTa| After restarting the container, login with the password adminadmin still fails with "Incorrect username or password". This seems to confirm the database is being updated correctly, but the application's authentication logic is not verifying the new password properly.
Author
Owner

@naimo84 commented on GitHub (Nov 10, 2025):

@bigZos: I've exactly the same problem currently. can you please tell me, what was the fix on your side? as you closed the issue 👍

<!-- gh-comment-id:3512118930 --> @naimo84 commented on GitHub (Nov 10, 2025): @bigZos: I've exactly the same problem currently. can you please tell me, what was the fix on your side? as you closed the issue 👍
Author
Owner

@naimo84 commented on GitHub (Dec 9, 2025):

For future users: I had to set the DATA_DIR env var to the directory, where my db.db lies.
https://docs.karakeep.app/development/setup/#first-setup

I don't know, why or when it happened, that it created the DB in the others folders /app/apps/web ...

Image
<!-- gh-comment-id:3631277035 --> @naimo84 commented on GitHub (Dec 9, 2025): For future users: I had to set the DATA_DIR env var to the directory, where my db.db lies. https://docs.karakeep.app/development/setup/#first-setup I don't know, why or when it happened, that it created the DB in the others folders /app/apps/web ... <img width="927" height="135" alt="Image" src="https://github.com/user-attachments/assets/8603d06f-0078-4dbb-b590-0f5ee0ba230a" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#975
No description provided.