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 2006-10-09 03:09:31

username
Member
Registered: 2006-10-09
Posts: 12

Need a Total Newbie Walkthrough

Hi folks,

I am a total DSM-G600 newbie and need a walkthrough. I saw the stickies, but they assume a certain knowledge, or a certain unit condition that I cannot figure out.

If I can get into the unit through telnet, I can figure out my way around. I am NOT a total newb as far as Linux is concerned, but I do not know where to start with the DSM-G600 specifically.

I do have a Linux box on the LAN, but I am definitely more comfortable working with Windows.

Thanks.

Offline

 

#2 2006-10-09 05:33:47

username
Member
Registered: 2006-10-09
Posts: 12

Re: Need a Total Newbie Walkthrough

I placed a fun_plug file on HD_a2 via FTP.
I changed its permissions to 777 via my FTP client (it did work).
I unzipped the http://dns323.kood.org/downloads/busybo … .1.tar.bz2 file.
I FTP'd the busybox and the sed files to HD_a2. Changed their permissions to 777 (just in case).
I copied the commands from the README file found in the zipped file to the fun_plug file.

How do I know that it works, and how do I get to telnet (telnet X.X.X.X does NOT work)?

Thanks again.

Offline

 

#3 2006-10-09 08:28:42

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

Re: Need a Total Newbie Walkthrough

Most likely chmod over ftp didn't work. fun_plug file gets processed every time you boot up your dsmg.
If you did all steps right then after reboot telnet x.x.x.x should work wink


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

Offline

 

#4 2006-10-09 11:45:59

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

With which account did you transfer the files to your HD_a2? Did you implement Users?

Offline

 

#5 2006-10-09 18:47:46

username
Member
Registered: 2006-10-09
Posts: 12

Re: Need a Total Newbie Walkthrough

Thank you for your responses.

I did create a user and FTP'd using that user. Should I have done it differently?

I was able to get to my files on the DSM-G600 from my Linux box using smbclient command.
I recreated the fun_plug file using vi on the Linux box and ran the put command to copy it to the DSM-G600.
Does this bring me any closer? Can I run touch and chmod commands through Samba?

I am trying to do fun_plug without having to physically move the HD to my Linux box and back.

Offline

 

#6 2006-10-09 19:01:16

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 119
Website

Re: Need a Total Newbie Walkthrough

username wrote:

Thank you for your responses.

I did create a user and FTP'd using that user. Should I have done it differently?

I am trying to do fun_plug without having to physically move the HD to my Linux box and back.

You must create an user on your dsm
You must configure ftp on your dsm to give him rw rights on the root

next you can transfer the fun_plu and all what your need from your linux box (or from a windows one) and change the rights with your ftp client on the dsm.

Offline

 

#7 2006-10-09 21:46:47

username
Member
Registered: 2006-10-09
Posts: 12

Re: Need a Total Newbie Walkthrough

I did create a user through DSM's web interface. I gave the user full RW rights to the root. Is there another way of doing this other than going through the web interface?

Offline

 

#8 2006-10-09 22:43:20

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 119
Website

Re: Need a Total Newbie Walkthrough

username wrote:

I did create a user through DSM's web interface. I gave the user full RW rights to the root. Is there another way of doing this other than going through the web interface?

No. Oh and some time you need to start the ftp server threw the web interface
Transfer your fun_plug under HD_a2 (exactly /mnt/HD_a2)
and chmod 700 threw your ftp client
Now you can restart the box threw the web interface

Offline

 

#9 2006-10-09 23:28:06

username
Member
Registered: 2006-10-09
Posts: 12

Re: Need a Total Newbie Walkthrough

That's exactly how I did it. I will retry later tonight.

Offline

 

#10 2006-10-10 00:36:35

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

finally,got my busybox running, I think for me it was the chmod that did not work.
Telnet is open, but when I try to login as root i get :no valid shadow password

as Admin I do not get any further than the busybox start message, can you guess what went wrong?

Regards, grouper

Offline

 

#11 2006-10-10 01:31:38

tksm
Member
Registered: 2006-09-27
Posts: 16

Re: Need a Total Newbie Walkthrough

the easiest route to getting linux on this box is via the gentoo how to thread, once you get gentoo operating, you can emerge packages

Offline

 

#12 2006-10-10 08:12:40

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

Re: Need a Total Newbie Walkthrough

Grouper wrote:

finally,got my busybox running, I think for me it was the chmod that did not work.
Telnet is open, but when I try to login as root i get :no valid shadow password

as Admin I do not get any further than the busybox start message, can you guess what went wrong?

Regards, grouper

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 &

You need to add ALL these lines to your fun_plug, don't mess around with them.
If you have
* /mnt/HD_a2/fun_plug
* /mnt/HD_a2/sed
* /mnt/HD_a2/busybox
* and enough room for /mnt/HD_a2/ash symlink
this should work without any problems. Also admin login will not work, we do not need it because it has no root privileges. Log in as root and password is same you have specified for admin.


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

Offline

 

#13 2006-10-10 11:35:37

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

Thanks Sala,

I´ve copy pasted the Code from the Telnet-Thread, so I think I have the same fun_plug.

What I do not have in my fun plug is the /mnt/HD_a2/fun_plug,will add this later and try again.
Best regards,grouper

Offline

 

#14 2006-10-10 12:40:30

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

Re: Need a Total Newbie Walkthrough

Do not add /mnt/HD_a2/fun_plug into fun_plug. Very bad idea. All you need in fun plug is included at code section.


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

Offline

 

#15 2006-10-10 14:32:07

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

Yeah, thouht about it ... not such a good idea.
Here is my fun_plug:

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
/mnt/HD_a2/ushare -c /mnt/HD_a2/Musik
/mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
/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 &

nothin special,what do yyou tihnk?

Offline

 

#16 2006-10-11 00:19:22

username
Member
Registered: 2006-10-09
Posts: 12

Re: Need a Total Newbie Walkthrough

I am up now! Got telnet to work. Thanks everyone for help.

I think it was the smbclient command that did the trick. I recreated the fun_plug file using vi on the Linux box and ran the put command to copy it to the DSM-G600. Most likely the original fun_plug file that I created on a Windows box did not work right because of different format (EOL/CR/LF or whatever).

Offline

 

#17 2006-10-11 11:22:52

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

Will recreate mine on my ux-Box too, the above posted version is copy pasted into a txt.file on a windows box, ftp´ed from windows and chmoded with cygwin.
I will keep you informed.
Regards!

Offline

 

#18 2006-10-12 21:25:17

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

Re: Need a Total Newbie Walkthrough

Grouper wrote:

Yeah, thouht about it ... not such a good idea.
Here is my fun_plug:

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
/mnt/HD_a2/ushare -c /mnt/HD_a2/Musik
/mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
/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 &

nothin special,what do yyou tihnk?

Remove this line and try again.
Or put this at the end of your script, also you can add background option &

Code:

/mnt/HD_a2/ushare -c /mnt/HD_a2/Musik

These are the lines for root login. At first we duplicate admins password entry and add a control bit. Then we replace control bit + admin with root and finally we add a usable shell to the root user.

Code:

echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
/mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
/mnt/HD_a2/sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd

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

Offline

 

#19 2006-10-22 05:30:57

vic_macky
Member
Registered: 2006-10-22
Posts: 20

Re: Need a Total Newbie Walkthrough

Is fun plug a text file? i cant find my fun plug file on my dsm. i set up the ftp server and can write into it and the hdd_a2 folder is there but i cant find any file that says fun plug. im using windows xp pro by the way.

Offline

 

#20 2006-10-22 12:21:18

Grouper
Member
Registered: 2006-09-19
Posts: 33

Re: Need a Total Newbie Walkthrough

you have to create it on your own

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB