General NAS-Central Forums

Welcome to the NAS community
It is currently Tue Dec 12, 2017 11:28 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Feb 16, 2017 5:59 pm 
Offline

Joined: Thu Feb 16, 2017 5:51 pm
Posts: 2
Hi guys,

Does anyone know how to either send a shutdown command or how to enable root SSH access on a Dlink Sharecenter Pro DNS-1200-05? SSH is open running a password protected BusyBox v1.12.3 (2012-09-28 11:37:08 CST) - The password is 5784468 but the shutdown command is restricted. When I run the 'help' command I get a list of available commands:

Code:
BusyBox v1.12.3 (2012-09-28 11:37:08 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

5784468
# help

Built-in commands:
-------------------
        . : [ [[ alias bg break cd chdir command continue echo eval exec
        exit export false fg hash help jobs kill let local printf pwd
        read readonly return set shift source test times trap true type
        ulimit umask unalias unset wait

#


Is there anyway to shut this down without logging into web admin or pressing power button? I need to shut it down from a script on a Linux box.

Thanks


Top
 Profile  
 
PostPosted: Thu Feb 16, 2017 7:43 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6087
What do you mean with restricted? According to your prompt you have a root shell, so you should be able to execute anything.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2017 10:25 pm 
Offline

Joined: Thu Feb 16, 2017 5:51 pm
Posts: 2
Sorry, I mean it's not there.

Code:
# shutdown
-sh: shutdown: not found


'poweroff' doesn't shutdown the machine, it just makes the display flash and lose network connectivity but it's still on and displaying the correct info.

I just have no idea how to shut this thing down properly.


Top
 Profile  
 
PostPosted: Fri Feb 17, 2017 9:21 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6087
Is it possible that 'poweroff' actually reboots the box? Poweroff on an embedded system can be tricky. If the kernel doesn't know how to switch off the box, it can only reboot, when it's at the end of the shutdown procedure. Some embedded boxes cannot shutdown at all (there is no logic which can cut the power), and emulate it by letting the kernel enter an endless loop.

You can try a 'init 0' or 'halt'. If that fails, and the kernel has 'sysreq' support, you can try
Code:
echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger
(You can see if the kernel supports it by the existence of /proc/sysrq-trigger.

If that fails you'll have to find out how the firmware shuts down the box. Possibly some script. Try to press <tab><tab> to get a list of executables. Maybe some name is descriptive.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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