2

I did a blunder on one of my production server and its very old RHEL 4 host. Due to recent "shellshock vulnerability" by mistake I upgraded the bash to wrong version from RHEL5 repo.

Now I am getting the error -bash: error while loading shared libraries: requires glibc 2.5 or later dynamic linker.

Complete Error :

ssh [email protected]

-bash: error while loading shared libraries: requires glibc 2.5 or later dynamic linker

Now I am unable to login to server also I tried rebooting host with older version of kernel and all but that did not work. I tried rebooting the host into single user mode but it is also not working. I am completely stuck with this issue and its very critical for us.

Thanks,

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • Do you have access to console? And if you did not delete the old bash rpm package then you can try rebooting in safe mode and uninstall new rpm package and reboot the server and see if that helps. – Pratap Oct 11 '14 at 22:42
  • @PratapSingh: Yes I do have access to console but even single user mode does not work and am unable to login to server with the same error on console too. –  Oct 11 '14 at 22:46
  • change the shell while booting it and try. I faced same issue long time ago and did change the shell to `/bin/ksh` , append following `init=/bin/ksh` (for me it was VM) at the end of your kernel like and boot , you should be able to access the server then delete new bash rpm package. Check if this helps. – Pratap Oct 11 '14 at 22:57
  • Ohh great let me check if that works for me too. –  Oct 11 '14 at 22:57
  • Superb :) I logged in but :( proc is not mounted as well as file system is read only ... any idea why. –  Oct 11 '14 at 23:04
  • try mounting them ? `mount -o remount,rw /` and `mount -t proc none /proc` – Pratap Oct 11 '14 at 23:07
  • @PratapSingh: Awesome man thank you very much you saved me .. Please post it as an answer :) Thanks again :) –  Oct 11 '14 at 23:25

2 Answers2

1

Boot the system from a RHEL 4.x installation media, which you should have kept handy for this.

At its boot menu, boot into rescue mode.

The rescue mode will mount your filesystem at /mnt/sysimage, where you can then work on it.

To fix the problem, locate a bash RPM for EL4, download it while booted into the rescue environment and reinstall it, for instance:

cd /mnt/sysimage/var/tmp
wget http://www.example.com/bash-3.0-27.0.1.el4.i386.rpm
rpm --root /mnt/sysimage -Uvh --oldpackage bash-3.0-27.0.1.el4.i386.rpm
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thanks @Michael: Let me check if my DC support engineer can help me to boot into rescue mode as I do not have physical access to server and we need to insert CD in it. My DC support is not that good :( .. Any other way around so that I can do it quickly –  Oct 11 '14 at 22:33
  • This _is_ the fastest way, and probably the _only_ way. – Michael Hampton Oct 11 '14 at 22:37
  • Ohh I have a ticket opened with them as after rebooting my server I am unable to ping it since I tried to boot into single user mode and it failed to come up online and its been long time they are unable to provide help and I will move my server to some better hosting provider .. –  Oct 11 '14 at 22:45
1

You can do the following

Reboot the host with console option and Edit grub to add "init=/bin/ksh" at the end of the kernel line and boot so that you will get the shell

Now Mount the proc partition

mount -t proc none /proc

Remount the root partition :

mount -o remount,rw /

Do remove the new rpm

rpm -q bash
bash-Old _version
bash-new-version 

rpm -e bash-new_version

Confirm you have old version

rpm -q bash
bash-Old _version

Now reboot

Pratap
  • 695
  • 6
  • 22