The other day I got called because someone had forgotten their root password. This happened to be on a SCO system, but it happens on Linux systems too and I have articles here on how to recover your system.
This work can get nasty - I don't know what I'm likely to be walking into: the system might be ancient, there probably aren't boot disks, there may not even be original install media available. You never know. Before I do anything, I try logging in with what they *think* the password is, and I also check to make sure the problem isn't just that there's a bad key on the key board - I've seen that too many times to count.
The next thing I do is take a look around for disks. I'm looking for boot disks, install media, whatever. Often the systems owners have no idea where any of that might be, so we'll have a fun little easter egg hunt, pulling open drawers, peeking in closets and so on. Sometimes someone will ask me why I don't just "get to it" or similar sentiments that imply that I'm just wasting time rather than actually trying to find an easy way to solve this that could save them a small pile of money. As that small pile ends up in my pocket, you'd think I'd just say "Yessirre, boss, I *was* just wasting time but now I'll get to work! Yes, sir!", but I'm more likely to tell them that if they don't leave me alone or help me look I could get all pissy and just walk out. Sometimes people forget that they called me: I didn't come knocking on their door looking for work. I think it's important to establish who's in charge right away: sometimes foolish folks think they are, but that's so very wrong..
Just half kidding there, folks. Just half.
Anyway, I looked around and wasn't too happy. No emergency boot disks, no original install media, nothing at all. But then in a box of ancient software I found a very old Microlite Edge disk and a Lone-Tar disk of the same apparent age. Did the customer know which of these he had? Of course not.
By the way, there are reviews of these products here. I highly recommend you use one of them on Unix or Linux.
I power cycled the poor box. Hated to do it, but what else can you do? When it came to "Boot:" I typed in "dir" and yep, there was the tell-tale Airbag A2 file. Note that you don't see "airbag", you see its A2 file. Airbag is Lone-tar's emergency boot recovery software; when it's configured there's an option to put it on the hard drive in addition to the normal floppies or cd's. While its purpose is bare metal recovery, it can also give you access to a root shell without a password. So.. I then typed "airbag" and happily the right entry was in /etc/default/boot and a few seconds later the Airbag menu was on the screen. I exited to a shell, mounted /dev/root on /mnt, and then edited the password fields out of /etc/shadow and /tcb/files/auth/r/root. Reboot, stop in single user mode, press enter for the password, run "passwd" and it was done.
The Airbag on the hard drive is of course a terrible security risk if someone has physical access to the machine, but physical access is a security risk anyway, right? So this saved me time and trouble.
Hi Ho Silver - Away!
Got something to add? Send me email.
More Articles by Anthony Lawrence © 2012-07-13 Anthony Lawrence
While modern technology has given people powerful new communication tools, it apparently can do nothing to alter the fact that many people have nothing useful to say. (Leo Gomes)