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

#101 2007-09-02 23:52:00

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

1-0-Ed wrote:

(editing the telnetd.sh file as an other user (which I can log in with) isn't possible; it's write protected)

Hack it smile

If you have php running and if you can still put files into the www directory, create 'chmod.php' and surf to it:

Code:

<?php
chmod("/mnt/HD_a2/fun_plug.d/start/telnetd.sh", 0777);
?>

This will make telnetd.sh world-writeable, so you can edit it.

The last resort approach is: remove the disk, put it in another computer and edit telnetd.sh there.

Your problem shows that it might be safer to store a modified passwd file somewhere on disk and copy it to /etc/passwd on boot. And not store stuff to flash.

Offline

 

#102 2007-09-02 23:58:39

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

echotrain wrote:

Then I have to reboot the DNS323 and telnet will ask for a login? But what login do I use? The admin page password?

It will ask for username and password.

admin won't work (because it has a non-existent home dir), but any username/password you configured in the web interface should work.
If you set a root password, you can also log in as 'root' (the telnet without password 'logs in as root').

IMPORTANT: Only root can edit the funplug files by default. If you make telnet ask for username and password, but don't set a root password,
you'll lose the ability to edit the funplug files!

Offline

 

#103 2007-09-04 00:12:33

1-0-Ed
New member
Registered: 2007-09-02
Posts: 3

Re: Updated fun_plug

fonz wrote:

1-0-Ed wrote:

(editing the telnetd.sh file as an other user (which I can log in with) isn't possible; it's write protected)

Hack it smile

If you have php running and if you can still put files into the www directory, create 'chmod.php' and surf to it:

Code:

<?php
chmod("/mnt/HD_a2/fun_plug.d/start/telnetd.sh", 0777);
?>

This will make telnetd.sh world-writeable, so you can edit it.

The last resort approach is: remove the disk, put it in another computer and edit telnetd.sh there.

Your problem shows that it might be safer to store a modified passwd file somewhere on disk and copy it to /etc/passwd on boot. And not store stuff to flash.

Fantastic Fonz, worked a charm! Strange thing was that it took a couple of attempts;

chmodding worked fine, editting worked fine but then on restart telnet didn't seem to want to start up anymore. After putting back a backup of the file (phew) it worked again but the problem obviously wasn't fixed. I then used the VI editor to change the file from the account I could use to log in; still didn't work. Then I tried again after putting back the backup telnetd.sh file and it worked fine. I changed and stored the root password and everything is working fine again!

Thank you for another nice evening with my NAS Fonz! Cudos!!!

smile

Offline

 

#104 2007-09-04 19:47:05

dickeywang
Member
Registered: 2007-06-29
Posts: 59

Re: Updated fun_plug

I am not sure if it was caused by the fun_plug or the DNS itself, but when I type in "uptime", it shows that my DNS has been running for "13760 days".
Any idea how to fix this problem?

Offline

 

#105 2007-09-04 21:15:46

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

dickeywang wrote:

I am not sure if it was caused by the fun_plug or the DNS itself, but when I type in "uptime", it shows that my DNS has been running for "13760 days".
Any idea how to fix this problem?

It's not related to the funplug: http://dns323.kood.org/forum/t162-Wrong-uptime.html

Offline

 

#106 2007-09-05 14:04:29

echotrain
Member
Registered: 2007-09-02
Posts: 5

Re: Updated fun_plug

fonz wrote:

echotrain wrote:

Then I have to reboot the DNS323 and telnet will ask for a login? But what login do I use? The admin page password?

It will ask for username and password.

admin won't work (because it has a non-existent home dir), but any username/password you configured in the web interface should work.
If you set a root password, you can also log in as 'root' (the telnet without password 'logs in as root').

IMPORTANT: Only root can edit the funplug files by default. If you make telnet ask for username and password, but don't set a root password,
you'll lose the ability to edit the funplug files!

I changed the telnetd.sh file in the start directory. Reboot. And now when I telnet, it says "could not open connection to host". Oh no, what have I done.

FTP still works. lighttpd also still runs as I can see my website but I cannot telnet.

Is there a way to change the telnetd.sh file? I try to overwrite it via FTP but there's an error "no such file or directory". Previously when I want to chmod or rename a file I have to use telnet, FTP doesn't work. But now with telnet down.... what can I do?

Thanks!

Last edited by echotrain (2007-09-05 14:08:44)

Offline

 

#107 2007-09-05 14:45:03

1-0-Ed
New member
Registered: 2007-09-02
Posts: 3

Re: Updated fun_plug

I had the same sort of problem. Fonz saved my day with this answer:

1-0-Ed wrote:
(editing the telnetd.sh file as an other user (which I can log in with) isn't possible; it's write protected)

Hack it

If you have php running and if you can still put files into the www directory, create 'chmod.php' and surf to it:


Code:
<?php
chmod("/mnt/HD_a2/fun_plug.d/start/telnetd.sh", 0777);
?>
This will make telnetd.sh world-writeable, so you can edit it.

The last resort approach is: remove the disk, put it in another computer and edit telnetd.sh there.

Your problem shows that it might be safer to store a modified passwd file somewhere on disk and copy it to /etc/passwd on boot. And not store stuff to flash.

Offline

Offline

 

#108 2007-09-05 15:20:12

echotrain
Member
Registered: 2007-09-02
Posts: 5

Re: Updated fun_plug

1-0-Ed wrote:

I had the same sort of problem. Fonz saved my day with this answer:

1-0-Ed wrote:
(editing the telnetd.sh file as an other user (which I can log in with) isn't possible; it's write protected)

Hack it

If you have php running and if you can still put files into the www directory, create 'chmod.php' and surf to it:


Code:
<?php
chmod("/mnt/HD_a2/fun_plug.d/start/telnetd.sh", 0777);
?>
This will make telnetd.sh world-writeable, so you can edit it.

The last resort approach is: remove the disk, put it in another computer and edit telnetd.sh there.

Your problem shows that it might be safer to store a modified passwd file somewhere on disk and copy it to /etc/passwd on boot. And not store stuff to flash.

Offline

OK so how do I activate php? Otherwise I can just wipe the disk clean and restart. Hvn'et really worked much with it yet.

But on another note, even if I do that, what went wrong when I tried to activate passwrod for telnet? I am probably going to try again and may hit the same problem again.

Offline

 

#109 2007-09-05 15:27:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

echotrain wrote:

But on another note, even if I do that, what went wrong when I tried to activate passwrod for telnet? I am probably going to try again and may hit the same problem again.

What text editor did you use? What else did you do to the file (e.g. transferred via ftp?)?

Before experimenting or tweaking critical functions, _always_ make sure, you have a way to recover - especially if you dont have a serial console (you could just login on the serial console, and correct the telnetd.sh file). Several approaches come to mind:

- setup alternate root access via ssh
- make critical files world-writeable (so you can edit via samba and/or as non-root user)
- prepare a special web page for recovery actions

I'm sure there are a lot more possibilities.

Offline

 

#110 2007-09-05 16:11:19

echotrain
Member
Registered: 2007-09-02
Posts: 5

Re: Updated fun_plug

fonz wrote:

echotrain wrote:

But on another note, even if I do that, what went wrong when I tried to activate passwrod for telnet? I am probably going to try again and may hit the same problem again.

What text editor did you use? What else did you do to the file (e.g. transferred via ftp?)?

Before experimenting or tweaking critical functions, _always_ make sure, you have a way to recover - especially if you dont have a serial console (you could just login on the serial console, and correct the telnetd.sh file). Several approaches come to mind:

- setup alternate root access via ssh
- make critical files world-writeable (so you can edit via samba and/or as non-root user)
- prepare a special web page for recovery actions

I'm sure there are a lot more possibilities.

I used notepad+ for editing. Shd have used something else? Transfered via filezilla.

I will be reformatting my disk to try again. And I do not have serial assess.

Maybe I'll use Scite to edit it and make sure the file is in LF format when I try the next time.

The php hack does not seem to work. Perhaps my php is not activated.

Last edited by echotrain (2007-09-05 16:14:24)

Offline

 

#111 2007-09-05 16:21:08

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

echotrain wrote:

I used notepad+ for editing. Shd have used something else? Transfered via filezilla.

Don't know them, so I can't comment. Safest is to edit the files directly on the DNS in a telnet session. vi is part of the core funplug (but a little 'unusual') , joe is available as add-on.

Offline

 

#112 2007-09-07 16:47:33

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: Updated fun_plug

fonz, I am trying to get something like http://www.phpalbum.net/ working but it requires the GD/GD2 component to compile thumbnails automatically.  There are a few other programs like that one for photo albums that need that too.  As for now I am just using JAlbum but was looking for something all in one that is web based with the ability to upload photos away from home.

Another thing is the mySQL issue.  I know this box can't run that but damn, there are so many programs I would like to run but can't due to that limitation.

Last edited by WildSioux (2007-09-07 16:47:56)

Offline

 

#113 2007-09-07 17:16:35

echotrain
Member
Registered: 2007-09-02
Posts: 5

Re: Updated fun_plug

fonz wrote:

echotrain wrote:

I used notepad+ for editing. Shd have used something else? Transfered via filezilla.

Don't know them, so I can't comment. Safest is to edit the files directly on the DNS in a telnet session. vi is part of the core funplug (but a little 'unusual') , joe is available as add-on.

Thks Fonx!

Reformatted the entire box. Installed fun_plug 0.3. Have lighttpd running
chmod 777 to telnetd.sh
Used VI to edit the telnetd.sh to allow login
It works!

BUT.....

Now that I log in to root, I cannto change files within telnet as I am not the owner?
I thought chmod 777 will have solved the problem?

Ermmm what should I do now?

Thks!

Offline

 

#114 2007-09-09 20:34:35

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

WildSioux wrote:

fonz, I am trying to get something like http://www.phpalbum.net/ working but it requires the GD/GD2 component to compile thumbnails automatically.

I've compiled php with gd weeks ago: http://www.inreto.de/dns323/fun-plug/0. … -5.2.3.tgz
See also:
http://dns323.kood.org/forum/t604-html- … tions.html
http://dns323.kood.org/forum/t791-Dalbu … llery.html

WildSioux wrote:

mySQL  ... there are so many programs I would like to run but can't due to that limitation.

I think you can run mysql in a debian chroot. Can you give a few examples?

Offline

 

#115 2007-09-09 20:49:57

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

echotrain wrote:

Now that I log in to root, I cannto change files within telnet as I am not the owner?
I thought chmod 777 will have solved the problem?

As root, you can do everything. Changing files not owned by root is no problem. Who's complaining that "you're not the owner'? And you can always do 'chown root.root xyz', anyway.

Offline

 

#116 2007-09-13 20:01:11

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: Updated fun_plug

Hmm, I am using that php file.  I will have to look at it to see why gd isn't running.

I think you can run mysql in a debian chroot. Can you give a few examples?

These are some of the things that I have been looking at but can't run without mysql.

Easy PHP Calendar (doesn't need sql, but couldn't get it to work)
http://www.easyphpcalendar.com/

PhpGedView
http://www.phpgedview.net/

another genealogy one
http://lythgoes.net/genealogy/software.php

Personal Information Manager (PIM) to display contacts like these:

The Address book reloaded
http://sourceforge.net/projects/tab-2

http://www.brim-project.org/

Offline

 

#117 2007-09-13 21:14:26

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

php with gd probably depends on the libpng and libjpeg packages. Do you have installed those?

An alternative calendar might be phpicalendar (http://phpicalendar.net/) It seems to work (tried it myself some time ago), but it's slow as most php apps on the dns.

Offline

 

#118 2007-09-16 13:09:14

ultrabrutal
Member
Registered: 2007-06-10
Posts: 22

Re: Updated fun_plug

Does version 0.2 affect performace of the DNS in a negative way? All I'm running is a fan script really.
Before I used to get same performance as a Windows SMB share to my Xbox as I did with my DNS-323. But now I have shitload of framedrops from the DNS. I am able to copy a DVD in 5-10 minutes from the DNS.  I'm nore sure if these problems started after I installed funplug or not.  Anyone know about this?

Offline

 

#119 2007-09-16 22:39:16

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

ultrabrutal wrote:

All I'm running is a fan script really.

Maybe your fanscript is the problem. If you have a performance problem, run 'top' and see what the CPU load is and what processes are active.

Offline

 

#120 2007-11-04 02:08:11

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: Updated fun_plug

fonz, any idea why this happens?

--8<--
/mnt/HD_a2/fun_plug.d/start # sh timezone.sh
timezone.sh: line 15: syntax error: "}" unexpected
--8<--

AFAIK it's the original timezone.sh script from fun_plug v0.3

/MiK

Offline

 

#121 2007-11-04 02:40:56

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

MiK wrote:

timezone.sh: line 15: syntax error: "}" unexpected

hm, yes. busybox ash doesn't like empty functions. attached is my newer version of the script. defaults to CEST and 9965 ticks per day (see adjtimex). remove timezone.sh first, the new script is named 00timezone.sh, so it runs early.

Offline

 

#122 2007-11-04 12:45:17

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: Updated fun_plug

Thanks.

Does this output look normal?

--8<--
/mnt/HD_a2/fun_plug.d/start # sh 00timezone.sh start
    mode:         16384
-o  offset:       0
-f  frequency:    0
    maxerror:     16384000
    esterror:     16384000
    status:       64 ( UNSYNC )
-p  timeconstant: 2
    precision:    1
    tolerance:    33554432
-t  tick:         9965
    time.tv_sec:  1194172987
    time.tv_usec: 360253
    return value: 5 (clock not synchronized)
sntp: using NTP server nic.lth.se (130.235.20.3)
NTP Server connected successfully!!!
System time: 2007/11/4 Sun 11:43:8
--8<--

/MiK

Offline

 

#123 2007-11-04 13:54:38

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Updated fun_plug

MiK wrote:

Does this output look normal?

yes.

Offline

 

#124 2007-11-04 15:05:17

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: Updated fun_plug

Good. Thanks for the help! smile

Offline

 

#125 2007-11-05 06:17:42

Ethereal_Dragon
Member
From: USA
Registered: 2007-02-05
Posts: 55

Re: Updated fun_plug

Well, I was TOTALLY going to upgrade to the new funplug today, but my router has crashed or there is a problem with the internet connection, so I can't get to the box... (I am at work right now, and have remote access)......

When upgrading to the new funplug, do I just leave all of the old stuff where it is, or should i delete all of the old files, and just replace them with the new stuff?


Gaming Rig: ASUS Z87-PRO (V EDITION), Intel Core i5-4590 Haswell, HyperX FURY 8GB DDR3 1866,
XFX Radeon HD 4870, SILVERSTONE DA700, Samsung 840 500Gig SSD MZ-7TD500BW, 3x WD20EARS 2 TB Green,
ASUS DRW-2014L1T (DVD), LG WH14NS40 (Blu Ray), Dell 2709W, Sony SDM-HS95P, Windows 10 Pro
The NAS Box: D-Link DNS-323, 0.1RC3 Alt-F firmware, 2x 7200.14 ST3000DM001 3TB EXT4 - NO RAID - 6 TB

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB