Can't get login-password-less working with SQLite file
Closed this issue · 6 comments
I used the docker compose and adminer is working. I am now trying to open an sqlite db file which does not have a password. I also cannot set a password on it because it is the database used by my home automation software Home Assistant. It creates a db file as root without password. I've read all documentation but perhaps I'm misunderstanding something.
I still get the error below in the container log
It creates an empty file called 001-login-password-less.php in the folder. However I have the correct file created as below with the contents per the instructions.
Remove the plugin from the environment variable ADMINER_PLUGINS
. The environment variable is just for autoloading parameter-less plugins, it basically creates the file for you, instead you doing it manually.
Also: the hash you put there is not a valid hash. You'll need a BCrypt hash (or Argon2).
Thank you for the quick response! I removed it from the environment variable and changed the hash. But still not luck. No errors in the console.
This is now the contents of "login-password-less.php" in "plugins-enabled" folder.
<?php
require_once('plugins/login-password-less.php');
/** Set allowed password
* @param string result of password_hash
*/
return new AdminerLoginPasswordLess(
$password_hash = password_hash("", PASSWORD_BCRYPT)
);
Did you try with an actual password, instead of the empty string?
That worked! I tried it before but was still when I used md5 hash 😄 Thanks...
Before you close this could I ask how to install other plugins/customization since the docker version works a little different? Like how would I get this working; https://github.com/natanfelles/adminer-bootstrap-like
Before you close this could I ask how to install other plugins/customization since the docker version works a little different? Like how would I get this working; https://github.com/natanfelles/adminer-bootstrap-like
That specific one will quite a bit of effort, because it consists of multiple files, some of which need to be served as static files from the file system, so I'm afraid there's no simple answer here.