[SPARCbook] Hosed /etc/passwd file

patl at phoenix.volant.org patl at phoenix.volant.org
Tue Jan 11 13:58:18 CST 2000


On 11-Jan-00 at 05:03, James D. Meacham (jmeacham at hume.jhuccp.org) wrote:
> 
> So, I'm going against the Conventional Wisdom and editing /etc/passwd on
> my 3GX running 2.6 by hand.  Although I've been trying to teach my 22
> mo/old son proper computer values by giving him his own Intel machine (an
> old 486) to bang on while telling him at all times to respect the unix
> equiptment, while I was edit the file, he jumped into my lap.  Now the
> shell section of root line in /etc/passwd reads /bin/bashXY .So now I
> can't login or su to root.  It won't even let me run commands as root
> 'cause there is no shell to handle them.  Even booting into single-user
> mode doesn't work; I just get a "no shell" message and it boots into
> multi-user.  Very frustrating, because I didn't notice it had happened at
> the time, and i've been using it in root mode doing systems suspends for
> the last few weeks.  Anyone have any suggestions, or am I going to have to
> boot from an external CD?  Jeez.

Booting from an external device is the only solution that I can
think of; but once you've solved it you might want to consider
having aliases for root that use different shells.  I generally
leave 'root' using whatever the system default is; and add something
like 'rootb' to use bash.  Some systems come with more than one
superuser entry.  For example FreeBSD has 'root' with /bin/csh
and 'toor' with /bin/sh.



-Pat






More information about the SPARCBook mailing list