Professional Documents
Culture Documents
Break Root Password 1685814759
Break Root Password 1685814759
In Linux, regular users and superusers are allowed to access services via password
authentication. In the case a regular user can’t remember his/her password, a
superuser can reset the password of a regular user right from the terminal. However,
what if the superuser (or root user) loses his/her password? They will have to
recover the lost password prior to booting into the login screen. This allows any
malicious user with physical access to your Linux host to gain complete ownership.
This article takes a look at how to recover a lost root password in Linux using two
different methods.
Note: the method of resetting a root password is similar for most distros. Here we
demonstrate the process using Ubuntu. We are also using “root password”
throughout the tutorial for simplicity, but it can be interpreted interchangeably as the
superuser password.
2. Once the GRUB page appears, quickly select the “*Advanced options for
GNU/Linux” option by pressing the down arrow key and Enter button.
3. Now press e to edit the commands.
You need to modify it or change it from “read-only” mode to “read-write” mode. Find
the line beginning with “Linux.” Look for ro and change it to rw . Add init=/bin/bash at
the end of the line.
4. Press F10 . This will display a screen with a prompt.
6. You can now reset your lost root password by using the following command:
passwd root
exec /sbin/init