-3

I was upgrading bash for patching the shellshock vulnerability, so i follow a tutorial and i guess i messed up by replacing the old bin/bash $PATH, so i can´t login to my macbook...

The tutorial says: If you are very paranoid, you can remove execute permissions on the bash_old ....

$ sudo chmod a-x /bin/bash_old /bin/sh_old.... ------> Suspicious code...

I think this is the big mistake, so i replace the old PATH to new PATH with the new bash update (Upgraded with Homebrew) by following the steps:

$ sudo ln -s /usr/local/Cellar/bash/4.3.25/bin/bash /bin/bash

$ sudo ln -s /usr/local/Cellar/bash/4.3.25/bin/bash /bin/sh

When I restarted the macbook, i set my password and it keep on loading mode...loading...loading....and nothing happens...

I tried many things like restoring NVRAM, restoring disk, changing password as single user mode, and nothing happens.... Damn!!

Here the tutorial:

https://apple.stackexchange.com/questions/147005/can-bash-be...

1 Answers1

2

I did this exact same thing and had the exact same issue. Place your old bash and sh in their appropriate places in /usr/bin. You can do this by using target disk mode.

Also, there is an official patch from Apple: http://support.apple.com/kb/DL1769

Further support:

I mean you literally have to plug your macbook into another mac with a firewire/thunderbolt cord. Hold down T wile booting up your inaccessible mac. Then your computer will be mounted as a hard drive on the other.

So you just need to navigate to the /usr/bin directory in finder. You can turn on hidden files and directories by performing the following SUDO defaults write com.apple.Finder AppleShowAllFiles YES; killall Finder.

Once in /usr/bin, just rename the file bash_old or sh_old (whatever you named your backup to) to bash and sh respectively. If you did not make backups, then you will need to copy them from somewhere else and hope they are compiled correctly.

Also note that I could not navigate via terminal into my inaccessible macbook, only Finder. I am not sure why this was.

PhysicalChemist
  • 540
  • 4
  • 14
  • Could you help me please, im newbie in shell code, so i did things like export PATH=/bin:/bla bla bla and nothing happen... i tried to replace the PATH but it ain´t work.. – wakarnaker Oct 01 '14 at 20:50