Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

gogo
SamyGO Project Donor
Posts: 185
Joined: Sat May 17, 2014 9:24 am
Location: Croatia

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by gogo »

sectroyer wrote:
gogo wrote:Why this command don't work?

umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
because you are not using latest stuff :) As a result your /mtd_rwarea/passwd is not mounted. You can check it by running:

Code: Select all

mount
This is then unnecessary.
It is enough only:
rm /mtd_rwarea/passwd
Samsung TV: UE46F6500
User avatar
mmhorda
SamyGO Project Donor
Posts: 152
Joined: Tue Jan 25, 2011 11:23 am

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by mmhorda »

I didn't really find out what should we do for D series.
Coud you please help?
Thanks
TV: LE40C750 - T-VALDEUC 3011.0
TV: UE40D6100 - T-GAS6DEUC 1026.0
TV: UE50ES6300 - T-MST10PDEUC 1042.0
NAS: MyBookLive 3Tb - Core F/W 02.43.03-022
miksi
SamyGO Project Donor
Posts: 12
Joined: Mon Jan 06, 2014 7:22 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by miksi »

sectroyer wrote:
gogo wrote:Why this command don't work?

umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
because you are not using latest stuff :) As a result your /mtd_rwarea/passwd is not mounted. You can check it by running:

Code: Select all

mount
Hello sectroyer,

what of the "new stuff" is enough to get /mtd_rware/passwd mounted?
I did all of the lines in your post about F series, and still with mount command I can't see it mounted.
Telnet, FTP works but with SSH I get authentication failed.

21:05:36.746 Started a new SSH2 session.
21:05:36.755 Connecting to SSH2 server 192.168.1.20:22.
21:05:36.755 Connection established.
21:05:36.763 Server version: SSH-2.0-dropbear_2011.54
21:05:36.763 First key exchange started.
21:05:37.177 Received a new host key from the server. Algorithm: RSA, size: 1039 bits, MD5 fingerprint: c7:26:5a:47:96:47:16:9e:80:9b:0f:be:36:7b:80:60, Bubble-Babble: xodaf-pozis-tybis-vimem-kynuh-zobak-pekus-desob-lihom-sopez-toxax.
21:05:37.185 First key exchange completed using diffie-hellman-group14-sha1. Session encryption: aes256-ctr, MAC: hmac-sha1, compression: none.
21:05:37.185 Attempting keyboard-interactive authentication.
21:05:37.767 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:05:48.741 Attempting password authentication.
21:05:48.749 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:05:58.474 Attempting password authentication.
21:05:58.483 Authentication failed. Remaining authentication methods: 'publickey,password'.
21:06:00.142 Authentication aborted on user's request.
21:06:00.151 The SSH2 session has been terminated.

Command:
$SYSROOT/bin/busybox mount | grep "etc" gives

/dev/mmcblk0p16 on /etc/profile type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/passwd type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/profile type emmcfs (rw,relatime)
/dev/mmcblk0p16 on /etc/passwd type emmcfs (rw,relatime)

Best regards
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

Use new rooting method. Than passwd IS mounted :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
miksi
SamyGO Project Donor
Posts: 12
Joined: Mon Jan 06, 2014 7:22 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by miksi »

So I can root my F6510 model fw1119 also with the new root method (for fw>=1120)? Ok. Thanks. I will try it soon.
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by zoelechat »

miksi wrote:So I can root my F6510 model fw1119 also with the new root method (for fw>=1120)?
Confirmed :)
I do NOT receive any PM. Please use forum.
miksi
SamyGO Project Donor
Posts: 12
Joined: Mon Jan 06, 2014 7:22 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by miksi »

And then I will have Skype functional again. Minus one flash stick "permanently" attached.
Again, thanks for great effort and sharing knowledge. This things are sometimes mind bogling because one needs to pay attention to many things simultaneously. Cheers.
miksi
SamyGO Project Donor
Posts: 12
Joined: Mon Jan 06, 2014 7:22 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by miksi »

And now I can confirm, new root method for "old" firmwares works, telnet, SSH, SCP all works as it should for F6510. I have occasional TV restarts but that's nothing new.
I want to try recording on NFS shares (on my PC) again. I did it once before but I forgot exact procedure. It will come up eventually. Regards.
tempinbox
Posts: 317
Joined: Wed May 11, 2011 7:00 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by tempinbox »

sectroyer wrote:THIS PART IS ONLY FOR C!!!!!!
FOR OTHER MODELS CHECK OTHER POSTS :)!!!!!!
I wanted to make as little changes to original SamyGO files as possible. Therefore (whenever it was possible) I have put most of my code in seperate files (rcEXT, rc.fix_telnetd, etc.). However probably it could be simplified and integrated directly with existing files (/dtv/.ashrc or /dtv/SGO.env). In order to make telnet working correctly (full bash history across reconnects and restarts, no more need to type . /dtv/SGO.env to have everything set up). You have to create following files:

$SYSROOT/rcEXT:

Code: Select all

#!/bin/sh

source /dtv/SGO.env

#echo "alias sgopwd='cd $1'" >> /dtv/SGO.env

echo "#!/dtv/network_opt/sh" > /dtv/sgoshfix
echo ". /dtv/SGO.env" >> /dtv/sgoshfix
echo "export HOME=\"$1\"" >> /dtv/sgoshfix
echo "export TERMINFO='$1/etc/terminfo'" >> /dtv/sgoshfix
echo "export TERM='xterm-color'" >> /dtv/sgoshfix
echo "export FRAMEBUFFER='/dev/sam/fb0'" >> /dtv/sgoshfix
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> /dtv/sgoshfix
echo "export PATH=\"$PATH\"" >> /dtv/sgoshfix
echo "export SYSROOT=\"$SYSROOT\"" >> /dtv/sgoshfix
echo "export PS1='\u@tv:\w \\$ '" >> /dtv/sgoshfix

chmod +x /dtv/sgoshfix

ln -s "$SYSROOT/opt/privateer/usr/bin/" /dtv/bin

$1/etc/rc.fix_telnetd&
$SYSROOT/etc/rc.fix_telnetd:

Code: Select all

#!/bin/sh
killall telnetd
. /dtv/sgoshfix
cd
telnetd -l /dtv/network_opt/sh
In some cases you may have to run:

Code: Select all

chmod +x $SYSROOT/rcEXT
chmod +x $SYSROOT/etc/rc.fix_telnetd
Finally add to the end of $SYSROOT/rcSGO this single line:

Code: Select all

$1/rcEXT "$1"
After this you will have "fixed" telnet working. In order to "fix" SSH you just have to change the file $SYSROOT/etc/rc.sysinit. Locate the line:

Code: Select all

echo "export PS1='# '" >> /mtd_rwarea/profile
Comment it out and put bellow these lines:

Code: Select all

echo "PS1='\u@tv:\w \# '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo ". /dtv/sgoshfix" >> /mtd_rwarea/profile
 
mount -o bind /dtv/network_opt/sh /bin/sh 
Now both telnet and SSH have colors, full bash history across reconnects/reboots and always start a shell in $SYSROOT directory.

To get SCP working we just need to copy patched dropbear binary (attached in archive) to:

Code: Select all

$SYSROOT/opt/privateer/usr/sbin/dropbear
and scp static binary to:

Code: Select all

/opt/privateer/usr/bin/scp
hi sectroyer i try to fix telnet and ssh with this i copy samygoscp to my samygo directory but it seems don't work
when i connect to telnet with putty there are no colors and no history.
my tv is c series
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

tempinbox wrote:
sectroyer wrote:THIS PART IS ONLY FOR C!!!!!!
FOR OTHER MODELS CHECK OTHER POSTS :)!!!!!!
I wanted to make as little changes to original SamyGO files as possible. Therefore (whenever it was possible) I have put most of my code in seperate files (rcEXT, rc.fix_telnetd, etc.). However probably it could be simplified and integrated directly with existing files (/dtv/.ashrc or /dtv/SGO.env). In order to make telnet working correctly (full bash history across reconnects and restarts, no more need to type . /dtv/SGO.env to have everything set up). You have to create following files:

$SYSROOT/rcEXT:

Code: Select all

#!/bin/sh

source /dtv/SGO.env

#echo "alias sgopwd='cd $1'" >> /dtv/SGO.env

echo "#!/dtv/network_opt/sh" > /dtv/sgoshfix
echo ". /dtv/SGO.env" >> /dtv/sgoshfix
echo "export HOME=\"$1\"" >> /dtv/sgoshfix
echo "export TERMINFO='$1/etc/terminfo'" >> /dtv/sgoshfix
echo "export TERM='xterm-color'" >> /dtv/sgoshfix
echo "export FRAMEBUFFER='/dev/sam/fb0'" >> /dtv/sgoshfix
echo "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> /dtv/sgoshfix
echo "export PATH=\"$PATH\"" >> /dtv/sgoshfix
echo "export SYSROOT=\"$SYSROOT\"" >> /dtv/sgoshfix
echo "export PS1='\u@tv:\w \\$ '" >> /dtv/sgoshfix

chmod +x /dtv/sgoshfix

ln -s "$SYSROOT/opt/privateer/usr/bin/" /dtv/bin

$1/etc/rc.fix_telnetd&
$SYSROOT/etc/rc.fix_telnetd:

Code: Select all

#!/bin/sh
killall telnetd
. /dtv/sgoshfix
cd
telnetd -l /dtv/network_opt/sh
In some cases you may have to run:

Code: Select all

chmod +x $SYSROOT/rcEXT
chmod +x $SYSROOT/etc/rc.fix_telnetd
Finally add to the end of $SYSROOT/rcSGO this single line:

Code: Select all

$1/rcEXT "$1"
After this you will have "fixed" telnet working. In order to "fix" SSH you just have to change the file $SYSROOT/etc/rc.sysinit. Locate the line:

Code: Select all

echo "export PS1='# '" >> /mtd_rwarea/profile
Comment it out and put bellow these lines:

Code: Select all

echo "PS1='\u@tv:\w \# '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo ". /dtv/sgoshfix" >> /mtd_rwarea/profile
 
mount -o bind /dtv/network_opt/sh /bin/sh 
Now both telnet and SSH have colors, full bash history across reconnects/reboots and always start a shell in $SYSROOT directory.

To get SCP working we just need to copy patched dropbear binary (attached in archive) to:

Code: Select all

$SYSROOT/opt/privateer/usr/sbin/dropbear
and scp static binary to:

Code: Select all

/opt/privateer/usr/bin/scp
hi sectroyer i try to fix telnet and ssh with this i copy samygoscp to my samygo directory but it seems don't work
when i connect to telnet with putty there are no colors and no history.
my tv is c series
Then you didn't do all the steps :) Check once again :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

Post Reply

Return to “[F] Software”