Hey guys,
A couple of weeks I was improving my home NAS a little by adding cron scripts for backups and a couple of things, I've been logging in for a while and starting bash (installed with busybox) as its a little more feature filled than the terminal that comes default. Anyway, I'd done it so often (started /bin/bash, that is), and without thinking added /bin/bash as the login shell for the admin user (the only ssh account, unfortunately), without thinking that the the file doesn't actually appear until after my path has been built and the busybox sym-links are installed. So basically now I can't login as its not pointing at a valid root shell.
The things I’ve tried so far are:
- Basic telnet/SSH login attempts, running a command as part of the SSH statement (i.e ssh
admin@qnap.****.local cat /etc/passwd)
- Issue chsh to attempt a login shell change (ssh
admin@qnap.****.local chsh /bin/sh)
- Writing a dodgy web script (total failure)
- Writing one of the QNAP installable packages (a QPKG) which appear to have elevated system privileges during install (can’t find enough information)
- I can’t take the drive(s) out to replace the file easily as its 4x drives in RAID-5 and I don’t have a PC to load them into
- I also can’t wipe the device as it (to my knowledge) deletes all data off the drives in the process.
Any ideas, short of me buying a couple of 2TB drives to back everything up on to whilst I wipe it, I would just unplug all the drives and rebuild the mdadm software raid array temporarily on another machine, but I just don't have access to a computer at the moment, all I've got is laptops, we use macbooks at work and every single one of my friends owns a laptop too :P