-   SUSE / openSUSE (
-   -   Accidentally overwrote /bin/sh (

roastedmnm 07-25-2005 02:28 PM

Accidentally overwrote /bin/sh
SuSE9.3 Pro

Simply put, I was going to install some package and used su to give myself the privlages to do so but then realized that I had the folder in the wrong directory so I 'cd installfolder /bin/sh' not realizing that there was already a file named sh.

Now when I boot I get errors stating that: SuSEfirewall2_setup alsasound boot.udev earlykdm earlykbd hal cron dbus hwscan mdusd nfsboot nscd postfix random rcd smbfs smb cups nmb splash_early sshd xinetd resmgr and portmap cannot be found on runlevel (I forgot to check the runlevel).

Also the login screen states "Log into (none)". It will properly properly authenticate username and password but after logging in (root or user)I recieve a simple command line in the corner and that shows '(none):#'. From this command line I can see / and can mount the rest of the harddrive (multiple partitions) but I seem to have no access to any cd rom drive.

In trying to solve this problem I first tried YaST2's autmatic recovery option (on the boot cd) to no effect and I have copied the file /bin/sh from another SuSE9.3 Pro machine (this was a server machine so no kde/gnome), however, neither had any noticable effect.

Please help this noob that knows just enough to be dangerous. :(

"su is the root of all kinds of evil"

oneandoneis2 07-25-2005 02:51 PM

/bin/sh has always just been a symbolic link to /bin/bash on distros I've used.

roastedmnm 07-25-2005 03:12 PM


Originally posted by oneandoneis2
/bin/sh has always just been a symbolic link to /bin/bash on distros I've used.
If this is the case, then why have about 20 important files dissappeared, and why has my box ceased to have a name ex. Login to (name) or start kde etc properly?

I haven done anything ground breaking in the last week (I think that was what my uptime was) other than that mistake. I just don't want to have to reinstall everything. (i.e. this noob got ATI drivers to work, my printer to work-and a bear that one was, my sound to work properly with my card, and installed several (read 20-30) packages that provided important stuff that I use, but don't know the names of).


oneandoneis2 07-25-2005 04:52 PM

Have the files disappeared, or are they just not being run any more?

Shell scripts are generally set to be run by /bin/sh - if you no longer have /bin/sh, you'll loose the functionality of every shell script on your machine.

roastedmnm 07-26-2005 01:12 AM

Thanks for the suggestions. I noted that the programs were still there and created a new symlink. (pouf) It works again. :D



oneandoneis2 07-26-2005 03:37 AM

Told you ;)

All times are GMT -5. The time now is 10:19 AM.