PDA

View Full Version : [ubuntu] Intrepid install Failed. Need to get to single user root mode



davidkahn
November 1st, 2008, 04:02 AM
I have set up Grub to require a password to select recovery alternative modes. However, in the past when I selected a "Recovery Mode" version of a kernel, it went directly to a command prompt logged in as root. Now with Intrepid I come to a new menu that has an entry "Drop to root shell prompt", which I can't use because it requires the root password, and in Ubuntu you don't need to know root's password.

What am I supposed to do?

Help!!!

David

davidkahn
November 1st, 2008, 08:15 PM
I don't know if anyone is going to read this, since there were no replies to my question. But since I solved it, I wanted to post my solution for other people. Moreover, if requiring a password to get to the single user prompt logged in as root was intended to improve security, I just found a security hole. This hole might not apply to my computer because I setup /boot/grub/menu.lst to cause grub to require a password to edit the grub boot parameters. But since many people don't, this procedure is a security hole for them.

I used grub to perform a one-time edit of the boot line:

kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/md0 ro single
and made it:

kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/md0 rw init=/bin/bash
Booting then brought me to a command prompt as root, with the file system being read-write. I then used the passwd program to set root's password to a known value, and now I can select menu item that has an entry "Drop to root shell prompt", and enter root's password.

However, having a (presumably) crackable root password seems so un-Ubuntu. So I am wondering if anyone else has a more elegant solution.