Dlink Sharecenter Pro DNS-1200-05 Remote shutdown Enable SSH

Post Reply
rikkib
Posts: 2
Joined: Thu Feb 16, 2017 5:51 pm

Dlink Sharecenter Pro DNS-1200-05 Remote shutdown Enable SSH

Post by rikkib » Thu Feb 16, 2017 5:59 pm

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: Select all

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

Mijzelf
Posts: 6224
Joined: Mon Jun 16, 2008 10:45 am

Re: Dlink Sharecenter Pro DNS-1200-05 Remote shutdown Enable

Post by Mijzelf » Thu Feb 16, 2017 7:43 pm

What do you mean with restricted? According to your prompt you have a root shell, so you should be able to execute anything.

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

Re: Dlink Sharecenter Pro DNS-1200-05 Remote shutdown Enable

Post by rikkib » Thu Feb 16, 2017 10:25 pm

Sorry, I mean it's not there.

Code: Select all

# 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.

Mijzelf
Posts: 6224
Joined: Mon Jun 16, 2008 10:45 am

Re: Dlink Sharecenter Pro DNS-1200-05 Remote shutdown Enable

Post by Mijzelf » Fri Feb 17, 2017 9:21 am

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: Select all

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.

Post Reply