I’ve started testing new Ghost blogging platform for a while on a virtual machine before I take decision about switching to it (or maybe won’t)… After few days, I wanted to go forward with more testing and stuck on “e-mail and password” login prompt 🙂
I’ve started looking into files and found ghost_dir/content/data/ghost-dev.db SQLite database. It can be opened like that:
Then you could see whats your mail (and other info):
sqlite> select * from users
Now password – after searching a little I found: ghost_dir/core/server/models/user.js file. There is a tip in it:
// Hash the provided password with bcrypt return nodefn.call(bcrypt.hash, _user.password, null, null);
So I used this site: http://bcrypthashgenerator.apphb.com/ to generate bcrypt hash and updated it in DB:
sqlite> update users set password="$2a$10$f29LDrB8S1JMfdF40Vmf1.h2OyhtlcefaMrFQVpHeX9XQ7Xiq17KC" where id = 1; sqlite> .quit
Additionally as suggested by henshao: if the account has been locked, you can set status to active to unlock the account, like that:
update users set status = “active”;
Now try to log with updated credentials.
P.S. I strongly suggest to change password after successful login.