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

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

ASKING FOR ROOT PASSWRD FOR MAINTAINANCE

rohitkumarchoudhary
Автор

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

janeb
Автор

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

BrewmasterN
Автор

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

mirko
Автор

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

abhiramsv
Автор

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

q.u.e.r.t.y
Автор

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

jasongralding
Автор

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

harleylange
Автор

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

southpaw
Автор

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

PuchoWebSolutions
Автор

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!

escanorsama
Автор

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

harrybrown
Автор

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

joelekem
Автор

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

uxxnavin
Автор

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

syedmehranjameel
Автор

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

DadaCreative.
Автор

Many Thanks Your explanation is very clear keep it up

mohammedalahi
Автор

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?

matilda
Автор

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

rok.cernetic
Автор

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

aakashkumarverma