Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!mit-eddie!bloom-beacon!wchuang From: wchuang@athena.mit.edu (Mithrandir) Newsgroups: comp.unix.misc Subject: Re: Brain Teaser Message-ID: <1990Oct6.041414.24059@athena.mit.edu> Date: 6 Oct 90 04:14:14 GMT References: Sender: daemon@athena.mit.edu (Mr Background) Organization: Massachusetts Institute of Technology Lines: 36 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 [ $USER = "root" ] > then > /bin/sh.bin > else > /bin/rsh >fi > >log out and log back in (assuming that your passwd file has you set to >use /bin/sh > >you can't (can't exec a shell of course). > >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.... > >Mike Moore >mike@x.co.uk or mike@ixi-limited.co.uk >Usual and obvious disclaimers... etc Reboot the workstation, enter single-user mode and move /bin/sh.bin back to /bin/sh. -- ---------------------------------------------William Chuang MIT '91 ARPA: wchuang@athena.mit.edu BITNET: wchuang%athena.mit.edu@MITVMA.BITNET UUCP: ...!mit-eddie!athena.mit.edu!wchuang