Page 1 of 1

Locked out, no root user?

Posted: Sun Feb 25, 2018 6:28 pm
by martjah
Hi,

I've been running Toon for 8 months now and it has been working great. But i've lost root access somehow overnight it seems. I wanted to download the latest .ics file for the waste calendar when i found out i've had no more access to Toon.
So, via serial and ssh it asks for a username and password. But i cannot login. I'm entering the correct password (100%).
Is there a way to reset the password file? Mayb via the ToonStore?

I'm not a Linux expert but i think something is wrong with the password file because of this message: chown: unknown user/group root:root

I've implemented the "maintain root access after update" but i've not updated Toon anymore after i wrote the manual (and tested it)
ridge firewalling registered
rtc-isl1208 1-006f: setting system clock to 2018-02-25 16:15:18 UTC (1519575318)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 117833728 bytes (115072 KiB, 112 MiB, 928 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
usb 2-1: new high speed USB device using mxc-ehci and address 2
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 104K
usb 2-1: New USB device found, idVendor=148f, idProduct=5370
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: 802.11 n WLAN
usb 2-1: Manufacturer: Ralink
usb 2-1: SerialNumber: 1.0
INIT: version 2.86 booting
(print_boot_msg)
Please wait: booting... (print_boot_msg)
* Kernel 2.6.36-R10-h27 (print_boot_msg)
* Firmware qb2/ene/4.4.21-1091-0 (print_boot_msg)
* Hostname eneco-001-192329 (print_boot_msg)
usbcore: registered new interface driver r871x_usb_drv
usbcore: registered new interface driver rt2870
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
Loading iptables settings: iptables.
(print_boot_msg)
Configuring network interfaces... (print_boot_msg)
Configuring network interfaces...
Running 'ifup -a' in the foreground (ifup-fg)

Re: Locked out, no root user?

Posted: Sun Feb 25, 2018 10:53 pm
by TheHogNL
First, you can always reset your password using the manual 'how to root the toon'. As you have just copy pasted the boot messages into the forum, I'm sure you have console access to your Toon. Just get into the u-boot and start the Toon from there (using the manual in the forum) and reset the password when you are in.

Second, I do like the idea of an app (Toon store maybe) which fixes a few common mistakes, like the password, iptables file, dropbear not running. If done right, this one should be self healing also (after a firmware upgrade, when toon store is disabled etc).

Re: Locked out, no root user?

Posted: Mon Feb 26, 2018 8:46 pm
by martjah
TheHogNL wrote:First, you can always reset your password using the manual 'how to root the toon'. As you have just copy pasted the boot messages into the forum, I'm sure you have console access to your Toon. Just get into the u-boot and start the Toon from there (using the manual in the forum) and reset the password when you are in.

Second, I do like the idea of an app (Toon store maybe) which fixes a few common mistakes, like the password, iptables file, dropbear not running. If done right, this one should be self healing also (after a firmware upgrade, when toon store is disabled etc).

thnx. it's working again. Don't know what went wrong.

i booted in U-boot and had a look at the passwd file, but it was empty (or non existing). But there was a "passwd-" file. I copied the content to /etc/passwd. (it had empty root password). After a reboot the crontab kicked in and replaced the file with my "backup" file just in case of an update and i could login with the original password.

Re: Locked out, no root user?

Posted: Thu Mar 01, 2018 10:43 am
by hafeez
martjah wrote:thnx. it's working again. Don't know what went wrong.

i booted in U-boot and had a look at the passwd file, but it was empty (or non existing). But there was a "passwd-" file. I copied the content to /etc/passwd. (it had empty root password). After a reboot the crontab kicked in and replaced the file with my "backup" file just in case of an update and i could login with the original password.
Had the same issue a few days ago.
Unable to logon anymore and when logged in via U-boot I noticed the passwd file was empty.
Not sure how because I have a cronjob at reboot which always copies a backup passwd file & iptables.conf to /etc/
Fixed it by manually copying my backup passwd