To interrupt the GRUB boot (first step) while starting the computer, press and hold the SHIFT key - it always works, even on Linux Mint, where the GRUB menu is turned off by default.
Stop the download by holding down the SHIFT key while starting the computer, you will see:
Press the " e " key and you will proceed to edit the boot settings:
The screen does not contain the line we need, scroll with the cursor keys down and find the line starting with linux :
Go to the end of this line, put a space and add:
single init = / bin / bash
It should look like this (the kernel number may be different):
When everything is ready, press Ctrl + x or F10 to continue the download with the options installed.
You will see a shell prompt, also note that we are logged in as root , i.e. we have elevated privileges, including the use of the passwd command :
Using the passwd command, we change the password, as you can see, the passwd command failed:
passwd: Authentication token manipulation
passwd: password unchanged
To understand the cause of the error, enter the command:
mount
The ro letters indicate that the file system is mounted read-only, and for this reason, the changes made cannot be saved. Remount the file system:
mount -rw -o remount /
As you can see, after this, the password change was successful:
To exit, type:
sync
umount /
and then turn off the power to the computer / restart with a physical button.
Stop the download by holding down the SHIFT key while starting the computer, you will see:
Press the " e " key and you will proceed to edit the boot settings:
The screen does not contain the line we need, scroll with the cursor keys down and find the line starting with linux :
Go to the end of this line, put a space and add:
single init = / bin / bash
It should look like this (the kernel number may be different):
When everything is ready, press Ctrl + x or F10 to continue the download with the options installed.
You will see a shell prompt, also note that we are logged in as root , i.e. we have elevated privileges, including the use of the passwd command :
Using the passwd command, we change the password, as you can see, the passwd command failed:
passwd: Authentication token manipulation
passwd: password unchanged
To understand the cause of the error, enter the command:
mount
The ro letters indicate that the file system is mounted read-only, and for this reason, the changes made cannot be saved. Remount the file system:
mount -rw -o remount /
As you can see, after this, the password change was successful:
To exit, type:
sync
umount /
and then turn off the power to the computer / restart with a physical button.