Question:
How do you change your forgotten password on ubuntu?
Tduck
2010-06-23 19:09:49 UTC
I need the root password to drop root shell prompt, and I don't know that. Is there another way or a way to change or view the root password? I need help asap!
Five answers:
Linux Mint 11
2010-06-24 02:23:43 UTC
How to reset your password in Ubuntu

http://www.psychocats.net/ubuntu/resetpassword





LUg.
The Technomancer
2010-06-24 02:12:53 UTC
First, you have to reboot into recovery mode.



If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.



If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.



For older versions of Ubuntu (9.04 and 8.04), you can press the Escape key during bootup in order to see the boot menu.



From the boot menu, select recovery mode, which is usually the second boot option.



After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.



The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.



Once you're at the root shell prompt, if you have forgotten your username as well, type



ls /home



That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation.



To reset the password, type



passwd username



where username is the username you want to reset.



You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.



Now the password should be reset. Type



exit



to return to the recovery menu.
Kornfan71
2010-06-24 02:16:10 UTC
If you have access to your own (non-root) account, go to a terminal:

$ sudo passwd root

Then put in the root password you want.



If you don't have access to another account, grab a LiveCD, chroot into Ubuntu, and do:

# passwd root

(^ That one is a little more advanced....See below, instead.)



You probably don't need to use the root account at all. The sudo command can do just about anything. You could also do "sudo su" in your own account to gain root access like that, without changing the root account's password.
Joe
2010-06-24 02:17:50 UTC
If your user account is the first one set up when you installed Ubuntu, then your login password is the "super user" (root) password.



Normally, you preface the command you want to execute with root privileges with "sudo": e.g.:



sudo mv xorg.conf xorg.conf_OLD



But, if you really must have a super user shell (I don't advise it!), enter:



sudo sh



and your login password when prompted.
2010-06-24 02:12:33 UTC
well have you treid a safe boot? if you can do that! thats what id suggest


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...