Open RyansSohn opened 6 months ago
I have the same problem. This is a bit basic, I am sure there must be a way.
Any help appreciated - including instruction on how to wipe out bookstack and start fresh.
Partially answering myself:
from HASS shell, you can get into the Bookstack add-on container:
List containers:
docker ps | grep bookstack
Grab the id from that list and use it in this next command:
docker exec -it 9515ff3014a0 bash
From inside that new shell, you can go ahead and
php artisan bookstack:create-admin --email="admin@admin.com" --name="Admin" --password="password"
That did not work for me, but I am not sure why, and maybe it's specific to my installation, so for you, at least it's worth a try...
Back outside the docker container, in the main HASS shell, you can also...
Enter the database:
mysql
And use SQL commands like
use bookstack; show tables; select user, password from users;
Passwords will be hashed, of course. You can also use an SQL UPDATE to add your own password, get the hash from here: https://bcrypt-generator.com/
same problem here, no chance to get it fixed, reinstalling bookstack didn't help. So thanks for that plugin but without a chance to easily set/reset users/passwords from within the config page in HA it is useless...
@bhofmann are you aware that there is a default user name and password, did you try those?
I find it strange that you wrote that reinstalling bookstack didn't help...
Sure, I have tried this first and I expected that at least with deleting the add-on or integration and reinstall might fix this all, so I could start from scratch, but no, it seems that some things, maybe the mysql tables for book stack didn't get deleted and will be reused after a complete new install.
Ah ok.
And did you try the solution going through docker that I posted above?
Partially answering myself:
from HASS shell, you can get into the Bookstack add-on container:
List containers:
docker ps | grep bookstack
Grab the id from that list and use it in this next command:
docker exec -it 9515ff3014a0 bash
From inside that new shell, you can go ahead and
php artisan bookstack:create-admin --email="admin@admin.com" --name="Admin" --password="password"
That did not work for me, but I am not sure why, and maybe it's specific to my installation, so for you, at least it's worth a try...
Back outside the docker container, in the main HASS shell, you can also...
Enter the database:
mysql
And use SQL commands like
use bookstack; show tables; select user, password from users;
Passwords will be hashed, of course. You can also use an SQL UPDATE to add your own password, get the hash from here: https://bcrypt-generator.com/
Thank you! the sql edit worked for me!
reinstalling bookstack didn't help
It will not help because bookstack uses the MariaDB database to store username/ password information. If you want to start from scratch you need to fully remove and reinstall MariaDB as well (beware if Maria DB is also your DB engine for Home Assistant).
From inside that new shell, you can go ahead and
php artisan bookstack:create-admin --email="admin@admin.com" --name="Admin" --password="password"
That did not work for me, but I am not sure why, and maybe it's specific to my installation, so for you, at least it's worth a try...
This needs to be run from /var/www/bookstack which is where the artisan application is mapped to in this instance.
Problem/Motivation
Hi, I forgot my email and my password. I did some research about how to change the admin password in bookstack, but there is no solution for bookstack as an add-on in homeassistant. There is an official post of bookstack, where they explain, that you can create a new admin account with a command, but you can't use this command in the homeassistant terminal. (https://www.bookstackapp.com/docs/admin/commands/) Can somebody help me? Maybe you just need to convert the command to use it in the homeassistant terminal, but I don't know how.
Maybe this helps? https://www.reddit.com/r/BookStack/comments/15au2ru/forgot_email_and_password/
Expected behavior
you now the password and email
Actual behavior
you forgot password and email
Steps to reproduce
nothing
Proposed changes