docs: 新增 NPM 管理員密碼重設腳本

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 09:14:11 +08:00
parent af4893c0f4
commit 1cb06f9b8c

15
reset_npm_password.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# 重設 Nginx Proxy Manager 管理員密碼為 changeme
# 登入後請立即修改密碼
# 預設帳號: admin@example.com / changeme
sudo docker exec nginxproxymanager /opt/certbot/bin/python3 -c "
import sqlite3
conn = sqlite3.connect('/data/database.sqlite')
c = conn.cursor()
new_hash = '\$2b\$13\$KMga1dMEtMFLFxJOq3iXBOwWbCFHE5NkvQ3Oeos0MAfvsKVdqGJWy'
c.execute('UPDATE auth SET secret=? WHERE id=1', (new_hash,))
conn.commit()
print('Password reset done. Rows affected:', c.rowcount)
conn.close()
"