db.prepare(\"UPDATE users SET password_hash = ? WHERE username = 'admin'\")
.run('\$2b\$10\$YOUR_HASH_HERE');
db.close();
"
```
### 4. Verify Login
Open http://192.168.1.100:8080 and log in with:
- Username: `admin`
- Password: (your new password)
## Troubleshooting
### Check Current Admin User
```bash
docker exec meshmonitor node -e "
const Database = require('better-sqlite3');
const db = new Database('/data/meshmonitor.db');
console.log(db.prepare(\"SELECT * FROM users WHERE username='admin'\").get());
db.close();
"
```
### List All Users
```bash
docker exec meshmonitor node -e "
const Database = require('better-sqlite3');
const db = new Database('/data/meshmonitor.db');
console.log(db.prepare('SELECT id, username, is_admin, is_active FROM users').all());
db.close();
"
```
### Container Not Running
```bash
# On Proxmox host
pct exec 100 -- docker ps -a
pct exec 100 -- docker start meshmonitor
```
## Notes
- The `reset-admin.mjs` script generates random passwords; use direct DB update for specific passwords
- SQLite3 CLI is not installed in the container; use Node.js with `better-sqlite3`
- Password column is `password_hash` in the `users` table (lowercase)
- **Shell escaping gotcha:** Bcrypt hashes contain `$` characters (e.g., `$2b$10$...`) which get interpreted by the shell. Always use single quotes around the outer SSH command to preserve them, or generate the hash inside the container using `bcrypt.hashSync()` directly