Bart Simons

Bart Simons


Thoughts, stories and ideas.

Bart Simons
Author

Share


Tags


.net .net 5 .net core Apache C# CentOS LAMP NET Framework Pretty URLs Windows Server WireGuard WireGuard.io access log add analysis android api at the same time authentication authorization automate automation azure azurerm backup bash basics batch bootstrap build capture cheat sheet chromium chroot class cli click to close code coverage code snippet command line commands compile compiling compression containers control controller controlling convert cpu usage create credentials csv csvparser curl data dd deployment desktop detect devices disable diskpart dism distributed diy docker dom changes dotnet core drivers ease of access encryption example export file transfer files fix folders framework generalize getting started ghost ghost.org gui guide gunicorn gzip html html tables icewarp igd imagex import inotify install installation interactive ios iphone itunes java javascript jquery json kiosk kotlin linux live load data loading screen lock screen loopback audio lxc lxd lxml macos manage manually message messages minio mirrored mod_rewrite monitor monitoring mstest mutationobserver mysql net 5 nexmo nginx no oobe node node.js nodejs not installing notification notifications object storage on desktop one command openssl owncloud parallels parallels tools parse perfect philips hue play port forwarding portainer.io powershell processing ps-spotify python quick raspberry pi record rip ripping rsync rtmp save save data sbapplication scraping script scripting scriptingbridge scripts security send server service sharedpreferences sms songs sonos spotify spotify api spotlight ssh stack streaming streamlink studio sudo swarm swift sync sysprep system audio systemd tables terminal testing tracking tutorial twilio ubiquiti ubuntu ubuntu 18.04 ui code unifi unlock unsplash source upnp uptime usb tethering wallpapers wasapi website websites webview windows windows 10 without itunes without oobe workaround xaml

Unlock a Ghost blog account

Bummer! You've just locked yourself out of your Ghost blog account, right? Well, it happened to me a while ago after I've mistyped my password 5 times. Could happen to anyone, right? Here's a nifty little trick that may help you if you don't want to go to the process of resetting your password and/or if you want to keep your current password.

First things first: you need to have access to a shell on your server. I use SSH for that. Once you have shell access to your server: stop all possible Ghost processes. This is important, because you don't want to modify a database that's active and/or in use!

If you use SQLite as your database backend (it's the standard setting, so if you don't know what database backend you have, use this) you need some sort of a SQLite client. You can install one via apt-get:

sudo apt-get install sqlite3

Navigate to your ghost.db file, you can find this file within the content/data folder inside your Ghost installation path. Then, execute this command to enter into a SQL shell:

sudo sqlite3 ghost.db

Now, the only thing you need to do yet is updating the status of your account. Execute this inside the SQL shell:

update users set status = "active" where "slug" = "insertyourusernamehere";
.exit

Start your Ghost instance again, and voila: you can login again!

In case if you are using any other SQL-compatible database to run your Ghost blog: just execute the query inside the correct database and you will be able to login as well.

Bart Simons
Author

Bart Simons

View Comments