tracker: add -changepw to change a user passphrase

Mirrors -adduser: prompts for a new passphrase (min 8 chars) or reads
TRACKER_PASSWORD, hashes with bcrypt, and updates the stored hash.
Returns an error if the user does not exist.
This commit is contained in:
2026-09-23 07:40:14 -07:00
parent 955de9d2f1
commit bbedaa548e
3 changed files with 76 additions and 0 deletions
+2
View File
@@ -23,6 +23,8 @@ go build -o tracker .
```
Non-interactive variant: `TRACKER_PASSWORD=... ./tracker -adduser kyle`.
Change an existing user's passphrase the same way:
`./tracker -changepw kyle` (or `TRACKER_PASSWORD=... ./tracker -changepw kyle`).
Defaults: listens on `:8420` (all interfaces, so it's reachable over Tailscale),
database at `~/.local/share/tracker/tracker.db`.