Hello,
after I updated to openHAB 3.0 and the LogViewer is gone I am looking for an elegant way to get logging information.
But first of all a big praise to the maintainers. The release is incredible and the update worked smoothly. Good job
My idea was to use VS-Code to connect to the Karaf-Console to see the logs. After doing the steps as described in âBind Console to All Interfacesâ (The Console | openHAB), I wanted to change the password of the user âopenhabâ. The described steps âChanging the Passwordâ (The Console | openHAB) do not seem to work for me. I can still login with the default password âhabopenâ.
I have already tried the following variants:
Changing the password via the script sudo sed -i -e "s/openhab = .*,/openhab = securePassword,/g" /var/lib/openhab2/etc/users.properties
Manually changing the password with VI
manual changing with a plaintext password
manual changing with an encrypted password between {CRYPT} with echo -n SecurePassword | sha256sum
changing the password using the OpenHABian configuration tool - menu 30 (System settings) --> menu 34 (Change passwords) --> menu 2 (openHAB Console)
All of the above attempts resulted in me not being able to log in with my new password but still with the old password. The hash in /var/lib/openhab2/etc/users.properties is not regenerated after reboot and login.
Itâs not gone. There are a bunch of threads about it. Depending on how you updated it might be looking for the log files in the wrong place. LogViewer has always been a separate program completely separate from OH.
Apparently thatâs one of the many places I expect that didnât get updated in the docs. openHAB moved. Itâs now /var/lib/openhab/etc/users.properties.
Without seeing exactly what you did in your other steps probably not. About all I can offer with the information provided is make sure you are editing the right file in the right folder.
Beyond that youâll need to most far more details on what youâve done.
Thank you for your reply. Regarding the LogViewer Iâll take a look at the threads.
I used the path suggested by you for setting the password. And lo and behold I can no longer log in with the old password. Now I have the problem that I can not log in even with the new password. Although I have restarted the system several times.
My password consists of 20 characters without numbers and special characters.
The /var/lib/openhab/etc/users.properties file now looks like this:
It looks like the password is not encrypted automatically.
When I try to log in I always get the following message
[11:08:23] openhabian@openHABianPi:~$ sudo openhab-cli console
[sudo] Passwort fĂŒr openhabian:
Logging in as openhab
Password:
Password:
No more authentication methods available
Do I need to change anything else? Doesnât the password of the âopenhabâ user have to be changed to in the operating system? What details do you need to help me?
I solved the problem. It seems that the hash is no longer automatically regenerated.
If I hash the password beforehand with âecho -n SecurePassword | sha256sumâ and pass the output value inside the {CRYPT} tag at the command it works.