MintGuide.org / Reset the password for ROOT or any user in Linux Mint

Reset the password for ROOT or any user in Linux Mint

So, the following method is good because it is done very quickly and allows you to change the password to one or more users. On my operating system as most people have only one user, therefore the password root changing along with the password of the Main user. 

That is, if I change the password to my single user l4l, then user root will automatically change the password. On other operating systems, I think the user root as separately. In any case I am not interested in, the main thing here everything is convenient and WORKS))))

Don't forget: the following ways will not work if you have an encrypted home partition.
First way

Let's start, we need to get into the boot menu of GRUB. When the computer boots, hold down the "SHIFT" key. In the grub boot loader to select the desired OS and press "E" to edit the boot.

Reset the password for ROOT or any user in Linux Mint

Next we need at the end of the kernel line, after quiet splash add rw init=/bin/bash and press "F10" to boot.

Reset the password for ROOT or any user in Linux Mint

In this case, after the kernel is loaded, the control immediately proceeds to bash that allows you to change the passwords for all users. A working example can be seen in the picture below. Just write the command:

passwd Username

where Username is the login name of the user. Then simply enter the new password.

Reset the password for ROOT or any user in Linux Mint

Restart the computer and can use the new password.

[banner_inside-articles]{banner_inside-articles}[/banner_inside-articles]

Second way
Recently read about another method of password recovery. Starts the same way, we need to enter GRUB
Reset the password for ROOT or any user in Linux Mint
Once selected, you will see a window with many options, but for password recovery, you only need one - root
Reset the password for ROOT or any user in Linux Mint
If you do not know your user name(perhaps you want to hack someone else's computer), then enter the command
ls /home
By default in the restore mode, the file system is read-only and you can't just overwrite the user's password, but knowing a needed command you can fix it.
Enter the following command, which will open write access
mount -o rw,remount /
Next you need to enter the command to change the password
passwd yourusername
The word “yourusername”, I mean the user name in your system (On my screenshot - shekin)
Reset the password for ROOT or any user in Linux Mint
Now reboot
reboot
Voila, now I can't log in under my old password
Reset the password for ROOT or any user in Linux Mint
But when I entered the new password, the system booted successfully
Reset the password for ROOT or any user in Linux Mint

Even high-security Linux distributions, using the default settings, can allow an attacker with physical access to the server, it is easy to reset passwords of all users including root. For protection it is recommended to use encrypted partitions, disable the grub boot loader. Unfortunately I can't tell you how to protect your PC more effectively. It is necessary to examine this issue separately.

May the Force be with you,
Good Luck!!!

16-11-2014, 19:21
Go Back