Brain Teaser

Mike Moore mike at x.co.uk
Fri Oct 5 01:05:51 AEST 1990


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 at x.co.uk or mike at ixi-limited.co.uk
Usual and obvious disclaimers... etc



More information about the Comp.unix.misc mailing list