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

Re: getting bash back on a system



On Wed, Feb 26, 2003 at 10:53:40PM -0500, Eric R Cheney wrote:
> Well, I managed the dumbest: I uninstalled bash (don't ask, please
> don't ask why...).   Though apt complained it didn't want to...I did.
> Ouch!
> 
> Well, the system really has problems without bash, and I can't get it back
> on.  dselect quits.  apt quits.  Actually, I got half way through the
> uninstall, and apt quit there.  So apt and dselect have been dead since
> then. So I have a half uninstalled dysfunctional bash....
> 
> I'm up and running and I changed my user account and root account to
> the C shell; so I assume if I reboot, I'll at least have some working
> shell.

Since you've got a shell, you should be OK. Assuming you have some kind
of FTP client, download
ftp://ftp.debian.org/debian/pool/main/b/bash/bash_2.05a-11_i386.deb,
then:

  ar p bash_2.05a-11_i386.deb data.tar.gz | gzip -dc | tar xOf - ./bin/bash

That will extract bash in the current directory; copy it to /bin, and
make sure that /bin/sh is a symlink pointing to bash. Then 'dpkg -i
bash_2.05a-11_i386.deb' to reinstall it properly.

Obviously all of this is untested. :) It should be close enough to get
you started, though.

> I changed these shell variables in /etc/passwd...Is that correct?

'chsh' is probably what you want, at least under normal circumstances,
but editing /etc/passwd directly should work too. You can always log in
on a different virtual console to find out.

However, rebooting probably won't work too well without bash.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: