Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!elroy.jpl.nasa.gov!jarthur!nntp-server.caltech.edu!mustang!data!gigantor!hahn From: hahn@nas.nasa.gov (Jonathan Hahn) Newsgroups: comp.unix.misc Subject: Re: Brain Teaser Message-ID: <1990Oct6.012916.12485@nas.nasa.gov> Date: 6 Oct 90 01:29:16 GMT References: Sender: news@nas.nasa.gov Organization: NAS Program, NASA Ames Research Center, Moffett Field, CA Lines: 27 In article mike@x.co.uk (Mike Moore) writes: >Here's one (do NOT actually do this, it appears to be lethal): > > mv /bin/sh /bin/sh.bin > >create a shell script called /bin/sh with the following If your sys admin is on top of things, s/he would simply boot off an alternate root pack (prepared ahead of time, obviously), then mount and repair the primary root fs. The crisis would be no more traumatic than an ordinary reboot. If you're not so lucky, there are still alternatives. If you're on SYSV, I believe there is (at least there used to be) a suite of stand-alone utilities which could be used to repair the damage. On bsd, you could build and boot a mini-root in your your swap partition and mount & fix the primary root fs, but it would be a pain. >-- >--- >Mike Moore >mike@x.co.uk or mike@ixi-limited.co.uk -jonathan hahn -- hahn@gigantor.nas.nasa.gov wk: (415) 604-4360 ..!ames!amelia!hahn hm: (408) 736-7014