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 2011-11-03 20:19:16

guyfromfl
New member
Registered: 2011-06-08
Posts: 3

Cannot SSH to DNS-321

I setup fun plug on our company's DNS-321 and was running great, then one day I could not SSH to the box anymore.

I get the login, but get this after entering the password

Could not chdir to home directory /home/admin: No such file or directory


BusyBox v1.00-pre1 (2008.02.13-09:34+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.


entering help does nothing.

Does anybody have any ideas?

Thanks.

Offline

 

#2 2011-12-15 03:47:11

MicroCheapFx
New member
Registered: 2011-12-15
Posts: 1

Re: Cannot SSH to DNS-321

Hi !
I have the same problem here. And worst of all, I have disabled telnet...
No way to access the funplug anymore...

Offline

 

#3 2011-12-16 21:03:49

Sjoerd
New member
Registered: 2011-12-16
Posts: 1

Re: Cannot SSH to DNS-321

We had the same problem, but I was able to fix it!

The reason that there is no Busybox prompt was because the
shell was wrong in /etc/passwd.

I could get a shell with the following command:

ssh admin@nas-ip-address "/ffp/bin/sh -i"

I was able to edit the /mnt/HD_a2/fun_plug script. This script is run when the NAS boots. I made a new keypair and placed the public key on the NAS. Every boot the public key is installed in /home/root/.ssh/authorized_keys.

To generate a new keypair:

ssh-keygen -C "" -N "" -f ~/.ssh/NASkey

Make a file that will later be appended to the fun_plug script on the NAS:

cat > funplug.additional << EOF

mkdir -p /home/root/.ssh
chmod 0700 /home/root/.ssh
( `cat ~/.ssh/NASkey.pub` )  > /home/root/.ssh/authorized_keys
chmod 0600 /home/root/.ssh/authorized_keys
EOF

append to the fun_plug script on the NAS:

cat funplug.additional | ssh admin@NAS-ip-address "cat - > /tmp/to_add ; cat /tmp/to_add >> /mnt/HD_a2/fun_plug"

reboot the NAS

After the NAS reboot you should be able to login as root:

ssh -i ~/.ssh/NASkey root@NAS-ip-address

Hope it helps!

Last edited by Sjoerd (2011-12-16 21:20:25)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB