PEBKAC (peb-k-aac)
- abbr.
1. (exp.) Problem Exists Between Keyboard And Chair
2. the result of the use of a machine by a fool, who should not be left in control once again
3. idiot..
I’ve been using linux in some form or another for well over ten years now, and I’ve (at least in my mind) been past the n00b stage for the better part of that time period. Of course, in my case, it doesn’t matter if I was an occasional user or the Grand Pu-bar of Gentoo-vian I’d still make mistakes, and this week I embarrassed myself terribly.
My beloved home NAS (QNAP TS-409 Pro that I wrote over a year ago) has been customised in many different ways and although underpowered when compared to the rest of the computers in the house has taken over responsibility of many things that my laptop(s) previously did, such as:
- Headless Transmission (Bittorrent) client
- Auto downloading based keyword searches from RSS feeds
- Scheduled speed changes (off during business hours, 1/3 speed during the evenings, then full speed at other times)
- Daemon controllable web client (clutch), Android app (Transdroid) or one of the many transmission remote clients for Windows, Mac and Linux
- Automatic seed ratio checking to stop seeded downloads at a certain point and unpack/move the downloads their area (Music/TV/Movies — all legal of course)
- Automatic remote backup
- Rsync backups from the hd911.com server
- SVN mirror for remote development SVN server, and a primary personal SVN server which is replicated elsewhere
- UPnP server for my XBMC PC, pushing all available media content, photo collection to any UPnP client
- Subsonic Media Server – mainly so I can stream my music collection to my phone, or when I’m out or at work
- and all the other features that come with the device as standard
Needless to say, I use it for everything, and now I can’t due to a momentously stupid change to /etc/passwd, where I altered the root account (the only one accessible remotely) login shell from /bin/sh to /bin/bash, which ashamedly isn’t accessible until after logging in (some magic in .bashrc) to link the bash from the optware/NSLU2 installation in /opt/bin back to it’s normal place /bin. Now unfortunately, I can’t login at all (except via the web client), but I can’t for the life of me figure out how to change the value in /etc/passwd so I can fix it.
Links to an article that seems somewhat relevant
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.
The way I see it, I’ve now got two choices, either to buy a large HDD and move all the shared stuff off before wiping the device and starting again although this is not perfect as I’ll lose all the scripts and configuration that aren’t accessible via network share. My other option is finding someone with a PC and 4x SATA ports and attempting to re-mount the array, this is probably the best/most reliable the way, but I believe it or not don’t know any one with such a machine, and we’ve all got Macbooks at the office.
Any ideas, anyone?















