Lost admin password

How can I retrieve or change admin password for openhab 3?
Can access ssh…

1 Like

Try if this works:

  • ssh into OH3 host
  • login to karaf console: openhab-cli console
    ( user is openhab; password is habopen )
  • use the users command ( just enter users to get the usage of the command )
  • use: users list
    to see which users with related roles are in use
  • with users changePassword
    you should be able to change the users password
9 Likes

Thank you so much! :grin:

How exactly do I do this?

What is the hostname for OH3 Host? Or what is it’s IP number and port number?

Thank you - Rowan

OH3 is the appliacation that is installed on host. The hostname does not depend on OH software.
That means the hostname depends on the OS resp. your configuration on the OS.

In case you use DHCP the IP can vary. Also the IP number depends on your local configuration.

But … you can check your router that normally deals with DHCP requests.
What you also can do is to use e.g. nmap software to discover all hostnames / IP addresses in your network.

The port that is to be used for the ssh connection is per standard 22.

OK. I’m beginning to understand. The next question is - how do I log into the karaf console: openhab-cli console? When I try to connect using PuTTY, I just get a prompt “login as:”. If I try to log in as user openhab, password habopen, it says access denied.

How do I do this?

Thank you - Rowan

  • first step is either to login to your OH host by using e.g. putty as ssh client ( others work as well ) or connect a monitor and keyboard to your OH host and login to the linux shell/console there - any user account would be sufficient
  • then run the command “openhab-cli console” in that user’s shell ( follow the description )

Thanks for your reply. As far as I can see, neither of these will work for me because I have no user account to use. Can I put the SD card into my Windows PC and modify some file in the root directory so that there is no password, or that I can set a new password? Note that I can’t access the main directory on the SD card because it is formatted in a way that Windows doesn’t understand. Unless there is some add-on that I can add to Windows so that it CAN read this partition?

Thank you - Rowan

If it is openhabian then there is the openhabian user. In case it is a different image there also must be a user account to be used.

no

Download a Linux life distribution that starts from USB.

But with all these questions … I have the impression it would be easier to install the image from scratch.

Thank you. Can can now get a command line via SSH so I can try some more steps.

Rowan

1 Like