Ghost 忘记密码怎么办?
找到ghost.db文件,大概率在一个data目录下:
使用sqlite3打开。sqlite3 ghost.db
如果没有sqlite3命令,使用pip install sqlite3
创建新的密码,可以使用node脚本, 执行前先安装npm install bcrypt:
import bcrypt from 'bcrypt';
const password = 'your_password';
const saltRounds = 10;
bcrypt.hash(password, saltRounds, (err, hash) => {
if (err) throw err;
console.log('生成的哈希:', hash);
});
获得新的加密后的密码。
使用sqlite命令更新id