How To Reset The Root Password On Ubuntu 22.04 LTS If Forgotten (Linux)

Поділитися
Вставка
  • Опубліковано 2 лип 2023
  • 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
    @BrewmasterN8 9 місяців тому +8

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

  • @janeb9986
    @janeb9986 9 місяців тому +9

    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?

  • @mirko1504
    @mirko1504 9 місяців тому +2

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

  • @rohitkumarchoudhary
    @rohitkumarchoudhary 9 місяців тому +13

    ASKING FOR ROOT PASSWRD FOR MAINTAINANCE

  • @abhiramsv5694
    @abhiramsv5694 3 місяці тому

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

  • @southpaw0905
    @southpaw0905 9 місяців тому

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

  • @uxxnavin234
    @uxxnavin234 4 місяці тому +1

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

  • @harleylange4451
    @harleylange4451 28 днів тому

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

  • @q.u.e.r.t.y
    @q.u.e.r.t.y 9 місяців тому +37

    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 7 місяців тому

      Same problem here what did you do?

    • @q.u.e.r.t.y
      @q.u.e.r.t.y 7 місяців тому

      ​@@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.

  • @samuelbhatti878
    @samuelbhatti878 5 місяців тому

    Many thanks! It was very helpful.

  • @harrybrown4815
    @harrybrown4815 8 місяців тому +11

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

    • @thesuinonick2179
      @thesuinonick2179 4 місяці тому +1

      same, fuck it im just gonna reinstall it

    • @CapCreeperGR_Main
      @CapCreeperGR_Main 2 місяці тому +3

      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

  • @enriquep.zepeda9707
    @enriquep.zepeda9707 12 днів тому

    Worked excellent, thanks a lot!!!

  • @xTwisteDx
    @xTwisteDx 5 місяців тому

    AMAZING tutorial. Thank you!

  • @mohammedalahi1406
    @mohammedalahi1406 2 місяці тому

    Many Thanks Your explanation is very clear keep it up

  • @austine_mario
    @austine_mario 11 місяців тому +1

    Thank you, it really helped

  • @Ohdatstima
    @Ohdatstima 18 днів тому

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

  • @jasongralding3222
    @jasongralding3222 3 місяці тому +1

    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

  • @user-hd5tv1ny3i
    @user-hd5tv1ny3i 8 місяців тому

    Thank you, worked perfectly.

  • @Way-to-Deen
    @Way-to-Deen 7 місяців тому

    Thank you so much. It helped me a lot

  • @purbashabanerjee
    @purbashabanerjee 15 днів тому

    Thank you very much it worked!!

  • @ralphmoreno2974
    @ralphmoreno2974 4 місяці тому

    You Sir are a Rockstar! Thank you!

  • @shrutikolhe1304
    @shrutikolhe1304 6 місяців тому

    It's really helpful 😊

  • @fiestamoodvav9651
    @fiestamoodvav9651 Місяць тому

    it worked . good work !

  • @PuchoWebSolutions
    @PuchoWebSolutions 6 днів тому

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

  • @isaacoppong3125
    @isaacoppong3125 Місяць тому

    Very helpful. Many thanks

  • @justanotherwatcher
    @justanotherwatcher 3 місяці тому

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

  • @g.nehanthreddy5028
    @g.nehanthreddy5028 Місяць тому +1

    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

  • @ZoroRorono-pq2iv
    @ZoroRorono-pq2iv 9 місяців тому

    Thanks! It working

  • @arslanzulfiqar7793
    @arslanzulfiqar7793 7 місяців тому

    Thanks dear its working❤

  • @prekshasalvi8622
    @prekshasalvi8622 3 місяці тому +1

    Thanks a lot 😊

  • @escanorsama7922
    @escanorsama7922 10 днів тому

    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!

  • @hushmandi
    @hushmandi 3 місяці тому

    Thank you Bro. God bless You!!!

  • @iiitvadodara6387
    @iiitvadodara6387 5 місяців тому

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

  • @chamodkatugampala8530
    @chamodkatugampala8530 9 місяців тому +1

    It worked ❤

  • @faizahmed8015
    @faizahmed8015 7 місяців тому

    Thank you ❤ Great 👍🏻

  • @mahavirmahajan5035
    @mahavirmahajan5035 8 місяців тому +6

    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 місяці тому +2

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

    • @abduljunaid861
      @abduljunaid861 2 місяці тому

      ​@@patiladitya7292what do you mean???

    • @abduljunaid861
      @abduljunaid861 2 місяці тому

      ​@@patiladitya7292in detail....

  • @normalizedaudio2481
    @normalizedaudio2481 Рік тому +4

    My mom locks the computer room.

  • @joelekem3480
    @joelekem3480 9 місяців тому +1

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

  • @bolisettilakshman5710
    @bolisettilakshman5710 9 місяців тому +4

    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 9 місяців тому

      Another way to click Esc button only one time

  • @Ninjaprotect
    @Ninjaprotect Рік тому +5

    Bro help i cant t enter boot

  • @syedmehranjameel2294
    @syedmehranjameel2294 10 місяців тому +2

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

  • @DadaCreative.
    @DadaCreative. 3 місяці тому

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

  • @rok.cernetic
    @rok.cernetic Місяць тому

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

  • @sindhuns2960
    @sindhuns2960 7 місяців тому

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

  • @sebastianmattar5379
    @sebastianmattar5379 2 місяці тому

    THANK YOU SO MUCH❤❤

  • @jrmyrgd
    @jrmyrgd 5 місяців тому

    thank you so muuuuuuuch!

  • @matilda9906
    @matilda9906 2 місяці тому

    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?

  • @crauguns
    @crauguns 3 місяці тому

    Thank you brow. I am from Brazilian.

  • @Professor.Farnsworth
    @Professor.Farnsworth 5 місяців тому

    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.

  • @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

  • @abuwilliams7228
    @abuwilliams7228 Місяць тому

    Thank you so much

  • @Linkolite
    @Linkolite 10 місяців тому

    Thank you :)

  • @geethaab4943
    @geethaab4943 5 місяців тому

    Thanku... It worked

  • @keyurpurohit2371
    @keyurpurohit2371 10 місяців тому +1

    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

  • @AllinOne-vd9oy
    @AllinOne-vd9oy 11 місяців тому

    Thanks, It's work me

  • @rajeshwarjadhav559
    @rajeshwarjadhav559 4 місяці тому

    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

  • @um9963
    @um9963 Місяць тому

    Worked. 😊

  • @KodyWebb
    @KodyWebb 9 місяців тому

    Thank you!!!!

  • @robibalazs6521
    @robibalazs6521 8 місяців тому

    Thx, saved me ❤

  • @jyotirmayapanigrahi4149
    @jyotirmayapanigrahi4149 4 місяці тому

    Many many thanks sir

  • @LupeLokota
    @LupeLokota 5 місяців тому

    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.

  • @Duminek-Qt2
    @Duminek-Qt2 27 днів тому

    Nice bro thanks

  • @chase2910
    @chase2910 7 місяців тому

    You rock, thank you

  • @ahmed8873
    @ahmed8873 5 місяців тому

    Thanks Brother ❤❤❤

  • @Woityschreck
    @Woityschreck 8 місяців тому

    thank u a lot help very much

  • @engineer9830
    @engineer9830 3 місяці тому

    Thankyou it worked

  • @aakashkumarverma1141
    @aakashkumarverma1141 4 місяці тому

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

  • @F_khan1
    @F_khan1 3 місяці тому

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

  • @shanteshhosmath526
    @shanteshhosmath526 10 місяців тому +3

    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?

  • @kedartanwer9296
    @kedartanwer9296 10 місяців тому

    Thanks for password reset advised

  • @azizbekusubaliev9964
    @azizbekusubaliev9964 5 місяців тому +1

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

  • @MrKingoverall
    @MrKingoverall 4 місяці тому

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

  • @remarkme535
    @remarkme535 7 місяців тому

    Is it work in case of device having no windows

  • @_Raj_kumar_2
    @_Raj_kumar_2 4 місяці тому

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

    • @Strange2309
      @Strange2309 4 місяці тому

      same bro, did you find any solution?

    • @_Raj_kumar_2
      @_Raj_kumar_2 4 місяці тому

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

    • @Strange2309
      @Strange2309 4 місяці тому

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

  • @373323
    @373323 Рік тому +5

    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 місяців тому +2

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

  • @vn_loc7316
    @vn_loc7316 4 місяці тому

    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

  • @jmizzle11
    @jmizzle11 10 місяців тому +1

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

  • @user-rz8qu2yt9o
    @user-rz8qu2yt9o 3 місяці тому

    Thank you very much. It work😂

  • @piyushtambe167
    @piyushtambe167 4 місяці тому

    Lovely bhaii 🥵

  • @TheIndianPolitico
    @TheIndianPolitico 9 місяців тому

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

  • @user-fz3yi9mn8s
    @user-fz3yi9mn8s 4 місяці тому

    Thank Bhai

  • @1234567890000918
    @1234567890000918 6 місяців тому

    Thank you

  • @philipanderson9434
    @philipanderson9434 10 місяців тому

    Thank you.

  • @SaigangaUdayakumar
    @SaigangaUdayakumar Місяць тому

    Thanks bro

  • @rok.cernetic
    @rok.cernetic Місяць тому

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

  • @373323
    @373323 Рік тому +3

    you are running it on a windows, yukk

  • @esraylmaz49
    @esraylmaz49 8 місяців тому

    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.

  • @ItssMeeKaw
    @ItssMeeKaw 5 місяців тому

    Tyvm

  • @RafaelG-on3nz
    @RafaelG-on3nz 2 місяці тому

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

  • @smorfnimda
    @smorfnimda 2 місяці тому

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

  • @ArielTVChannel
    @ArielTVChannel 4 місяці тому

    Incomplete tutorial, shift + esc was not work

  • @kinkpelionel3287
    @kinkpelionel3287 7 місяців тому

    Thanks

  • @Guyisgamer573
    @Guyisgamer573 2 місяці тому

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

  • @salemdevian
    @salemdevian 4 місяці тому

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

  • @bojukakt222
    @bojukakt222 Місяць тому

    Mine says give root password for maintenance

  • @raavn0007
    @raavn0007 28 днів тому

    it is showing me, give root password for maintenance

  • @anandamar6775
    @anandamar6775 5 місяців тому

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

  • @MSCSIT
    @MSCSIT 2 місяці тому

    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

  • @dlo2timez
    @dlo2timez 10 днів тому

    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

  • @user-pw5em9si8z
    @user-pw5em9si8z 4 місяці тому