OpenHabianPi password doesn't work anymore

Hey there,

I use the RaspberryPi 3 B+ with OpenHabianPi.
Since a week I can not log on with the login data openhabian:openhabian (neither SSH nor the Pi with monitor and keyboard). -> “Permission denied, please try again.”
I used the following command: $ ssh -l openhabian

I have already tried this manual, but I can not enter anything at Step 4:

The OpenHab system at itself still works fine, I just can’t edit the files (items, sitemaps, etc…) anymore.


Did you change the password for openhabian? If not, why do you think the problem is a changed password? Assuming you are right and the problem is the password somehow got changed on it’s own, you have far bigger problems. This would mean that:

  • your RPi has been hacked into and some malicious user has changed the password
  • you SD card became corrupted either because of a power loss or the SD card is wearing out.

The fact that you can’t use the linked to tutorial provides strong evidence for the latter.

Hi Rich

No, I didn’t change it. I thought it because I didn’t see any other reason why I shouldn’t be able to log in.
But do you have another idea why it might not work?


Given the evidence, I’d say that your SD card is either corrupted because of a power failure or it has worn out and the files necessary to log in properly are broken. You’re best bet would be to rebuild the SD card and restore from a backup. If you don’t have a backup, hopefully you can mount the SD card in another machine and copy off the files you need, hoping that they are not also corrupted.

Ok, I’ll try to restore the SD card from a backup (fortunately I have one).

1 Like

Same thing here! my password stop working just for the root
I use the same password for years and it is a complicate one…

I’ve try sudo -u openhabian passwd remotely on my cellphone with the SSH app juiceSSH and an error that I can’t reproduce today appear like an password engine not working or something like this…

But after I’ve reboot completely my raspberryPie I’ve been able to change the password through my ssh on MobaXterm

So It look like the engine that contrôle password stop working properly…

All this happen at the same time that my

on connection to my own raspbian stop working and still not working as today… Even if I renew applications but server is working and my events is logged on it…

But this is another subject… :roll_eyes:

I’m thing son to put back Amanda backup on it… with goodSync files backup

After another restart of openhabian (not raspberryPi) all services went finally back…

same thing happened to me… all of a sudden default openhabian:openhabian does not work, neither in ssh nor in monitor+keyboard…
what i had to do was follow this:

Power down and pull the SD card out from your Pi and put it into your computer.
    Open the file 'cmdline.txt' and add 'init=/bin/sh' to the end. This will cause the machine to boot to single user mode.
    Put the SD card back in the Pi and boot.
    When the prompt comes up, type 'su' to log in as root (no password needed).
    Type "passwd openhabian" and then follow the prompts to enter a new password.
    Shut the machine down, then pull the card again and put the cmdline.txt file back the way it was by removing the 'init=/bin/sh' bit.

The cmdline.txt should look something like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait init=/bin/sh

Note: Sometimes the password won't be able to be changed because the Pi will boot in a read-only mode. You'll get an error that you can't change the password. To fix this, remount the drive in read-write mode:

mount -o remount,rw /

If the remount fail and complain about PARTUUID, maybe your fstab is wrong, so use this:

mount -o remount,rw /dev/mmcblk0p2 /

that solved it… thoug i wonder why it happened all of a sudden

I also encountered this problem a few days ago. I had openhab and the Pi switched off since end of last year for boring reasons I won’t get into here) and recently switched it on. It failed to connect to the network and so eventually I hooked it up to a monitor and tried to login but while it did accept the username/password it then quickly went back to the login prompt…so essentially I couldn’t login…and I couldn’t ssh because it wouldn’t connect to the network. I did get some failed loading messages on boot up where normally I would expect OKs. In the end I had to download a new Openhabian image and will need to recreate from back ups, which is ok as I planned to pgrade to latest version on Openhab anyway.

To test the failing SD card theory I’ve used the same SD card and will let it run to see what happens. I’ll have backups so if it does fail I won’t be too bothered.

@Nomader your solution didn’t work for me for some reason, gave me kernel panic.