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

  • @BrewmasterN8
    @BrewmasterN89 ай бұрын

    I cant believe that actually worked...nothing usually works when I try it...😂 thank you very much

  • @janeb9986
    @janeb99869 ай бұрын

    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

    @rok.cernetic

    Ай бұрын

    I i use this method and reset password will everything else stay the same such as files and apps?

  • @q.u.e.r.t.y
    @q.u.e.r.t.y9 ай бұрын

    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

    @robertjkilgore

    6 ай бұрын

    Same problem here what did you do?

  • @q.u.e.r.t.y

    @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

    @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

    @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

    @bobbo2576

    6 ай бұрын

    @@q.u.e.r.t.y well I figured it out. My user name was different than the login name.

  • @rohitkumarchoudhary
    @rohitkumarchoudhary9 ай бұрын

    ASKING FOR ROOT PASSWRD FOR MAINTAINANCE

  • @mirko1504
    @mirko15048 ай бұрын

    Thank you. It works perfectly. Short and clear instructions ❤

  • @southpaw0905
    @southpaw09059 ай бұрын

    Perfect video! It worked. I recommend this method to anyone who is trying to recover the password. Thanks!

  • @abhiramsv5694
    @abhiramsv56943 ай бұрын

    Thankyou brother,It worked.I did lot of method by watching other youtubers but this one only worked.❤

  • @harrybrown4815
    @harrybrown48158 ай бұрын

    This does not work as it say give root password for maintenance.

  • @thesuinonick2179

    @thesuinonick2179

    4 ай бұрын

    same, fuck it im just gonna reinstall it

  • @CapCreeperGR_Main

    @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

  • @joelekem3480
    @joelekem34809 ай бұрын

    guys please after selecting root, im not able to enter the maintenance mide and type the mount command

  • @jasongralding3222
    @jasongralding32223 ай бұрын

    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

  • @escanorsama7922
    @escanorsama79225 күн бұрын

    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!

  • @uxxnavin234
    @uxxnavin2344 ай бұрын

    It is useful for any version of ubuntu thank you your steps have worked.

  • @Professor.Farnsworth
    @Professor.Farnsworth5 ай бұрын

    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.

  • @harleylange4451
    @harleylange445123 күн бұрын

    Your video is the only one that worked for me! Thank you! You are a rockstar!!!! 💪🏻

  • @g.nehanthreddy5028
    @g.nehanthreddy5028Ай бұрын

    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

  • @matilda9906
    @matilda99062 ай бұрын

    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?

  • @syedmehranjameel2294
    @syedmehranjameel22949 ай бұрын

    Bro when I try to type new password the keys no working pls help

  • @Ninjaprotect
    @Ninjaprotect Жыл бұрын

    Bro help i cant t enter boot

  • @Ohdatstima
    @Ohdatstima14 күн бұрын

    The only person who could explain well and easy ☺️ God bless you

  • @rajeshwarjadhav559
    @rajeshwarjadhav5594 ай бұрын

    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

  • @DadaCreative.
    @DadaCreative.3 ай бұрын

    Did you guys press shift and esc at same time? Mine is not working

  • @xTwisteDx
    @xTwisteDx5 ай бұрын

    AMAZING tutorial. Thank you!

  • @rok.cernetic
    @rok.cerneticАй бұрын

    I i use this method and reset password will everything else stay the same such as files and apps?

  • @F_khan1
    @F_khan13 ай бұрын

    when i go to recovery mode it says give root password for maintenance . how to solve this .

  • @TheIndianPolitico
    @TheIndianPolitico9 ай бұрын

    When I am typing new password, I am unable to type. What can I do?

  • @aakashkumarverma1141
    @aakashkumarverma11414 ай бұрын

    when i press enter same cmd appears "press ctrl d to continue" help me

  • @mahavirmahajan5035
    @mahavirmahajan50358 ай бұрын

    Not working its asking root password for maintenance its showing "Login Incorrect" any solution on this?

  • @user-zs3ti3lc4m

    @user-zs3ti3lc4m

    5 ай бұрын

    SAME PROBLEM BUDDY??

  • @patiladitya7292

    @patiladitya7292

    4 ай бұрын

    if you are using VMbox then "changeme" should work fine

  • @abduljunaid861

    @abduljunaid861

    2 ай бұрын

    ​@@patiladitya7292what do you mean???

  • @abduljunaid861

    @abduljunaid861

    2 ай бұрын

    ​@@patiladitya7292in detail....

  • @user-hd5tv1ny3i
    @user-hd5tv1ny3i8 ай бұрын

    Thank you, worked perfectly.

  • @LupeLokota
    @LupeLokota5 ай бұрын

    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.

  • @azizbekusubaliev9964
    @azizbekusubaliev99645 ай бұрын

    Where is the root passwords reset? You show to reset passwd to other user.

  • @samuelbhatti878
    @samuelbhatti8785 ай бұрын

    Many thanks! It was very helpful.

  • @PuchoWebSolutions
    @PuchoWebSolutions2 күн бұрын

    Hello from New York City! Does your procedure work for LinuxMint also? Thank you.

  • @keyurpurohit2371
    @keyurpurohit23719 ай бұрын

    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

  • @bolisettilakshman5710
    @bolisettilakshman57109 ай бұрын

    shift+esc is not working for me, how can i do that or is there any alternatives

  • @nox7638

    @nox7638

    9 ай бұрын

    turn your computer on and hold shift at the same time it's starting

  • @Seven.Strike07

    @Seven.Strike07

    8 ай бұрын

    Another way to click Esc button only one time

  • @mohammedalahi1406
    @mohammedalahi1406Ай бұрын

    Many Thanks Your explanation is very clear keep it up

  • @373323
    @373323 Жыл бұрын

    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

    @lowfitimes

    10 ай бұрын

    Hi, I am facing this issue. Please could you share on what to do?Tha nks

  • @normalizedaudio2481
    @normalizedaudio2481 Жыл бұрын

    My mom locks the computer room.

  • @austine_mario
    @austine_mario11 ай бұрын

    Thank you, it really helped

  • @shanteshhosmath526
    @shanteshhosmath52610 ай бұрын

    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

    @hanako6465

    10 ай бұрын

    same ya

  • @pranavas3641

    @pranavas3641

    10 ай бұрын

    Did you get any solution??

  • @shanteshhosmath526

    @shanteshhosmath526

    10 ай бұрын

    @@pranavas3641 No

  • @tasnovashahrin5477

    @tasnovashahrin5477

    10 ай бұрын

    Did you get any solution?(2)🙂

  • @hanako6465

    @hanako6465

    10 ай бұрын

    I'd say fuck it and create the whole system again

  • @tlumme
    @tlumme Жыл бұрын

    so this works only *when your physically at the machine* .. not over ssh or etc network boot? .. right? :)

  • @tlumme

    @tlumme

    Жыл бұрын

    could be with script but i know nothing of that .. :) others might know how .. :X

  • @Way-to-Deen
    @Way-to-Deen7 ай бұрын

    Thank you so much. It helped me a lot

  • @rok.cernetic
    @rok.cerneticАй бұрын

    How can i change password for other not superusers without changing superuser password?

  • @Guyisgamer573
    @Guyisgamer5732 ай бұрын

    it dident let me type my new password can someone plz halp me

  • @justanotherwatcher
    @justanotherwatcher3 ай бұрын

    Brilliant I'm back in to my computer, many thanks

  • @esraylmaz49
    @esraylmaz498 ай бұрын

    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

    @DejeneSamuel

    5 ай бұрын

    the same is too

  • @remarkme535
    @remarkme5357 ай бұрын

    Is it work in case of device having no windows

  • @jmizzle11
    @jmizzle1110 ай бұрын

    When I press Enter for maintenance, it responds with "Login Incorrect". What should I do?

  • @Infinite_Mainak

    @Infinite_Mainak

    10 ай бұрын

    Same

  • @DejeneSamuel

    @DejeneSamuel

    5 ай бұрын

    the same too

  • @_Raj_kumar_2
    @_Raj_kumar_24 ай бұрын

    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

    @ashutoshmishra2113

    4 ай бұрын

    same bro, did you find any solution?

  • @_Raj_kumar_2

    @_Raj_kumar_2

    4 ай бұрын

    No bro..if u find any solution..let me!!

  • @ashutoshmishra2113

    @ashutoshmishra2113

    4 ай бұрын

    @@_Raj_kumar_2 i guess there is no solution after we change root password

  • @smorfnimda
    @smorfnimda2 ай бұрын

    IT's like Ubuntu changes the passwords on us wihtout our permission. hackers? What's the deal?

  • @enriquep.zepeda9707
    @enriquep.zepeda97077 күн бұрын

    Worked excellent, thanks a lot!!!

  • @ZoroRorono-pq2iv
    @ZoroRorono-pq2iv9 ай бұрын

    Thanks! It working

  • @sindhuns2960
    @sindhuns29607 ай бұрын

    Oh my god 😱 It actually worked Thank you very much 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @salemdevian
    @salemdevian4 ай бұрын

    I press enter,, it asks for password AGAIN!!!

  • @MSCSIT
    @MSCSIT2 ай бұрын

    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

  • @iiitvadodara6387
    @iiitvadodara63875 ай бұрын

    Thank you very much, it works for me.......🤓🤓

  • @ralphmoreno2974
    @ralphmoreno29743 ай бұрын

    You Sir are a Rockstar! Thank you!

  • @bojukakt222
    @bojukakt222Ай бұрын

    Mine says give root password for maintenance

  • @raavn0007
    @raavn000723 күн бұрын

    it is showing me, give root password for maintenance

  • @arslanzulfiqar7793
    @arslanzulfiqar77937 ай бұрын

    Thanks dear its working❤

  • @373323
    @373323 Жыл бұрын

    you are running it on a windows, yukk

  • @chamodkatugampala8530
    @chamodkatugampala85309 ай бұрын

    It worked ❤

  • @ArielTVChannel
    @ArielTVChannel4 ай бұрын

    Incomplete tutorial, shift + esc was not work

  • @crauguns
    @crauguns2 ай бұрын

    Thank you brow. I am from Brazilian.

  • @purbashabanerjee
    @purbashabanerjee11 күн бұрын

    Thank you very much it worked!!

  • @dlo2timez
    @dlo2timez5 күн бұрын

    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

  • @vn_loc7316
    @vn_loc73164 ай бұрын

    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

  • @isaacoppong3125
    @isaacoppong3125Ай бұрын

    Very helpful. Many thanks

  • @anandamar6775
    @anandamar67755 ай бұрын

    those having user does not exist then only write passwd , no need to write your username

  • @fiestamoodvav9651
    @fiestamoodvav965125 күн бұрын

    it worked . good work !

  • @manav.2907
    @manav.290711 күн бұрын

    It is asking ROOT PASSWORD FOR MAINTAINANCE

  • @RafaelG-on3nz
    @RafaelG-on3nz2 ай бұрын

    "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?

  • @kedartanwer9296
    @kedartanwer929610 ай бұрын

    Thanks for password reset advised

  • @laneporter2382
    @laneporter23826 ай бұрын

    I just got my computer and it already has a user and I don’t know the password

  • @Professor.Farnsworth

    @Professor.Farnsworth

    5 ай бұрын

    Usually it comes like this: user: ubuntu and no password.

  • @hushmandi
    @hushmandi3 ай бұрын

    Thank you Bro. God bless You!!!

  • @faizahmed8015
    @faizahmed80157 ай бұрын

    Thank you ❤ Great 👍🏻

  • @sahiltondale5578
    @sahiltondale55787 ай бұрын

    My keyboard is not working

  • @vaishnavimanoj9676
    @vaishnavimanoj96764 ай бұрын

    The password is showing unchanged

  • @AllinOne-vd9oy
    @AllinOne-vd9oy11 ай бұрын

    Thanks, It's work me

  • @shrutikolhe1304
    @shrutikolhe13046 ай бұрын

    It's really helpful 😊

  • @prekshasalvi8622
    @prekshasalvi86223 ай бұрын

    Thanks a lot 😊

  • @Cyber_Gas
    @Cyber_Gas7 ай бұрын

    My grub is gone

  • @sayonayer6304
    @sayonayer63045 ай бұрын

    it doesn't work

  • @Woityschreck
    @Woityschreck7 ай бұрын

    thank u a lot help very much

  • @jyotirmayapanigrahi4149
    @jyotirmayapanigrahi41494 ай бұрын

    Many many thanks sir

  • @piyushtambe167
    @piyushtambe1673 ай бұрын

    Lovely bhaii 🥵

  • @radaway
    @radaway Жыл бұрын

    Boot live and chroot 😅

  • @user-rz8qu2yt9o
    @user-rz8qu2yt9o3 ай бұрын

    Thank you very much. It work😂

  • @philipanderson9434
    @philipanderson943410 ай бұрын

    Thank you.

  • @um9963
    @um9963Ай бұрын

    Worked. 😊

  • @Linkolite
    @Linkolite10 ай бұрын

    Thank you :)

  • @chase2910
    @chase29107 ай бұрын

    You rock, thank you

  • @KodyWebb
    @KodyWebb9 ай бұрын

    Thank you!!!!

  • @sebastianmattar5379
    @sebastianmattar53792 ай бұрын

    THANK YOU SO MUCH❤❤

  • @abuwilliams7228
    @abuwilliams7228Ай бұрын

    Thank you so much

  • @MrKingoverall
    @MrKingoverall4 ай бұрын

    I love you man !!!! 👍👍😁😁❤️😭😭

  • @user-fz3yi9mn8s
    @user-fz3yi9mn8s4 ай бұрын

    Thank Bhai

  • @user-rb6id6pq9j
    @user-rb6id6pq9j22 күн бұрын

    Nice bro thanks

  • @harshavardhanpenagaluru7771
    @harshavardhanpenagaluru777111 ай бұрын

    Thank you

  • @ItssMeeKaw
    @ItssMeeKaw5 ай бұрын

    Tyvm

  • @robibalazs6521
    @robibalazs65218 ай бұрын

    Thx, saved me ❤