From dad2010ad827d705b06b5e51e6d2b647a5c2a505 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 14 Mar 2021 00:07:47 +1100 Subject: [PATCH] Updated troubleshooting (markdown) --- troubleshooting.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/troubleshooting.md b/troubleshooting.md index 7516ecf..5dca620 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -10,3 +10,27 @@ Try again. There are timing issues between the different containers that I still If you just upgraded the template, try checking if any changes to the sequelize models have occurred. If so, you'll have to go into the mariaDB container and alter the database directly. +## I accidentally removed all admin privileges, and now I can't login! + +When there are 0 accounts with administrator privileges, the auth-server will try to create the default admin account (if details for it have been specified) and when it fails, it crashes. You'll have to mess with the system's database to fix it. + +Run the following command on the same machine as the database container: + +``` +docker exec -it bash +``` + +This will open a bash program inside the container. From here, you can access mariaDB and alter the database: + +``` +mysql -u root -p +``` + +Enter the root password, then run the following commands to restore the admin privileges: + +``` +USE auth; +UPDATE accounts SET privilege = 'administrator' WHERE username = 'admin'; +``` + +Then just keep typing "exit" to exit the program. This assumes that you want to restore privileges to the "admin" account - you can of course grant it to whoever you need to. \ No newline at end of file