3

So there's this vulnerability from last year called CVE-2016-4484 that allows me to get a root shell by holding down the Enter key at bootup. It works on my computer (I've tried) I'm supposed to be able to just put the following code into the command line:

sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="panic=5 /' /etc/default/grub grub-install

However, that hasn't worked. I'm getting an error message:

sed: can't read grub-install: No such file or directory

I've already run grub-install. Can anyone help me with this? Thanks.

Byte Commander
  • 107,489

2 Answers2

5

From looking at your command and checking out the issue description you linked, I'm pretty sure it has to be

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/&panic=5 /' /etc/default/grub 

to edit the GRUB configuration and add the panic=5 kernel option , followed by

sudo update-grub

to update the boot loader with the changed configuration.

Byte Commander
  • 107,489
  • That looks more like it. – heynnema Jun 17 '17 at 22:29
  • @EndlessLight Well, if this answer solved your problem, please accept it by clicking the grey check button on its left. That way you also mark your question as solved. Thanks and welcome to Ask Ubuntu :) – Byte Commander Jun 18 '17 at 11:00
0

Based on this answer, I think you need to run the commands as root. Try the following:

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="panic=5 /' /etc/default/grub grub-install
sudo grub-install
sempaiscuba
  • 1,433
  • 1
    This will still fail. – heynnema Jun 17 '17 at 22:24
  • Your edit will still fail because of the sed command. And grub-install is not the correct command either. – heynnema Jun 17 '17 at 22:30
  • @heynnema The edit didn't change the command. All I did was to add the link to the original (accepted) answer from Rinzwind (to what appears to be a very similar question asked last November). Sadly, my phone only allows me to have one question open at a time, so I had to copy & paste the code and the link to the question in 2 separate operations. – sempaiscuba Jun 17 '17 at 22:58
  • Yes, I saw that... but Rinzwind's answer is wrong too... which is surprising... but David did an edit 8 days later... so who knows where the error got introduced. Personally, if this was my answer, I'd delete it :-) – heynnema Jun 17 '17 at 23:05