Have you forgotten your user account password and you are unable to login to Ubuntu/Linux Mint? In this tutorial we will see how to use the Recovery Mode to reset a lost password so that you can log in again to your desktop. We will also help you set your computer to login automatically without entering the user password. You can use this tutorial on Ubuntu 12.10/12.04/11.10/Linux Mint 13 or older.
Getting Started
Let's firstly start the Recovery Mode. Reboot your computer and hold down the SHIFT key, the GRUB boot menu will show up, select the line having the "recovery mode" option and press Enter:
Another menu will appear after a few seconds, select the line saying "root Drop to root shell prompt" and press Enter to enable the CLI mode:
The file system in this case is set to read-only which will prevent us from resetting the user password. To set read/write permissions, you need to run this command:
mount -rw -o remount /
If you have also forgotten your username, you can use this command to get the list of all system user accounts:
cat /etc/passwd
Once you decide which user to reset password for, run this command:
passwd username
Note: Replace username with your own user name.
Submit a new password two times for this username. If the operation is successful, you may get something like this:
Run now this command to exit:
exit
Then select the "resume normal boot" option to load your OS in normat mode.
Enabling Automatic Login (Optional)
To make Ubuntu/Linux Mint start automatically without stopping at the login screen, follow these instructions:
- Open the terminal and run this command:
sudo gedit /etc/lightdm/lightdm.conf
For Linux Mint 13:
sudo pluma /etc/lightdm/lightdm.conf
- In this file, add your username as follows:
autologin-user=USERNAME
- Save the file and close. The user password will not be asked again each time your system is starting-up.
No comments:
Post a Comment