How to reset Ubuntu root password
If your memory or mistyping leaves you without the right password to get into an account on a Linux computer, there’s no need to reformat. You’ll just need to reboot into single user mode to reset it. Here’s how to do it on a typical Ubuntu machine with the GRUB bootloader:
- Reboot the machine.
- Press the ESC key while GRUB is loading to enter the menu.
- If there is a ‘recovery mode’ option, select it and press ‘b’ to boot into single user mode.
- Otherwise, the default boot configuration should be selected. Press ‘e’ to edit it.
- Highlight the line that begins with ‘kernel’. Press ‘e’ again to edit this line.
- At the end of the line, add an additional parameter: ‘single’. Hit return to make the change and press ‘b’ to boot.
The system should load into single user mode and you’ll be left at the command line automatically logged in as root. Type ‘passwd’ to change the root password or ‘passwd someuser’ to change the password for your “someuser” admin account.
Reboot
Once your done, give the three finger salute, or enter ‘reboot’ to restart into your machine’s normal configuration.
That’s all there is to it. Now just make sure to write your password down on a post-it and shove it somewhere safe like under your keyboard. 🙂
[ Source: Hackzine.com ]

I have tried this and it still does not work. Is there another option i can try? If not then how can i re-install Ubuntu via an NON admin user account ( I cannot remember my password in order to get into my main user account.) I have reset the password before but i have not used this system in such a long time i cannot remember what i changed it to…
Hi Lisa,
Why is the option above not work? Could explain the steps that you use.
At least with 8.10, when you select single user mode (either by adding single to your usual kernel line or using the recovery version in grub) you are forced into a Recovery Menu.
If you choose “root – Drop to root shell prompt” you are still prompted for the root password and are unable to reset it.
you are brutal, your advice sucks
goto recovery mode then add “rw init=/bin/bash ” press enter, then press b to boot your system.
hope this helps.
i can’t understand that….
and i was try this command to reset my password..
but i m not successful.
Plz tell me how to reset my root password on ubuntu.plz plz plz plz
Recovery mode, then drop to command line on Ubuntu worked great for me. thanks for the help!
Excellent! This lead me to right place. I’m using Jaunty.
My route:
1. Reboot the machine.
2. Press the ESC key while GRUB is loading to enter the menu.
3. Select ‘recovery mode’ option.
4. Select ‘drop to root shell prompt’.
5. ‘# nano /etc/passwd’ gives you a list of users
6. change any users password with ‘# passwd [username]’
Adding rw init=/bin/bash to the end of the kernel line in the recovery mode boot option worked for me. (“e” on recovery mode option, then “e” on kernel line to get there)
Thanks mjavier2k .
Mjavier2k… thanks. you have the truth…
for me grub not loading , It shows black screen before loading OS and when i press ESC button ,there is no effect on it, and it directly load OS .
I need to recover my root password
I use the init=/bin/bash and I get a root shell in fact but no useful commands work! neither passwd nor useradd nor anything.
thankyou for the gud article. keep writing such
articles. recently i had to reset my windows xp administrator password and a post on reset windows password at http://blog2wptest.blogspot.com really helped me
It’s all about the blacks people….don’t you know that by now?
Wow, the ‘rw init=/bin/bash’ worked for me too. Been a Linux admin for nearly 10 years and never knew that one 🙂
it work for us too..the whole class is doing this password changing
rw init=/bin/bash’
Worked for me. (Ubuntu running in virtualbox on mac 0s) THANK YOU!!!
when i used rw init=/bin/bash …there was no user mounted….when i used mount /usr
it said ther in nothing in /etc/fstab or /etc/mtab…smbody help…iam using ubuntu 11
boot with rw init=/bin/bash then reset the root password with “passwd”. Reboot again (w/o the rw… ) then login as root …
why Ubuntu 11.04 password didn’t recover
I used a password with an @ sign in it, and it didn’t seem to like it
Now I’m trying to reset, I choose Recovery, Drop to shell prompt, and I’m asked for root pw
Is there a way to get to sinlge user mode? I can’t enter commands by the login prompt
Grateful for any assistance. This is for Ubuntu 11.04 running in VMware Fusion on a Mac, version
blablabla ro single rw init=/bin/bash –> ctrl + X
cn u xplain this brefly by stps..!
thanks tubelawak!
After trying this about 5 times I gave up. The procedure does not work, you are STILL prompted for the password. I.e, this advice is a load of crap
All,
I had the problem with the error of “No sudoers users exist”, so found and followed the howto at:
http://www.psychocats.net/ubuntu/resetpassword
with the exception of using “Shift” for accessing grub2, and then edited both my:
/etc/sudoers
/etc/passwd
I found I had correctly created the users in the sudoers file, but the permissions were wrong in the passwd file.
You should see something like:
myuser:x:1000:1000:myuser,,,,:/home/myuser:/bin/bash
For the user you need root access for change the line to:
myuser:x:0:0:myuser,,,,:/home/myuser:/bin/bash
and save. Notice the root user has the “0:0” value and all users set to “0:0” will obtain root access.
I did this, exited the root shell with “exit” then selected “Continue in normal mode”, logged in with the root modified user and prompt came up:
root@boxname:/
so knew I had root access and could continue administration of my server box.
Hope this helps and was clear enough!
Cheers!
OMR
Easiest way to recovery the root password is
open the terminal with normal login and type sudo passwd root
it will ask the password for current login after successful login it prompt for new root password
Thank you so much! I’d tried several of the other suggestions above to no avail. This simple solution is the one that saved me.
No that is the insanity way as, if the person lost the password or it is corrupted, anything they respond with “it will ask the password for current login” will fail, because they would not be looking to reset the password if they already knew it.
Cheers!
TBNK
Me too, please help ..
I do not know whether it’s just me or if perhaps everyone else experiencing issues with your blog. It appears as if some of the written text on your posts are running off the screen. Can somebody else please comment and let me know if this is happening to them too? This might be a issue with my internet browser because I’ve had this happen before.
Appreciate it
My spouse and I absolutely love your blog and find a lot of your post’s to be exactly what I’m looking for.
Would you offer guest writers to write content in your case?
I wouldn’t mind creating a post or elaborating on many of the subjects you write with regards to here. Again, awesome website!
However, it is undoubtedly very important to create a banner
that actually signifies your motive and campaign in proper
manner. Our vinyl banners are printed at up to 1440dpi, with
UV protected inks, finished with moulded, strengthened plastic eyelets, or with pole
pockets, which ever meets your needs. You should try to promote your stand five or six months
in advance.
I blog quite often and I truly thank you for your content.
Your article has truly peaked my interest. I am going to book mark
your site and keep checking for new details about once a week.
I opted in for your Feed too.
ต่ำกว่า 18 ห้ามคัดลอกลิงค์ น่ะจ้า
>>>>>>>>>>>>>>>>>>>> เวป มวยไทย 2000ปี ( น้องโจ
มวยไทย 2000 ปี ) โคตร มวยหู
085-7377349 รายสัปดาห์ 500 รายเดือน 1500 สายส่วนตัว 2000
ไม่ประชุมสาย สดๆ ในเวที มีของให้เล่น เน้นมวยรอง
เครื่องต่อ เครื่อง ไม่ผ่านกล่อง เสียงเร็วกว่าภาพที่เห็น
.เเจ้งให้ทราบ เนื่องด้วยขณะนี้ พวกมวยหู ก็อป ไร้คุณภาพ ระบาดหนัก จะสมัคร หูครั้งใด เรียกใช้ น้องโจมวยหู นะครับ สนใจ
โทร 085-7377349 โจมวยหู
…จะสมัครหู ขอบเวที โทรมาที่ 085-7377349 น้องโจมวยหู ระดับโลก ……085-7377349 ที่เด็ด มวยตู้…………รับรองไม่ผิดหวัง ติดต่อ 085-7377349 น้องโจ มวยหู
If some one wants to be updated with latest technologies
after that he must be visit this site and be up to date every
day.
Even the quotes for facebook give a tough competition for their counterparts.
GPS Tracking device can fit in any device and is available in
all sizes with which tracking and locating of your belongings has become
easier and efficient. One of the latest trick to avoid the firewalls in schools
and offices now a days is very popular known as Translator.
I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored subject matter stylish.
nonetheless, you command get got an impatience over that you wish be delivering the following.
unwell unquestionably come more formerly again as exactly
the same nearly very often inside case you shield this hike.
If you would like to obtain much from this piece of writing then you have to apply such strategies
to your won blog.
Hey there! I realize this is kind of off-topic but I needed to ask.
Does building a well-established blog like yours
require a large amount of work? I’m brand new to operating a blog
however I do write in my diary on a daily basis. I’d like
to start a blog so I can easily share my personal experience and feelings online.
Please let me know if you have any suggestions or tips
for new aspiring bloggers. Thankyou!
Download Madden 16 Coin Glitch and get Unlimited Coins and Cash!
Download here : Madden 16 Coin Generator