Password reset/recovery?

  • Hello everybody,


    i have a problem with a LibreElec System on a Rpi 3.

    By a mistake the SSH Port was open :thumbdown: and any people has set a new password for the root user :dodgy:

    Give it a solution to recover or reset the password on the SD Card?

  • You can mount the second partition on the SD card from another Linux box (as it's ext4 and cannot be natively read from macOS or Windows) and remove /storage/.cache/shadow* .. then unmount, put the SD card back in the RPi and power on and the password should be back to the defaults again. At some point we need to add a reset function to the LE settings addon GUI..

  • It's been supported in the LE 9.0 codebase for about 8-months now. It needs exposing in the GUI but you can run 'passwd' from the console.

  • Code
    RPi4:~ # ls -l /storage/.cache/shadow 
    ----------    1 root     root           231 Apr 11  2019 /storage/.cache/shadow

    ^ nothing changed since we implemented the feature so the same procedure will still work. Note that you cannot do this from Windows as the storage partition is EXT4 and Windows cannot read EXT4 partitions; you'll only see the VFAT boot parition which does not contain the files. You can also set a new password from the LE settings add-on in the GUI so there's no real-world need to do this.