Changing OpenELEC's Root Password - Step By Step

OpenELEC's default root password is "openelec" and you can't really change that, because OpenELEC's root filesystem is mounted read-only. At least that's what their official FAQ says.

Well, that's only the half truth. OpenELEC's rootfs is stored in a squasfs image called "SYSTEM". You are free to unpack its rootfs, change some settings and re-pack it again.

The following guide will show you how to change the root password with the help of Debian GNU/Linux or *buntu.

First step: Install squashfs-tools:

# apt-get install squashfs-tools

Second step: Copy your squashfs-image "SYSTEM" to your preferred workspace:

$ cp /media/sdcard-mountpoint/SYSTEM /tmp/myworkspace

Third step: Unpack OpenELEC's squashfs-image:

$ cd /tmp/myworkspare
$ unsquashfs SYSTEM

OpenELEC's rootfs is now open for any possible modification.

Fourth step: Generate a brand new root password:

$ mkpasswd -m sha-512
Password: [type your password here]
$6$[very long sha-512 hash appears here]

Fifth step: Replace the root password hash in your /tmp/myworkspace/sqashfs-root/etc/shadow with the whole line mkpasswd has created.

Example /tmp/myworkspace/sqashfs-root/etc/shadow:

Sixth step: Re-build the rootfs

# mksquashfs squashfs-root/ -comp lzo

Final step: Copy your new rootfs back to the SD card:

$ cp /tmp/myworkspace/ /media/sdcard-mountpoint/SYSTEM

0 Comments Mar 25, 2016 share to diaspora*