OpenHab2 password on Windows 7 Prof

I tired to install OpneHab2 on Windows 7. Installation went fine. But… having issues with login on to Karaf console. Tried all passwords mentioned in the web (habopen/karaf) nothing is working. Tried to reset the password at users. properties file. That is also not working. Unable to logon using the changed password. Can someone help me please?

Are you using the correct user?

Also, remember that you can only login to the Karaf console from the same host that you have installed OH2 on.
The ssh connection will fail if you try it over the network due to security settings (yes, you can change that but it’s not advisable to do so…)
Do you get a login prompt or not?

Try the following:
Download a SSH client on your Windows PC that is running OH2 (example: putty) and connect to (or the local IP) on tcp port 8101 with username openhab and password habopen

How? the password for the user openhab is saved in encrypted format in there :slight_smile:

By the way: when you start OH2 with start.bat you should get a Karaf console session… does that work?

Hello there, I know this post is quite old but I need support to reover my openhab password. My openhab is running on windows. I have followed the advise from the below page to recover the password but it doesn’t work, I keep getting the error message ‘login failed’.

I tried both, changing the file users.proterties manually as well as with the command line suggested in the webpage. I am thankful for any help.

Changing the Password
The password is stored in the file, located in the etc directory as mentioned above. By default, the line with the password contains the text openhab =, followed by the current password (e.g. habopen) or a password hash (e.g. {CRYPT}4AE1A0FD…{CRYPT}).

To change the authentication password edit the file manually, replacing the password or password hash (including {CRYPT}) with your new password in clear text. Alternately, run the following Linux shell command, which will perform the replacement for you. Substitute securePassword with your desired password.

sudo sed -i -e “s/openhab = .*,/openhab = securePassword,/g” /var/lib/openhab2/etc/
Depending on your system, you may have to change the directory at the end of the command. Please restart openHAB for the changes to take effect. The clear text password will be replaced by a unique cryptographic password hash.

post the contents of your current file to check it
make sure that the last 2 lines read:

openhab = somepass,_g_:admingroup
_g_\:admingroup = group,admin,manager,viewer,systembundles

Ps: The command line from the docs won’t work on your system (Windows)

Hi Angelos, thanks for the fast response… after the comment lines the following two lines exist:

openhab = {CRYPT}4F61A0FD056BC0FD8231899EC4D9F9CA06AF0DEC895B2A3B0773F6FBC1C99776{CRYPT},g:admingroup
g:admingroup = group,admin,manager,viewer,systembundles

I removed the encrypted code and replaced it with my password unencrypted. After restart of openhab it replaced my clear password with the crypted code as seen above.

But any attempt to get the UUID with the following code “sudo nano /var/lib/openhab2/uuid” returns the message “Error executing command: login failed”.


you are on a windows platform

most of these commands that you have seen work only in Linux (you are issuing a sudo command within the OH2 console)

to identify your UUID & secret on windows, simply find these 2 files on your C:\openHAB2\userdata folder (and subfolders) and open them with a text editor

The file is used to control access to the openHAB console

Hi Angelos,
I did not assume the command is not working on my OH2 console while the system requested me a password. I got your point, sudo is a linux/unix command. Thanks for your help, I found my uuid and secret file.

Best regards

Hi Ercan,

You are right. This is something strange that Apache Karaf console is doing (giving you a login error)

By the way: which instruction set are you following? (link to url plz) we need to make a note of that and update it since I have seen many users on Windows going through the same trouble (issuing sudo nano within the Karaf console)

Maybe this: ?