fix: Correctly set admin password hash in databases

Problem:
- Hash generation failed (src/bin directory did not exist)
- PostgreSQL admins.password was empty
- SQLite sftpgo_admins.password_hash was empty

Solution:
- Created src/bin directory
- Generated bcrypt hash using cargo run --bin gen_hash
- Updated both databases with correct hash (60 chars)
- Restarted server to refresh cache

Test result:
 Admin login returns valid token
 Token expires in 24 hours

Password: admin123
Algorithm: bcrypt (DEFAULT_COST=10)

Files updated:
- PostgreSQL: admins.password
- SQLite: data/auth.sqlite (sftpgo_admins.password_hash)
This commit is contained in:
Warren
2026-05-16 23:22:49 +08:00
parent 013acef5d4
commit 3fcfaa6aab

Binary file not shown.