• Home
  • Ubuntu
  • Debian
  • Linux
  • Commands
No Result
View All Result
TECH DHEE
  • Home
  • Ubuntu
  • Debian
  • Linux
  • Commands
No Result
View All Result
TECH DHEE
No Result
View All Result
Home Ubuntu

How to Reset Lost Administrative Password on Ubuntu

techdhee by techdhee
February 21, 2023
0 0
0
Reset Lost Password on Ubuntu

In this article, we will learn how to reset lost administrative password on Ubuntu. Yes if you are forging the root or admin password in Ubuntu. Because we can change the password only when we login into Ubuntu. but if we cannot log in, we can not change the password. so let’s start.

Contents hide
1 What you’ll learn
2 What you’ll need
3 Reset the User’s Password in Ubuntu
3.1 Boot into recovery mode
3.2 Edit the grub file
3.3 Reset the root password
3.4 Reboot the Ubuntu
4 Conclusion

What you’ll learn

  • How to reset the password on Ubuntu.
  • How to reset any user’s password.

What you’ll need

  • Ubuntu Desktop
  • Basic Linux command line knowledge

Reset the User’s Password in Ubuntu

You can reset an Ubuntu password very easily. This tutorial explains an easy method for changing the root password on Ubuntu. The method should also be applicable to other Debian-based distributions.

Boot into recovery mode

Switch the computer on. Go to the grub menu. Generally, it appears automatically, but if not, then hold down the Shift key or press the Esc key until the boot menu appears.

If you’re using VMware or VirtualBox, you have to hold down the Shift key and you will get the grub menu.

Reset Lost Password on Ubuntu

In the grub menu, press the “E” key to edit the grub screen.

Edit the grub file

Find the line starting with linux, change the ro to rw and append init=/bin/bash at the end of that line.

Reset Lost Password on Ubuntu

Press ctrl-x or F10 to save your changes and boot.

Now you are booting into the command line interface Linux kernel with read and write permissions, you’ll use the bash shell.

If you are using ZSH instead of bash then you have to enter the init=/bin/zsh at the end of that line in the grub editor.

Reset the root password

In other words, your system will boot up to a passwordless root shell. Now here you can change the user’s password.

# passwd username

Type in the passwd command with your username. If you don’t know the username, check with the ls /home command

Reset Lost Password on Ubuntu

Reboot the Ubuntu

Once you’ve set the new password,  just type the following command in the terminal to reboot your system in normal mode.

# exec /sbin/init

Reset Lost Password on Ubuntu

Your password should be changed now.

Conclusion

This is the way how to reset the forgotten user’s password in Ubuntu 22.04. I hope I made things clear about resetting forgotten passwords in Ubuntu.

If you have any questions, feel free to leave a comment.

Related Posts:

  • How to Create a File in Linux
  • Su Command in Linux
  • Nala – An Alternative To APT Package Manager
  • Install Nano Text Editor in Linux
  • Linux File Hierarchy Structure
  • Whoami command in Linux
ShareTweetSendShareSend
Previous Post

How to Install Terminator on Ubuntu 22.04 LTS

Next Post

How to Install ZSH on Ubuntu 22.04 LTS

techdhee

techdhee

Related Posts

Debian

How to install Tweak Tool on Ubuntu 22.04 LTS

March 3, 2023
Install Ngrok on Ubuntu 22.04 LTS
Debian

How to Install Ngrok on Ubuntu 22.04 LTS

March 2, 2023
Debian

How To Install the Apache2 on Ubuntu 22.04

March 1, 2023
Debian

Install Open VM Tools on Debian 11 Bullseye

February 26, 2023
Install VLC on Ubuntu 22.04
Ubuntu

How to Install VLC on Ubuntu 22.04 LTS

February 25, 2023
Install Nano Text Editor in Linux
Commands

How to Install Nano Text Editor in Linux

February 24, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You might also like

How-to-Check-Windows-10-is-Genuine-or-Not-Genuine

How to Check Windows 10 is Genuine or Not Genuine

August 6, 2023
How to Install Arch Linux

How to Install Arch Linux [Step by Step Guide]

August 6, 2023
Terminal Emulators for Linux

Top 6 Terminal Emulators for Linux

August 5, 2023
How to Install Tor Browser in Kali Linux 2023.1

How to Install Tor Browser in Kali Linux 2023.1

April 2, 2023

How to install Tweak Tool on Ubuntu 22.04 LTS

March 3, 2023
Install Ngrok on Ubuntu 22.04 LTS

How to Install Ngrok on Ubuntu 22.04 LTS

March 2, 2023

© 2024 tecdhee.com - Tech Tips, Tricks and Tutorials.

  • Home
  • About Us
  • Contact
  • Disclaimer
  • Privacy Policy
No Result
View All Result
  • About Us
  • Contact
  • Disclaimer
  • Home
  • Privacy Policy

© 2024 tecdhee.com - Linux Tips, Tricks and Tutorials.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In