2

I am very new to the Unix/Linux world, and at my workplace, I was trying to set up my user to be able to SSH into the NAS server (our NAS is made by netgear). I had never worked with this particular system before. I was logged in as root, and edited my /ssh/sshd_config file (vi /ssh/sshd_config) and appended a line, AllowUsers [MyUser] (which I now realize was incorrect as I think my ssh is managing authentication with PAM). I rebooted ssh (I think it was openSSH) with /etc/init.d/ssh reboot, and I got a message about some file not being found.

OK. Here is where I get REALLY stupid.

I don't even look at the message and close my PuTTY window to see if my user account will be able to ssh now (20/20 hindsight makes me feel really stupid here).

I open PuTTY again and try to ssh as my user.

It fails. I'm not too dissapointed, I'm new at Linux and stuff, so I figure I'll just log in as root again and fix things.

Guess what happens next! root login fails...

I have 2 guesses for why mt ssh might be broken:

  1. The line I added to my SSH config file caused the whole thing file to not work, and is now denying access to everyone.
  2. The SSH on my server is not simple to reboot, and the previous admin (who now has returned to college for another degree) knew how to work with it.
  3. A combination of the above.

Since SSH is the only way (I think) to communicate with my server (i tried telnet), and my ssh is broken, what should I do?

EDIT: Any help would be very appreciated, this could get very ugly (and land me in deep trouble) if this problem persists...

EDIT: This is a ReadyNAS Ultra 2 Plus that I am working on.

6
  • Probably out of the question, but can you reset the device? What kind of NAS is it exactly (model no.)? Does it have a web interface?
    – slhck
    Aug 9, 2012 at 17:54
  • @slhck resetting the device would be hard to do, our finance files are on there, and so I can't reboot while they are being worked on (which is almost always). It DOES have a web interface, although I'm not sure if I can run commands from it. Aug 9, 2012 at 17:58
  • @slhck I was not able to login as root to the web interface... I got one user login to work but it has no privileges. Aug 9, 2012 at 18:08
  • Hm. I believe the only way would be to reset the device, which shouldn't touch any data on it. Can't you schedule any outage or maybe do it on a weekend? At least that's what we used to do back in our smaller office.
    – slhck
    Aug 9, 2012 at 18:24
  • I think the web interface is 'admin', not 'root' (the default password is 'netgear1') Aug 9, 2012 at 19:01

2 Answers 2

3

you'll probably need to do an OS / Firmware re-install. Posts on the ReadyNAS forums on how to do this. An add-on is available called EnableRootSSH that will enable root access to your NAS, but i haven't seen anyone attempting to set up SSH for a standard user on their NAS or even know if it's possible.

3

It's not recommended, but it is possible to telnet the ReadyNAS by booting it into «Tech support mode». Only Netgear tech support is supposed to use it, but you can login yourself.

  1. Boot into Tech support mode. Method depends on ReadyNAS model, so see instructions on Netgear support.
  2. Open RAIDar and within about a minute you should see the IP show up, along with «TELNET - {number}».
  3. Telnet to the IP address (standard telnet port). Login: root Password: infr8ntdebug

You now have access to a shell, but the disks aren't mounted. Depending on the model, you need to mount them using different commands.

Newer models seem to use mdadm, but that is not installed on my old ReadyNAS Duo. But this worked for me:

start_raid.sh
# if hdc1 doesn't exist, try to locate disk with fdisk -l
mount /dev/hdc1 /sysroot
chroot /sysroot
mount proc
vgscan
vgchange -ay c
mount -a
3
  • 1
    How did you come up with the password ? is there a document behind it, if this doesn't work ?
    – clhy
    Nov 2, 2015 at 0:04
  • 1
    @The_IT_Guy_You_Don't_Like Google ;)
    – gregers
    Nov 2, 2015 at 15:30
  • Thanks so much for that login and password. Was lost without it Aug 31, 2022 at 3:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .