You will need
- Installed Ubuntu
Instruction
1
The first method will be suitable in most cases, when a root password is not set. If after the installation of Ubuntu you don't specifically set a password for the root user, that user is disabled and it has no password. If you changed your password, go to the second method, which is described below (step 5). So, restart the computer.
2
After self-test the BIOS you should see boot menu for Ubuntu that looks approximately like the picture. If this has not happened, and immediately started the download of Ubuntu, press the Esc key immediately after the BIOS diagnostics. In the boot menu, you must select Advanced options for Ubuntu or its variant in Russian translation.
3
Then select the menu item marked recovery mode or "recovery mode" in Russian translation. Will begin loading the operating system in recovery mode.
4
If the root password has not been established, you will receive after downloading an invitation to the console with the symbol # to indicate that you are in the session root. All you need to do to change the password is to type passwd username, where username is the user name whose password you want to change. The command will require to enter and confirm a new password. After that, restart your computer the reboot command and enter in the usual way.
5
If the root password was set and you know it, then in recovery mode you will be asked to enter it before you can change the user's password. However, if you don't know, it can be circumvented by modifying the kernel boot parameters. Menu download click on the normal option, but instead of Enter press "e" key (eng.).
6
In the opened editor find the line that starts with linux, add to the end of the line init=/bin/sh and press F10 to boot.
7
Next, you need to mount the root filesystem in read-write. To do this, run the command mount-o remount,rw /
8
Then run the command to change the password passwd username. In the same way you can change the root password. After changing the password, restart the computer with the command reboot or run the init command.