When I boot ubuntu 12.04, I get this message on screen and the the system does not boot. This happened after I did the following:
- I installed
tor-browser
. When I tried to run it, it gave an error that
/usr/bin/tor-browser
permissions are set to root. So I did the following (was a mistake):sudo chown -R USERNAME /usr/
Now when I tried to run
sudo
, it gave the error:sudo: setuid must be root
To fix this, I rebooted to go to the GRUB menu. There I entered 'e' to edit the commands before booting. In the command beginning with
linux
, I appendedrw init=/bin/bash
so that I can get a root logged in terminal (I have forgotten my root password).When the command prompt loaded, I entered the following commands:
mount -o remount,rw / mount --all chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo
Now when I rebooted, Ubuntu does not boot and gives the message
could not write bytes: broken pipe