General NAS-Central Forums

Welcome to the NAS community
It is currently Sat Nov 18, 2017 9:17 pm

All times are UTC




Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
PostPosted: Thu Sep 15, 2016 5:24 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Can you post a logfile?


Top
 Profile  
 
PostPosted: Thu Sep 15, 2016 5:49 pm 
Offline

Joined: Wed Sep 14, 2016 7:59 am
Posts: 6
what is it called?

it is located in/var/log, right?

also how do i extract it? cant upload it directly from the stick trough the nas, and cant copy it to my coputer, do i have to change permission first? tried chmod but also permission denied.

sorry, like i said only have a patchy and very faint idea of all of this...


Top
 Profile  
 
PostPosted: Fri Sep 16, 2016 10:40 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Looong time ago. I downloaded the package, and there is no logfile. But it spits some comments to stdout. So you can manually start the script, and see what happens.
To manually start it, you'll have to rename nsa220_check_file, to prevent the box from starting it on boot. Then open the backdoor, and run usb_key_func.sh manually. The first time it will reboot the box, the second time it should reboot to Lenny.

(For some reason the Lenny kernel can't be loaded after a cold boot. For that reason it always reboots first, to be sure it's a warm boot.)


Top
 Profile  
 
PostPosted: Fri Sep 16, 2016 2:16 pm 
Offline

Joined: Wed Sep 14, 2016 7:59 am
Posts: 6
first of all thanks for all the work on here and responding so quickly.

but i didnt really understand your answer. should i do that with a new stick or the unpacked one?

also, i cant retrieve the backdoor password, nothing happens when i open mykey.php in a share browser through the web interface.

and again what would the name and the location of a logfile be? and how do i change permissions to access it?


Top
 Profile  
 
PostPosted: Sun Sep 18, 2016 1:06 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
sazerac wrote:
i didnt really understand your answer. should i do that with a new stick or the unpacked one?
Doesn't matter. The only difference is that the 'packed' version will first be unpacked before the first reboot.
Quote:
also, i cant retrieve the backdoor password, nothing happens when i open mykey.php in a share browser through the web interface.
PM me your MAC addess, I'll PM you your password.
Quote:
and again what would the name and the location of a logfile be? and how do i change permissions to access it?
There is no logfile. The reloader script doesn't create one, and so any logfile you can find is created by Debian itself, in which case the reloader script has done it's job.

If you don't have permission to read a logfile, I don't think you can get that through the webinterface. Using the backdoor you have all permissions. But you can also put the stick in any Linux computer, and read the file as root.


Top
 Profile  
 
PostPosted: Mon Sep 19, 2016 9:59 am 
Offline

Joined: Wed Sep 14, 2016 7:59 am
Posts: 6
if i run it manually i get:

/e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3 # sh usb_key_func.sh
Script running from
tar: extract_me.tgz: No such file or directory
rm: cannot remove `extract_me.tgz': No such file or directory
copy myself to /tmp
cp: //usb_key_func.sh: No such file or directory
usb_key_func.sh: usb_key_func.sh: 91: /tmp/usb_key_func.sh: not found
/e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3 #

does it fail to copy usb_key_func.sh to /tmp?

copied it manually but then i only get:

/e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3 # sh usb_key_func.sh
Script running from
tar: extract_me.tgz: No such file or directory
rm: cannot remove `extract_me.tgz': No such file or directory
/e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3 #

same results with a "new" unpacked stick

it seems $1 doesnt work, when i replace the line:cd $1 with: cd /e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3 it goes to the right directory and can find the files


Top
 Profile  
 
PostPosted: Mon Sep 19, 2016 2:29 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Try to execute '/e-data/82b35b22-38db-4982-b49c-9d8fd865f9f3/usb_key_func.sh' instead.


Top
 Profile  
 
PostPosted: Mon Sep 19, 2016 6:13 pm 
Offline

Joined: Wed Sep 14, 2016 7:59 am
Posts: 6
/ # exec /e-data/7ec7c153-d3db-4858-94da-f055859c33e9/usb_key_func.sh
Script running from e-data/7ec7c153-d3db-4858-94da-f055859c33e9
tar: extract_me.tgz: No such file or directory
rm: cannot remove `extract_me.tgz': No such file or directory
in reload.sh
Check for the existance of a proper reloaded.ko...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/reloaded-2.6.18.6.ko exists
Check for the existance of a proper zImage...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/zImage exists
Check for the existance of a proper initrd...
Current status: reload
We'll reboot
Connection closed by foreign host.


Top
 Profile  
 
PostPosted: Mon Sep 19, 2016 6:23 pm 
Offline
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 601
Hi!

I think, if You cd into the pen's directory and execute the command from there, it will works correctly:

Code:
cd /e-data/7ec7c153-d3db-4858-94da-f055859c33e9/

sh /e-data/7ec7c153-d3db-4858-94da-f055859c33e9/usb_key_func.sh


And for the first time, when You run it, will reboots and You have to re-execute theese two commands after the boot up, as @Mijzelf said.

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Tue Sep 20, 2016 10:24 am 
Offline

Joined: Wed Sep 14, 2016 7:59 am
Posts: 6
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9 # exec /e-data/7ec7c153-d3db-4858-94da-f055859c33e9/usb_key_func.sh
Script running from e-data/7ec7c153-d3db-4858-94da-f055859c33e9
tar: extract_me.tgz: No such file or directory
rm: cannot remove `extract_me.tgz': No such file or directory
in reload.sh
Check for the existance of a proper reloaded.ko...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/reloaded-2.6.18.6.ko exists
Check for the existance of a proper zImage...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/zImage exists
Check for the existance of a proper initrd...
Current status: reboot
We'll reload
Generate commandline...
cmdline=root=/dev/sdc1 rw mtdparts=physmap-flash.0:2176k(kernel),13184k(initrd),896k(etc),-(bootbase) console=ttyS0,115200n8 mem=128M init=/sbin/init
reloading...
Connection closed by foreign host.

then it reboots but is inaccessible and i have to force power off.

the secon time it spits out this again:

/e-data/7ec7c153-d3db-4858-94da-f055859c33e9 # exec /e-data/7ec7c153-d3db-4858-94da-f055859c33e9/usb_key_func.sh
Script running from e-data/7ec7c153-d3db-4858-94da-f055859c33e9
tar: extract_me.tgz: No such file or directory
rm: cannot remove `extract_me.tgz': No such file or directory
in reload.sh
Check for the existance of a proper reloaded.ko...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/reloaded-2.6.18.6.ko exists
Check for the existance of a proper zImage...
/e-data/7ec7c153-d3db-4858-94da-f055859c33e9/boot/zImage exists
Check for the existance of a proper initrd...
Current status: reload
We'll reboot
Connection closed by foreign host.

and do i rename nsa220_check_file again or leave it "turned off"?

like i mentioned dont have enough knowledge to get what i'm really doing, so thanks for the all the help and patience... happily gonna follow your instructions, but would be even more thankfull for some hints on what is going wrong.

help me help myself, kinda...


Top
 Profile  
 
PostPosted: Tue Sep 20, 2016 11:12 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
What can I say? 'This side' of the hatchway seems to run fine. The script reboots the box, and after rebooting (if it's sure it's a warm boot) it boots into a new kernel. Your console logging is clear.

After 'reloading...' it should come back in Debian. Of course the connection is closed, we are booting a new kernel.

There are 4 possibilities.
  1. The box doesn't reload at all
  2. The new kernel crashes while booting.
  3. Something goes wrong while initializing the Debian user space.
  4. Everything is working, but for some reason you fail to connect to the Telnet daemon.
1. In that case there is no feedback at all. When the reload module has done it's work, there won't be any feedback until the new kernel starts it's console dump.
2. Feedback is only dumped to the serial port.
3. There might be a logging in <thumb>/var/log, depending on when the initialisation crashed. Else you'll need serial.
4. Did you realize that the box will have another IP? It has some dummy MAC address, so for your DHCP server (router) it's a new device.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group