[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ROOT created chaos !



On 23 Feb 1999, Miquel van Smoorenburg wrote:

 : In article <cistron.Pine.LNX.3.96.990223142756.1779B-100000@brahe.midco.net>,
 : Nathan E Norman  <finn@midco.net> wrote:
 : >On Wed, 24 Feb 1999, Bal K. Paudyal wrote:
 : >
 : > : As root, I typed the following:
 : > : 
 : > : "chsh /bin/usr/tcsh" when I meant "chsh /usr/bin/tcsh".
 : > : 
 : > : I just wanted to change the shell. But now because that shell file does not
 : > : exist, the system does not allow me to log in as root. I tried to log as su
 : > : but it does not work! There must be some way to change the things back!
 : >
 : >As your non-root user, type
 : >
 : >  su -s /bin/sh -c /usr/bin/chsh
 : >
 : >You will be prompted for the root passwd, and then the chsh command will
 : >run.
 : 
 : I changed the root shell to /bin/bash/nope, and tried this:
 : 
 : % su -s /bin/sh -c /bin/sh      
 : Password:
 : /bin/su: using restricted shell /bin/bash/nope
 : /bin/su: cannot run /bin/bash/nope: Not a directory
 : 
 : .. so that doesn't work.

[ snip ]

Bummer.  I ran my test with a valid root shell, of course - a rather
poor test case.

Sorry for the bum lead (and thanks to Mike for a good solution)

--
Nathan Norman
MidcoNet  410 South Phillips Avenue  Sioux Falls, SD
mailto:finn@midco.net           http://www.midco.net
finger finn@home.midco.net for PGP Key: (0xA33B86E9)



Reply to: