Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!hub.ucsb.edu!spectrum.CMC.COM!lcuff From: lcuff@spectrum.CMC.COM (Leonard Cuff) Newsgroups: comp.unix.misc Subject: Re: Brain Teaser Message-ID: <1990Oct5.213855.13493@spectrum.CMC.COM> Date: 5 Oct 90 21:38:55 GMT References: <15937@rouge.usl.edu> Organization: Rockwell CMC Lines: 26 In article mike@x.co.uk (Mike Moore) writes: >Here's one (do NOT actually do this, it appears to be lethal): >now assume that *everyone* is set to use /bin/sh (including root), how >do you get out of this without rebuilding the operating system? I don't >think there actually is one..... but.... Some versions of UNIX are distributed on floppies and the boot floppy can be used to mount the hard disk (after stopping the installation process early on). The password file could then be edited, or whatever other hacks come to mind. I have recovered System V/386 systems from AT&T, 386 systems from Interactive (ISC) and ancient Callan systems (SVR2) using this technique. It tends to be ugly, because you have to know the device name(s) of your partitions and you must use full paths that have this ugly prefix, and an editor like vi doesn't typically work 'cos it can't find its termcap or terminfo files, but one can muddle along with sed. This technique is helpful in a variety of scenarios, most of them involving badly munched hard disks: bad boot block on the hard disk, bad fsck, bad passwd file, you get the idea..... Lots of fun. :-) -- Leonard Cuff if ( my_words == Rockwells_words ) lcuff@cmc.com hell_freezes_over = now; "I feel like a fugitive from th' law of averages" - Bill Mauldin