In Linux regular users and superusers are allowed to access services via password authentication. In the case a regular user can8217t remember hisher password a superuser can reset the password of a regular user right from the terminal. However what if the superuser or root user loses hisher 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 8220root password8221 throughout the tutorial for simplicity but it can be interpreted interchangeably as the superuser password.
Related How to Easily Rename Files in Linux.