Question: How to Change Ubuntu Password Without Knowing It?
Contents

From the official Ubuntu LostPassword documentation:

  • Reboot your computer.
  • Hold Shift during boot to start GRUB menu.
  • Highlight your image and press E to edit.
  • Find the line starting with “linux” and append rw init=/bin/bash at the end of that line.
  • Press Ctrl + X to boot.
  • Type in passwd username.
  • Set your password.

How do I reset my root password?

1. Reset Lost Root Password from the Grub Menu

  1. Now press e to edit the commands.
  2. Press F10 .
  3. Mount your root filesystem in read-write mode:
  4. Once you are done, type:
  5. Open the terminal, and type the following command to become root:
  6. At this point we need to jail ourselves in the “mnt/recovery” directory.

How do I change a user password in Ubuntu?

How to Change sudo Password in Ubuntu

  • Step 1: Open the Ubuntu command line. We need to use the Ubuntu command line, the Terminal, in order to change the sudo password.
  • Step 2: Log in as root user. Only a root user can change his/her own password.
  • Step 3: Change the sudo password through the passwd command.
  • Step 4: Exit the root login and then the Terminal.
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest