Rooting Toon (or boxx)

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Rooting Toon (or boxx)

Postby elmex » Mon Oct 14, 2019 9:05 pm

:mrgreen:
TheHogNL wrote:
elmex wrote:oh man.. harstikke bedankt.
dus gebruik toonrooter,wachten totdat 'INFO:rooter:Your Toon is now rooted. Please wait for it to boot up and try to log in using SSH' wordt weergegeven.
Vanaf dat moment moet ik de toon via ssh benaderen en dan de opgegeven wachtwoord hiervoor gebruiken.
:shock: ..


Ja precies :D Zo makkelijk is het dus eigenlijk. Maar je hebt vast in die drie dagen veel geleerd :D


ja..nu de volgende uitdaging..het verder configen..wifi enzo :o
nogmaals bedankt voor de snelle antwoord
elmex
Starting Member
Starting Member
 
Posts: 4
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby TheHogNL » Mon Oct 14, 2019 9:08 pm

elmex wrote:ja..nu de volgende uitdaging..het verder configen..wifi enzo :o
nogmaals bedankt voor de snelle antwoord


Wifi doe je gewoon op het scherm zelf op de normale Toon manier.
De eerste stap na rooten is eigenlijk het aanpassen van allerlei settings zodat je Toon vrij wordt gemaakt van Eneco. Dat dat je met het update-rooted.sh script met optie -f (zoals in de manual topic staat beschreven https://www.domoticaforum.eu/viewtopic. ... 235#p82533 )
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

Re: Rooting Toon (or boxx)

Postby johan3958 » Tue Oct 29, 2019 10:08 am

Hi everyone,
I have been able to root my Toon (I think), yet I did not expect a password requist after logging in with "root" (see below).
I did have some trouble restarting the firewall (ig iptables), could there be a relation?

Johan



udhcpc: sending discover
rLease failing, already running in bg: udhcpc -b -R -i wlan0 -A 5 -p /var/run/udhcpc.wlan0.pid -H eneco-001-166361
udhcpc: no lease, forking to background
oot
Password:
Login incorrect
eneco-001-166361 login: root
Password: Rcv Wcid(1) AddBAReq
Start Seq = 00000000
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:10, irq=-1)

Login incorrect
eneco-001-166361 login: root
Password:
Login incorrect

Eneco Toon by Quby
johan3958
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby mAiden » Tue Oct 29, 2019 1:55 pm

johan3958 wrote:Hi everyone,
I have been able to root my Toon (I think), yet I did not expect a password requist after logging in with "root" (see below).
I did have some trouble restarting the firewall (ig iptables), could there be a relation?

Johan



udhcpc: sending discover
rLease failing, already running in bg: udhcpc -b -R -i wlan0 -A 5 -p /var/run/udhcpc.wlan0.pid -H eneco-001-166361
udhcpc: no lease, forking to background
oot
Password:
Login incorrect
eneco-001-166361 login: root
Password: Rcv Wcid(1) AddBAReq
Start Seq = 00000000
eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:10, irq=-1)

Login incorrect
eneco-001-166361 login: root
Password:
Login incorrect

Eneco Toon by Quby


The easiest way is to get back into your u-boot again.
then edit this file agian: /etc/passwd
If you want 'toon' as youre password, you can use also this command:

Code: Select all
sed -i 's/root:[^:]*/root:FTR0zlZvsHEF2/' /etc/passwd


I borrowed the command from the tsc settings, thanks Thehog! :)
mAiden
Member
Member
 
Posts: 258
Joined: July 2017

Re: Rooting Toon (or boxx)

Postby johan3958 » Tue Oct 29, 2019 3:46 pm

Oh that simple!
thanks mAiden, I'll try it this evening!
Johan
johan3958
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby TheHogNL » Tue Oct 29, 2019 4:21 pm

How did you root your toon? If you use the toonrooter script you probably missed the generated password in the few last lines of the output of the script.
If you did it manually, you should have known the root password yourself :)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

Re: Rooting Toon (or boxx)

Postby yjb » Tue Oct 29, 2019 4:29 pm

Are you sure the password gets stored in /etc/passwd? I honestly believe it will need to go into /etc/shadow.
yjb
Member
Member
 
Posts: 188
Joined: April 2009
Location: Venhuizen, Netherlands

Re: Rooting Toon (or boxx)

Postby TheHogNL » Tue Oct 29, 2019 5:52 pm

yjb wrote:Are you sure the password gets stored in /etc/passwd? I honestly believe it will need to go into /etc/shadow.


That is for the toon2. The toon1 still uses the /etc/passwd location.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

Re: Rooting Toon (or boxx)

Postby johan3958 » Tue Oct 29, 2019 8:52 pm

I should have done this in summertime....


I don't know how, but something is emtying my /etc/passwd file at startup.
Hence by the time I have to login, there is nothing to rely on, login failure.

To get at this point I tried everything, amongst others ToonRooter (that got stuck in an early phase, tried sereral times, things were broken already probably).

How can I get my /etc/passwd filled with data?

Johan
johan3958
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby TheHogNL » Tue Oct 29, 2019 9:00 pm

Please explain your steps because it is unclear to me.

By the way a normal toon1 passwd file (with root password 'toon') has this content:

Code: Select all
root:FTR0zlZvsHEF2:0:0:root:/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
News:*:9:9:News:/var/spool/News:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

Re: Rooting Toon (or boxx)

Postby johan3958 » Tue Oct 29, 2019 9:20 pm

oke,

I started with the tutorial for the raspberrypi (rpi zero w)
JTAG, minicom, openocd telnet.
That did not go as planned, anyway somehow I have the "8" version u-boot installed and the known password works.
changed the files as marcel suggested. Tried to install dropbear, succeeded partially, that is, I have an SSH connection over wifi with loginprompt. this works apart from the password part.
This evening I typed the /etc/passwd code, like you posted (with root: xxxxx: and without root:: ).
restarted serveral times, but everytime the file is empty by the time I have to login.

Yours Johan
johan3958
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby TheHogNL » Tue Oct 29, 2019 9:53 pm

How do you know your passwd file is empty during the login prompt? You need to login to check that :-)

When you modified the passwd file, how did you reboot the toon? You never should power cycle the toon just after changing a file as that makes the file empty after boot. On a toon1 you type /etc/init.d/reboot
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

Re: Rooting Toon (or boxx)

Postby johan3958 » Tue Oct 29, 2019 10:09 pm

TheHogNL...

you are my hero!
I'm in. I don't understand half of what you're all saying, yet it works.
:) :) :)
your reboot trick did it aparently.


Keep on the good work!

Thank you all,

Johan
johan3958
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Rooting Toon (or boxx)

Postby Knol010 » Sat Nov 16, 2019 9:07 am

Yesterday I've rooted my Toon with ToonRooter script. Now I want to change the root password but I don't know how.
The command passwd in a root shell doesn't work.
Does someone knows the trick?
Knol010
Starting Member
Starting Member
 
Posts: 6
Joined: November 2019

Re: Rooting Toon (or boxx)

Postby TheHogNL » Sat Nov 16, 2019 3:24 pm

Knol010 wrote:Yesterday I've rooted my Toon with ToonRooter script. Now I want to change the root password but I don't know how.
The command passwd in a root shell doesn't work.
Does someone knows the trick?


Run the command
Code: Select all
/usr/bin/openssl passwd -crypt yourpassword


To create the crypted version of your password and then put it in the right place in the /etc/passwd file (or on a toon2 /etc/shadow)

Or with a simpel oneline:

Code: Select all
PASS='mypassword' ; CRYPTPASS=`/usr/bin/openssl passwd -crypt $PASS` ; sed -i "s#root:[^:]*#root:$CRYPTPASS#" /etc/shadow


Change the mypassword by your password and leave the rest.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1237
Joined: August 2017

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest