Ubuntu: forgot password - what to do?
If you have forgotten your password for Ubuntu, you can create it again in recovery mode and overwrite the old one. However, the process only works if your home directory is unencrypted.
Reset forgotten Ubuntu password
- First of all, start the recovery mode. If only Ubuntu is installed on your PC, hold down the Shift key directly during the boot process. In some cases you have to hold down the ESC key instead of the Shift key.
- This will take you to the Grub2 boot manager. On systems with multiple operating systems, start directly in Grub2. In this case, select the "Recovery Mode" option from Ubuntu.
- Select "root" from the recovery menu.
- Then use the "mount -o remount, rw /" command to obtain write permissions for the partition.
- Now enter the command "passwd username". Instead of "username" insert your own username.
- Then enter your new password twice.
- Synchronize the new data via "sync" and put the partition back into read mode with "mount -o remount, ro /"
- Then exit the recovery mode via "exit" and select "Resume" in the menu.
You now have access to your system again. Also read how to measure hard drive read speed in Ubuntu.