Leave Your Message
Ubuntu forgotten login password reset steps

Blog

Ubuntu forgotten login password reset steps

2024-10-17 11:04:14
Table of Contents

1. Enter the Grub menu

1. At the boot interface, you need to press and hold the "Shift" key. This will call up the Grub menu, which is the boot loader used by many Linux distributions to load the operating system.
2. In the Grub menu, you will see multiple options. Select "Advanced options for Ubuntu" and press Enter.

01

2. Select Recovery Mode

1. After entering "Advanced options for Ubuntu", you will see several different options, including different versions of Ubuntu and their corresponding recovery modes (Recovery Mode).
2. It is usually recommended to select a newer version of recovery mode and press Enter to enter.

3. Open Root Shell

1. In the recovery mode menu, select the "root" option and press Enter. At this time, the system will open a command line interface with root user (root) privileges.
2. If you have not set a root password before, you can just press Enter. If you have set it, you need to enter the root password to continue.

02

4. Reset password

1. Now, you have the permission to modify system files and settings. Enter the command passwd < your username > and press Enter. Note that if you want to change the password of the administrator account, just enter passwd and press Enter without the username.
2. Next, the system will prompt you to enter the new password twice to confirm.

5. Exit and restart

1. After the password is set, enter the exit command to exit the root shell.
2. You will return to the recovery mode menu you saw before. Use the Tab key on the keyboard to select "OK" and press Enter.
3. The system will now restart.

6. Log in to the system

After the system restarts, you can log in to your Ubuntu system using the newly set password.

Through the above steps, you can regain access to the Ubuntu system even if you forget the login password. This skill is invaluable for both system administrators and ordinary users.

Related Products

01

LET'S TALK ABOUT YOUR PROJECTS

  • sinsmarttech@gmail.com
  • 3F, Block A, Future Research & Innovation Park, Yuhang District, Hangzhou, Zhejiang, China

Our experts will solve them in no time.