Linux – Log in to SSH without home directory Synology

linuxraidrootsshsynology

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.

Best Answer

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!