📜 ⬆️ ⬇️

How to reset a password in Linux


Let's look at several ways to reset the system password in Linux. You probably know that the root user has the right to change the password of any user in the system. What if you forgot your root password? That's about it and will be discussed in the article.

When recovering a password (root or any other user), there are two different situations that require a different approach.

When to use GRUB


If you have the GRUB boot loader installed and you have access to edit the boot parameters of the selected line, the task becomes very simple. Follow the further recommendations and get root rights as soon as possible. And as soon as you become a root, you can immediately do anything.


')


It should also be noted that some distributions create a recovery mode during installation. If there is such an item in your GRUB menu, you do not need to perform all of the above steps, just select the recovery mode and then the invitation for root in the subsequent dialog box.

When it’s not possible to use GRUB


If you don’t use GRUB for some reason, you can reset your password using the live CD (I’ll use the Ubuntu live CD, you can take any other). Just follow the further instructions:

Perhaps you have your own password recovery methods? Share them.

Source: https://habr.com/ru/post/54103/


All Articles