- Boot up your computer
- When asked, hit "Escape" to enter the GRUB menu
- Select the option that displays "recovery mode"
- Select the option labeled "root prompt"
- You are now logged in as root with the ability to change anything
root@laptop:~# cat /etc/passwd | grep 1000:1000This output shows that there is a user named "tristan" who is the main user of this system. Next I needed to reset the password for that user. So I entered this command:
tristan:x:1000:1000:Tristan Rhodes,,,:/home/tristan:/bin/bash
root@laptop:~# passwd tristanNext I was able to reboot the system and login as "tristan" using the new password I created.
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@laptop:~#
Can this process be improved?
Like I mentioned above, the root command prompt is not the most user friendly interface ever invented. At best, it is confusing to new users and at worst it is very dangerous. So how can this be improved? Well there are already some great ideas floating about, and thanks to the powerful Ubuntu Brainstorm website you can see what people have said about this topic. One of the more popular ideas is a Graphical Recovery Mode. If you want to help make Ubuntu better, please vote on the ideas you want to see implemented or even post your own ideas on the Ubuntu Brainstorm website.
Is there any way to prevent root access?
Many people may choose to give up the simple password recovery in the interest of securing their system. There are many different ways to do this including:
- Use a BIOS password that prevents the computer from booting
- Use a GRUB menu password that prevents the computer from booting
- Use an encrypted file-system that requires a password to use
