Saturday, April 24, 2010

getting root access to your ubuntu machine

 

so somehow i have managed to mess up sudo twice on my ubuntu desktop when trying to fix other problems, and i don't have the root password. here are instructions for gaining root access to your ubuntu machine (tailored to karmic, which works slightly differently than previous releases). these instructions of course require physical access to the machine so that you can do things like view the grub menu.
  1. Reboot the machine. 
  2. Hold down SHIFT during boot to see the boot menu (this is new in single-boot karmic). 
  3. Press ESC at the grub prompt. 
  4. Press e for edit. 
  5. To the line that begins "linux ..." add:
        rw init=/bin/bash
  6. Press Enter. 
  7. Press b to boot. 
  8. System will boot to a passwordless root shell. 
  9. Do what you need to do as root. 
  10. Reboot.

No comments: