Baikal: How to revover or reset password

Created on 10 Feb 2014  ·  8Comments  ·  Source: sabre-io/Baikal

It seems like I lost my password, how can I either set a new one or recover the old one?

question

Most helpful comment

Another solution:
you can get the defined auth realm in Specific/config.system.php :
then

php -r 'echo md5("admin:the_auth_realm_string:your_new_password');'
and put the result at the end off Specific/config.php file. (in the BAIKAL_ADMIN_PASSWORDHASH define)

All 8 comments

Danger: no guarantees ... this worked for me, it might not work for you!

I assume you are talking about the Baïkal admin password. The hash of the admin PW is stored at the end of _Specific/config.php_. What worked for me was to delete the config file and re-do the configuration step:

cd /your/install/location/Specific
mv config.php config.php.old
touch ENABLE_INSTALL

and then navigate to

http://yourbaikal.example.com/admin

This should bring up the installation/configuration dialog which also allows to set a new admin PW. When I tried this my SQLite DB file in _Specific/db/db.sqlite_ was untouched, i.e. all the data was still there ...

... anyway, make a backup first!

Cheers
-Andi

Another solution:
you can get the defined auth realm in Specific/config.system.php :
then

php -r 'echo md5("admin:the_auth_realm_string:your_new_password');'
and put the result at the end off Specific/config.php file. (in the BAIKAL_ADMIN_PASSWORDHASH define)

Thanks !

Maybe this could be added to the documentation?

@ftoledo Thank you. However for it to work I had to change the single quotation mark after the new password to a double quotation mark. The default auth-realm-string was "BaikalDAV". So for future reference:
php -r 'echo md5("admin:BaikalDAV:your_new_password");'

HI here thanks for the advice
I have lost my baikal admin password
but I m unable to find the location of the file to be modified, I have a yunohost environnement
could you please help me here?

@niouniou49 I'm sorry, I don't use baikal at this time.
this is a old issue, maybe this workaround can not be apply to newest source code.
Saludo!

In Baikal 0.7.2 (don't know in which version the hash changed) the SHA256 Algorithm is used. The config file is located in config/baikal.yaml since 0.7.0.

So to regenerate a hash you need to do
php -r 'echo hash("sha256", "admin:the_auth_realm_string:your_new_password');'

and enter the hash in config/baikal.yaml

Was this page helpful?
5 / 5 - 1 ratings