[SOLVED] Ubuntu recovery mode asks for root password
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed the fglrx ATI drivers on my notebook (Toshiba M30X) running CrunchBang 9.04.1, and they messed the system up so bad X doesn't even boot - it seems to crash with a sort of weird multicolored display on which you can't do a thing.
Apparently, they aren't supported in 9.04.1 - gee, that would sure have been nice to know before attempting this, thanks a bunch AMD.
So I reboot, get to the grub menu, select recovery mode, and it boots into the recovery menu. From here I select "root - drop to root shell prompt"... and I get a password request for the root account (no, not the user account; I tried that already). Ubuntu doesn't HAVE a root account, and so doesn't have a root password. Result: can't access rescue console to remove the deity-damned fglrx drivers.
I've googled, but every mention of the recovery mode says it should drop you to root without asking for the password. Which is logical, except mine doesn't.
I installed the fglrx ATI drivers on my notebook (Toshiba M30X) running CrunchBang 9.04.1, and they messed the system up so bad X doesn't even boot - it seems to crash with a sort of weird multicolored display on which you can't do a thing.
Apparently, they aren't supported in 9.04.1 - gee, that would sure have been nice to know before attempting this, thanks a bunch AMD.
So I reboot, get to the grub menu, select recovery mode, and it boots into the recovery menu. From here I select "root - drop to root shell prompt"... and I get a password request for the root account (no, not the user account; I tried that already). Ubuntu doesn't HAVE a root account, and so doesn't have a root password. Result: can't access rescue console to remove the deity-damned fglrx drivers.
I've googled, but every mention of the recovery mode says it should drop you to root without asking for the password. Which is logical, except mine doesn't.
What now? *sigh*
May favorite part of your post is this: "Ubuntu doesn't HAVE a root account". This remark should go down in posterity, along with "Oh, the humanity" (Hindenburg disaster, 1937) and "Houston, we have a problem" (Apollo 13, 1970).
1. All Unices have a root account. This is (among other things) because Unices are not Windows.
2. If you believe your Linux version doesn't have a root account, and if you have not bothered to learn how to access it and establish/learn its access password, you need a crash program of cybernetic re-education. This post is the first step toward that goal.
3. Erase your short-term memory, and I do not mean your system RAM. Accept that your system has a root account, learn its password, and learn how to access it.
Knowledge can make you free. The next time you're absolutely sure you're right about something, resist the temptation to post your views in a public discussion forum.
Although linuxlover.chaitanya and lutusp are technically correct (there is a root user), it does not help.
You can try to boot your system normally and when it's fully booted, press <ctrl><alt><F1>. You should be taken to a console where you can login as the normal user and take it from there.
Alternatively, do a search how to recover a root password (e.g. using a live CD).
Or you can just do "sudo su" and then change/set the root password with "passwd" command after switching to antoher console (with <ctrl>+<alt>+<F1>) and logging in with your own username. After that you can user the root prompt from the recovery mode with your newly set root password.
You can login with your normal account and then use sudo passwd root to change the root password. You will be asked for your account password. This is the same password that you logged on with.
May favorite part of your post is this: "Ubuntu doesn't HAVE a root account". This remark should go down in posterity, along with "Oh, the humanity" (Hindenburg disaster, 1937) and "Houston, we have a problem" (Apollo 13, 1970).
Really? Wow, I didn't think it was such an important statement. But hey, if it gets me into history, then I'll make sure to repeat it as often as I can.
Quote:
2. If you believe your Linux version doesn't have a root account, and if you have not bothered to learn how to access it and establish/learn its access password, you need a crash program of cybernetic re-education. This post is the first step toward that goal.
I'm guessing you've already taken your crash course in "patronizing speech"?
I'm familiar with root access; I gave a go at Mandrake a few years ago (it didn't last too long). Ubuntu, however, doesn't require me to bother with root, so I didn't. How was I to know it'd one day want a password which it never asked me to set before?
Quote:
Knowledge can make you free. The next time you're absolutely sure you're right about something, resist the temptation to post your views in a public discussion forum.
Oh for Pete's sake, if I were absolutely sure of stuff I wouldn't be posting in forums at all, I'd just work from the encyclopedic knowledge of everything that I'd have in my gargantuan brain.
I have news for you: people are occasionally wrong. This does not automatically make them idiots. Yes, I know, you're shocked and flabbergasted by this revelation, but trust me, that's how it works.
Now that you know that, is there any chance you could step down from your altar and help us miserable mortals solve our troubles? Thanks.
To all the others: I cannot login at all, or I'd have already apt-get-removed the fglrx drivers from the console. When the weird coloured screen appears, the computer seems to understand no input. I already tried ctrl-alt-f1, and I also tried banging like a monkey on ctrl-alt-backspace while it was loading in the hope it stopped X before it got to the part where it gets confused; nothing works. I get the weird screen, and that's that.
Is there any way to get it to skip automatically loading X at boot that doesn't require being logged in to set (so presumably from grub)?
Err...? No...? You will not be able to set the root password that way. At least not with passwd command. However, you could change the default runlevel of the system to a one that doesn't autostart X. Unfortunately I have no idea of the Ubuntu runlevels, so I don't know which one you should choose. Anybody else? The runlevel is set in /etc/event.d/rc-default. The default runlevel is 2 (the line that says telinit 2).
-- edit --
Or you could also temporarily remove the execute bit of the X server:
chmod a-x /usr/X11R6/bin/X
That ought to prevent it from starting up > Not sure if it will work though.
Also, remember to take care that you edit correct files when you're working with live-CD. I.e. because / is the root directory of the Live CD, you must make changes in [mountpoint]/etc and [mountpoint]/usr/X11R6/bin, in which mountpoint is the directory where you mounted your harddisk.
--edit--
Ok, I found this description of the Ubuntu runlevels:
* 0 System Halt
* 1 Single user
* 2 Full multi-user mode (Default)
* 3-5 Same as 2
* 6 System Reboot
So there is no runlevel without X in Ubuntu (3-5 are the same as 2)?! How stupid. There is no point in changing the runlevel, it won't make any difference. Apparently this is the "correct" way to disable X in Ubuntu:
sudo update-rc.d -f gdm remove
With live-CD you can just do: "rm [mountpoint]/etc/rc2.d/S30gdm" that'll remove GDM for runlevel 2.
I managed to rescue the system. I edited /etc/X11/default-display-manager and commented out the "/usr/sbin/gdm" line, then rebooted and it went to text mode. Apt-get-removed the fglrx drivers from there, restored the commented line and now it works.
Nice to know you got it working. I do recommend setting the root password for your system anyway. That way you can at least get the system to a single user mode without X if something goes wrong.
Good to know about it. As far as our responses go, most of them were in assumption that you can boot the system but you do not know the root password. And this what your first post gives the feeling.
And if you feel that you have solved the issue just mark it done. This will help others with similar issue search better.
I have news for you: people are occasionally wrong. This does not automatically make them idiots.
I never said you were -- I would never take that position. I did say you should be asking questions, not making statements of fact. Your premise and your certainty (that Ubuntu desn't have a root account) was the problem to be overcome.
Many people have system problems. They ask questions and get answers. Yours wasn't a system problem, it was a belief problem.
lutusp's dickness aside, setting the root password is a violation of Ubuntu security policy, where it is disabled by default. So consequently this is a bug, unless the root password was set previously.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.