DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-03-20 14:29:39

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Telnet

I did add telnet how-to some time a ago.
http://tsi300.info/howto:telnet

There are many downloads, but no feedback. Since I don't have device in question I would like to have some comment smile

PS: If you are not registered in this forum then you can add your comment to telnet talk page


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#2 2007-06-12 22:58:38

impax
New member
Registered: 2007-06-12
Posts: 4

Re: Telnet

Hello guys,

Thanks for taking the time to put up this forum and hack this piece of shit.

I am trying to setup telnet using busybox as you have shown us and i am still having problems.

i setup fun_plug successfully and have installed the script as descibed in the wiki and also tried the changes in the other thread about using mknod instead of makedevs.  Here are my results:

if i use the code for makedevs, When I login via telnet the connection drops immediately (the admin password has been set to something other than the default  as mentioned in one post)

if i use the code for mknod, I login and get a login prompt and I can login using username admin/password xxx but then I do not get a prompt and when i input any line text and press enter nothing comes back.

I am getting a warning after I login to telnet (microsoft windows xp telnet client and putty) , here is what it looks like:

Code:

files login: admin
Password:
warning: cannot change to home directory


BusyBox v1.00-pre1 (2006.01.06-03:59+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

(enter commands, no repsonse)

Any help would be greatly appreciated!

-joe

Offline

 

#3 2007-06-13 21:20:51

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet

Could you copy-paste your fun_plug and /etc/passwd content here? Most likely you have some error in home directory which is set by this command:

Code:

/mnt/HD_a2/busybox sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd

PS: You can get /etc/passwd by adding following line to fun_plug:

Code:

cat /etc/passwd > /mnt/HD_a2/passwd_content.txt

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#4 2007-06-15 02:41:41

impax
New member
Registered: 2007-06-12
Posts: 4

Re: Telnet

fun_plug:

Code:

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
  ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
  echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
  /mnt/HD_a2/busybox sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/busybox sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2$
for i in 0 1 2 3 4 5 6 7
do
/bin/mknod /dev/ttyp$i c 3 $i
/bin/mknod /dev/ptyp$i c 2 $i
done
/mnt/HD_a2/busybox telnetd &

/etc/passwd:

Code:

root:x:0:0:Linux User,,,:/:/mnt/HD_a2/ash
admin:x:500:500:Linux User,,,:/home/admin:/bin/sh
nobody:x:501:501:Linux User,,,:/home/nobody:/bin/sh

Offline

 

#5 2007-06-15 12:24:28

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet

I didn't look closely the user you are trying to use big_smile You must use root user and admin password, just as wiki says smile
If you want to use admin user then you must fix passwd line

Code:

admin:x:500:500:Linux User,,,:/home/admin:/bin/sh

to look like

Code:

admin:x:500:500:Linux User,,,:/:/mnt/HD_a2/ash

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#6 2007-06-19 00:48:06

impax
New member
Registered: 2007-06-12
Posts: 4

Re: Telnet

Wow, I cant believe what an idiot I am.  Thanks for your help sala!

Offline

 

#7 2007-10-21 23:56:11

radiogen
Member
From: Minsk, BY
Registered: 2007-10-21
Posts: 8

Re: Telnet

the correct fun_plug which works with my TS-I300 is here.
working file:

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
  ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
  echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
  /mnt/HD_a2/busybox sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/busybox sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd
cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9
cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9
for i in 0 1 2 3 4 5 6 7
do
/bin/mknod /dev/ttyp$i c 3 $i
/bin/mknod /dev/ptyp$i c 2 $i
done
/mnt/HD_a2/busybox telnetd &

Last edited by radiogen (2007-11-04 02:53:20)

Offline

 

#8 2008-11-02 21:39:22

AndreA
Member
Registered: 2008-09-21
Posts: 6

Re: Telnet

Hi dude!
I've got the same problem impax had.
more specifically, this is my fun_plug:

Code:

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
  ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
  echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
  /mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/sed -i -e 's/root:.*/root:x:0:0:Linux 
User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd
cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9
cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9
/mnt/HD_a2/busybox telnetd &

cat /etc/passwd > /mnt/HD_a2/passwd_content.txt

andi this is my passwd_content.txt:

Code:

root:x:0:0:Linux User,,,:/home/root:/bin/sh

admin:x:500:500:Linux User,,,:/:/mnt/HD_a2/ash
nobody:x:501:501:Linux User,,,:/home/nobody:/bin/sh

I tried doing like you said but I wasn't able to solve the problem.

the putty shell still says:

"warning: cannot change to home directory"

and any command I enter doesn't make any effect.
PS: I have dsm g600
help me please!!!

Last edited by AndreA (2008-11-03 03:02:31)

Offline

 

#9 2008-11-13 10:37:48

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet

As error says, you have invalid home directory for root user. Fix it by creating it first or by changing passwd home directory section.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#10 2008-11-21 00:13:59

AndreA
Member
Registered: 2008-09-21
Posts: 6

Re: Telnet

More specifically what I have to do?
What I have to change?
Please paste me the two files I need, as they should be:

- fun_plug
- passwd_content.txt

Please help me.... I really need to have mldonkey on my dsm g600!!!

Last edited by AndreA (2008-11-21 21:06:15)

Offline

 

#11 2012-01-22 11:21:53

capitainabloc
Member
Registered: 2011-10-05
Posts: 22

Re: Telnet

Hello all,

I'm using busybox connection on DNS-323 to make a ssh tunnel, and it's working good, but do you know where in dns-323 I can find a connection log for this?

thanks

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB