How To Reset The Root Password On Ubuntu 22.04 LTS If Forgotten (Linux)
If you have forgotten the root password on Ubuntu 22.04 and need to reset it, you can follow these steps:
1. Start by rebooting your Ubuntu system. When the GRUB bootloader menu appears, select the default Ubuntu entry, but do not press Enter. Instead, press the 'e' key to edit the boot options.
2. In the boot options, locate the line that starts with `linux`. At the end of this line, append `init=/bin/bash` to specify that you want to start a bash shell as the init process.
3. Press `Ctrl + X` or `F10` to boot into the modified boot options. This will start a bash shell with root privileges.
4. Once the bash shell is loaded, you will be at a root prompt (`#`). Enter the following command to remount the root filesystem in read/write mode:
```
mount -o remount,rw /
```
5. Now, you can reset the root password by entering the following command:
```
passwd root
```
You will be prompted to enter a new password for the root user. Enter the password and confirm it.
6. After successfully resetting the root password, remount the root filesystem in read-only mode using the following command:
```
mount -o remount,ro /
```
7. Finally, reboot your system by entering the following command:
```
reboot
```
Upon reboot, you will be able to log in as the root user using the new password you set.
Please note that resetting the root password should be done with caution and only when necessary. Make sure to keep your root password secure and remember it to avoid any potential security risks.
#Ubuntu #RootPassword #PasswordReset #SystemAdministration #Linux
Пікірлер: 151
I cant believe that actually worked...nothing usually works when I try it...😂 thank you very much
Finally!!!! Something that worked!!! Thank you ❤❤❤❤❤ they kept saying press shift but that didn’t work for me. I’m so glad I found your video
@rok.cernetic
Ай бұрын
I i use this method and reset password will everything else stay the same such as files and apps?
The title is kinda misleading. It says "how to reset *root* password" but it's Actually how to reset normal user password. Because clicking on the root option requests you to enter a root password if you set one, in your case you did not that's why it just let you in. In my case I lost both user and root password and I need root password to access the root she'll
@robertjkilgore
6 ай бұрын
Same problem here what did you do?
@q.u.e.r.t.y
6 ай бұрын
@@robertjkilgore I just gave up and just re-installed. It was near the right time I should do a re-install anyway as it has became tradition for me to reinstall my OS after every year. If you forgot user login (not just root) and therefore you can't log into the computer but you have important files that you want to get before re-installing, I believe you can open a live Ubuntu (can do it while re-installing) and mount the partition where the data is and copy the stuff you want and reinstall. There's definitely a way to get root from a normal user without password, for example I know of some root-escalation projects you could curl but won't give links for ethical reasons but if you're desperate you can look it up.
@bobbo2576
6 ай бұрын
I know my root pass but it says user doesn’t exist when I try to change password
@q.u.e.r.t.y
6 ай бұрын
@@bobbo2576 I don't think an error message would lie to you, so if it says the user does not exists then it means you wanted to change password but mentioned a user that does not exist 🤷 Seems it's you that used the command wrong. Would have helped if you gave the exact command rather than just what it says but you probably wrote something like this *sudo passwd A_NON_EXISTENT_USER* You can see users that can login by seeing the files in your /home directory
@bobbo2576
6 ай бұрын
@@q.u.e.r.t.y well I figured it out. My user name was different than the login name.
ASKING FOR ROOT PASSWRD FOR MAINTAINANCE
Thank you. It works perfectly. Short and clear instructions ❤
Perfect video! It worked. I recommend this method to anyone who is trying to recover the password. Thanks!
Thankyou brother,It worked.I did lot of method by watching other youtubers but this one only worked.❤
This does not work as it say give root password for maintenance.
@thesuinonick2179
4 ай бұрын
same, fuck it im just gonna reinstall it
@CapCreeperGR_Main
2 ай бұрын
The person making this video doesn't seem to know what root is. The actual easiest way to do this is getting a new USB with any Linux distro installed, opening a terminal, mounting your root partition using 'mount /dev/sdXA /mnt' X being the letter assigned to your drive and A the number of the partition (You can get this info by typing 'lsblk') then enter 'chroot /mnt'. You will now be logged into a terminal with your Ubuntu installation as root. Finally you can type 'passwd root' and set a new password from the chroot shell. Type 'exit' to leave chroot, close the terminal and reboot. There is technically another way to do this without a USB by adding a certain option in your Ubuntu grub entry. If you select the top entry in grub and press 'e' instead of enter you are able to edit the entry. You should be able to add the following 'init=/bin/bash' at the end of the line that starts with Linux and press F10 to boot but I've not personally tried this. There is not really much harm in trying this but do some research on init=/bin/bash first online. It should basically just drop you into a terminal instead of starting the default 'init system' on your machine and you can use the passwd command from there too
guys please after selecting root, im not able to enter the maintenance mide and type the mount command
Hi, I have followed your video because I have forgotten my password. I am running Ubuntu 22.04.3 LTS on VirtualBox and I originally set it to auto-logon so I can get into the OS but many things are now unavailable to me because they ask for my password before proceeding. I did the Grub -> Recovery Mode -> process but in your video it just shows "Press Enter to..." whereas when I do it it askes for my Password to continue!! Can you suggest why my Ubuntu is working differently to yours and is there a way to reset the password without actually knowing what it is? Thanks PhilipJ
Hi, I'm using Proxmox and can't access the GRUB menu. I tried pressing Esc and shift and saw the following options: Virtio-scsi drive qemu qemu harddisk + IPXE (PCI 00:12.0) Legacy option ROM When I try to select any option, it just reboots directly. Any ideas? Thanks!
It is useful for any version of ubuntu thank you your steps have worked.
Except on my server, it won't actually load the recovery mode menu. The terminal just.. hangs and yes, disable recovery mode is turned off in bios.
Your video is the only one that worked for me! Thank you! You are a rockstar!!!! 💪🏻
Sir I have problem sir 😢😢😢 pls help me I did same process but it not showing password is successfully updated it telling password do not match Authentication token manipulation error
When I try this, after I enter passwd and username, it gives me a whole menu list instead of offering to let me reset my password. What do I do?
Bro when I try to type new password the keys no working pls help
Bro help i cant t enter boot
The only person who could explain well and easy ☺️ God bless you
sir when i try pressing enter it shows me the incorrect password and the command terminal is not opening its a lab exersise by the way how to solve this sir
Did you guys press shift and esc at same time? Mine is not working
AMAZING tutorial. Thank you!
I i use this method and reset password will everything else stay the same such as files and apps?
when i go to recovery mode it says give root password for maintenance . how to solve this .
When I am typing new password, I am unable to type. What can I do?
when i press enter same cmd appears "press ctrl d to continue" help me
Not working its asking root password for maintenance its showing "Login Incorrect" any solution on this?
@user-zs3ti3lc4m
5 ай бұрын
SAME PROBLEM BUDDY??
@patiladitya7292
4 ай бұрын
if you are using VMbox then "changeme" should work fine
@abduljunaid861
2 ай бұрын
@@patiladitya7292what do you mean???
@abduljunaid861
2 ай бұрын
@@patiladitya7292in detail....
Thank you, worked perfectly.
This worked partway: it changed my password and allowed me to log in to my user, however I'm immediately presented with a window saying that my log-in password no longer matches that of my login keyring and demanding the old password.
Where is the root passwords reset? You show to reset passwd to other user.
Many thanks! It was very helpful.
Hello from New York City! Does your procedure work for LinuxMint also? Thank you.
If you forgot to add your user name after passwd, your password set for root don't worry just follow the same steps.. This time whenever you select root after pressing ENTER you have to enter the password you set just before otherwise it will show Login Incorrect! So now after entering the correct password enter the same commands, don't forget to add your username this time passwd
shift+esc is not working for me, how can i do that or is there any alternatives
@nox7638
9 ай бұрын
turn your computer on and hold shift at the same time it's starting
@Seven.Strike07
8 ай бұрын
Another way to click Esc button only one time
Many Thanks Your explanation is very clear keep it up
also, many ubuntu systems disable root login, so resetting the root password is moot. you need to reset the other user's password, that has sudo privileges and not root , show them how to find the usernames ( other than the obviously disabled root ) and reset that password , also , if password login is disabled , this is not going to do anything
@lowfitimes
10 ай бұрын
Hi, I am facing this issue. Please could you share on what to do?Tha nks
My mom locks the computer room.
Thank you, it really helped
at 3:22,When I click on root,it asks "Give root password for maintenance" but for you it is asking "Press enter for maintenance".What do I do?
@hanako6465
10 ай бұрын
same ya
@pranavas3641
10 ай бұрын
Did you get any solution??
@shanteshhosmath526
10 ай бұрын
@@pranavas3641 No
@tasnovashahrin5477
10 ай бұрын
Did you get any solution?(2)🙂
@hanako6465
10 ай бұрын
I'd say fuck it and create the whole system again
so this works only *when your physically at the machine* .. not over ssh or etc network boot? .. right? :)
@tlumme
Жыл бұрын
could be with script but i know nothing of that .. :) others might know how .. :X
Thank you so much. It helped me a lot
How can i change password for other not superusers without changing superuser password?
it dident let me type my new password can someone plz halp me
Brilliant I'm back in to my computer, many thanks
It's not working bc command line does show up. System asks for root password and when you press enter it says Login Incorrect and asks again.
@DejeneSamuel
5 ай бұрын
the same is too
Is it work in case of device having no windows
When I press Enter for maintenance, it responds with "Login Incorrect". What should I do?
@Infinite_Mainak
10 ай бұрын
Same
@DejeneSamuel
5 ай бұрын
the same too
3:27 , In mine after choosing the root and click Enter . I got something in bottom, Its asking root password for maintenance but yr case PRESS ENTER FOR MAINTENANCE!. Now what should i do sir??
@ashutoshmishra2113
4 ай бұрын
same bro, did you find any solution?
@_Raj_kumar_2
4 ай бұрын
No bro..if u find any solution..let me!!
@ashutoshmishra2113
4 ай бұрын
@@_Raj_kumar_2 i guess there is no solution after we change root password
IT's like Ubuntu changes the passwords on us wihtout our permission. hackers? What's the deal?
Worked excellent, thanks a lot!!!
Thanks! It working
Oh my god 😱 It actually worked Thank you very much 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
I press enter,, it asks for password AGAIN!!!
Guys if you skipped through installing ubuntu in virtualbox and need the root password its changeme. I did the same thing and could not log on Ubuntu
Thank you very much, it works for me.......🤓🤓
You Sir are a Rockstar! Thank you!
Mine says give root password for maintenance
it is showing me, give root password for maintenance
Thanks dear its working❤
you are running it on a windows, yukk
It worked ❤
Incomplete tutorial, shift + esc was not work
Thank you brow. I am from Brazilian.
Thank you very much it worked!!
Won’t even let me get the menu I’m starting not to like Linux at all and Dell has this stupid password admin I can’t even update my laptop I basically have a lemon at this point
This guide is to reset a user's password. After you logged into the user, you can use this command to reset root password. sudo passwd root
Very helpful. Many thanks
those having user does not exist then only write passwd , no need to write your username
it worked . good work !
It is asking ROOT PASSWORD FOR MAINTAINANCE
"Please note that resetting the root password should be done with caution and only when necessary. Make sure to keep your root password secure and remember it to avoid any potential security risks." is this a safe method?
Thanks for password reset advised
I just got my computer and it already has a user and I don’t know the password
@Professor.Farnsworth
5 ай бұрын
Usually it comes like this: user: ubuntu and no password.
Thank you Bro. God bless You!!!
Thank you ❤ Great 👍🏻
My keyboard is not working
The password is showing unchanged
Thanks, It's work me
It's really helpful 😊
Thanks a lot 😊
My grub is gone
it doesn't work
thank u a lot help very much
Many many thanks sir
Lovely bhaii 🥵
Boot live and chroot 😅
Thank you very much. It work😂
Thank you.
Worked. 😊
Thank you :)
You rock, thank you
Thank you!!!!
THANK YOU SO MUCH❤❤
Thank you so much
I love you man !!!! 👍👍😁😁❤️😭😭
Thank Bhai
Nice bro thanks
Thank you
Tyvm
Thx, saved me ❤