1

I need a knight in shining armour.. go internet!

I have a failed volume on my Synology NAS. In DSM6 they have 'removed' the root user. - the only user which doesn't have a home dir.

To recover, we need to log into ssh. When we log in as admin, it disconnects immediately because the home dir doesn't exist which is obvious since the volume is unmounted.

Once we are in, Synology support seems to be somewhat confident that he can restore the volume.

Sure, I have backups - of the important stuff, but the thing about the unimportant stuff is, I don't know what is there.

Any way I can bypass the home dir not valid which closes the SSH connection?

Thank you.

tommylux
  • 11
  • 1
  • 3
  • Is it possible to execute a remote command? ssh user@server 'ls -l /tmp' May be helpful to recover. – dmaj May 05 '17 at 18:10
  • Is it possible to connect a keyboard and a monitor? – Jenny D May 08 '17 at 11:47
  • It doesn't have any video outputs, there is a service serial (inside) the NAS unit. But I have managed to get on now by attempting to install a fake .pat firmware file. The nas goes into telnet mode. – tommylux May 09 '17 at 12:35

3 Answers3

1

All of the SSH implementations I've tried will let you log in if your home directory has been deleted, so I'm thinking maybe it's the ash shell (I don't have access to it to test).

Try connecting with sftp. That might get around the shell and let you re-create a home directory. I can sftp to my server as a test user whose home directory has been deleted; it just puts me in /. Escalating your privileges without sudo might be an issue, but it might work. Or it might not. Good luck!

dogoncouch
  • 176
  • 5
0

It sounds like the failed volume has the Synology system partition on it. If so, any attempt to recover it by connecting to Synology may cause more to be overwritten.

The filesystem isn't anything proprietary, it's most likely ext4. You can mount it as read-only on any computer and recover what you need.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
  • It's raid 5 :-/ – tommylux May 05 '17 at 21:36
  • Shouldn't RAID5 handle this automatically when replacing the failed drive with an empty one? That's what it is supposed to do! – Esa Jokinen May 05 '17 at 21:41
  • You would have thought ay. It has done in the past with no downtime. This time the system ground to a halt, I could barely connect to it over MySQL, but not the web interface, so I booted it and it refused to boot. It's a bit difficult to diagnose when there is no console. Took all disks out, put an empty disk in and installed DSM, took that out put the old disks back in and it boots this time with no volume. Can't say I've been impressed by Synology support, 3 days of chasing and they now escalate to Taiwan and we hit the weekend. – tommylux May 05 '17 at 21:46
  • Ouch! A RAID is (and backups are) only useful if it can recover. – Esa Jokinen May 05 '17 at 21:50
  • 10TB is a little difficult to back up, so I only back up the most important stuff. I felt that in the ultimate disaster, I weighed up my risk and could live with only my photos and my websites. I have a successful photos backup less than a week ago. But it's more of the stuff I collected that I don't know really what I've lost that bothers me. – tommylux May 05 '17 at 21:55
  • Can't get it back on at all now. Have all my drives connected into a new Linux machine. Two of the drives show up as 16T the other two at 3.6T each. Going to try RAIDfinder ISO. – tommylux May 06 '17 at 13:10
0

Synology does have a root user.

It is hard coded to change every day and Synology have the generator.

Someone has also reverse engineered the generator which you can find online. That may be why root is disabled in DSM6+

There is a method to boot the NAS into telnet mode by creating and attempting to install a fake .pat file causing the installation to fail (without disks) I obtained this file via a private synology ftp, but most of the text is commented out apart from a few lines:

pollinterval = 5

[ups]
    driver = usbhid-ups
    port = auto
    #community = 
    #snmp_version = v2c

Tom

tommylux
  • 11
  • 1
  • 3