Since we’re all humans and we do forget at times, this brief tutorial is going to show you how to reset or recovery a forgotten users or root password on Ubuntu 14.04.
We wrote the same tutorial for CentOS 7 users which was well received so we decided to write one for Ubuntu users as well. If you manage or own a Ubuntu machine or server and you’ve forgotten your password, this brief tutorial should help you reset or recover it. It’s a simple tutorial that will help anyone having such issues.
To read our previous tutorial on resetting passwords on CentOS 7 computer, please click here.
Now, something you should understand before you continue. This method will only work if you’re directly connected to the machine and able to see the boot menu while Ubuntu is booting up.
You won’t be able to access Ubuntu boot menu remotely via terminal shell like SSH unless you are connected via serial over Ethernet with access to the boot menu.
Also, Ubuntu recovery mode is enabled by default and available to anyone with access to machine. If you want to secure your Ubuntu machines, you may want to turn off or disable the Ubuntu recovery mode.
When you turn off the recovery mode, then you run the risk of not being able to recover your system or reset password easily. So, it’s up to you whether to disable it or leave it as default. Remember, making sure your system is protected and secure should be your #1 priority.
When you’re ready to reset your password on Ubuntu, continue below.
Ubuntu: Forgot Password
First power on your Ubuntu machine. At the boot menu, you’ll have few seconds to choose the Ubuntu OS to boot into. When prompted, choose *Advanced options for Ubuntu
Next, select Ubuntu, with the latest kernel version (recovery mode) to boot into. The recovery mode is used to recover your system on Ubuntu and perform other tasks like resetting your password and updating your system if you can’t boot into it.
Then select the root option to drop into the root shell prompt. In this shell, you have read-only access. In order to run administrative commands, you must remount the shell with read and write permission.
Next, remount the shell with read and write option. To do that, run the commands below.
mount -rw -o remount /
After running the above commands, the shell should be remounted with read/write permission. Now you can run limited sets of commends, including password change commands as the root user.
To change or reset your forgotten password, run the commands below.
sudo passwd username
Replace username with your account name or user name for the machine. If you have to root account enabled, you should replace username with root to change the root password.
When you run the above commands, you’ll be prompted to create and confirm a password for the account name you mentioned. create it and you’re done.
When you’re done, type reboot to restart your machine. This is how to reset your password on Ubuntu.
Enjoy!
Frequently Asked Questions
How to reset forgotten password on Ubuntu 14.04 server?
To reset a forgotten password on Ubuntu 14.04 server, you need to access the boot menu and select 'Advanced options for Ubuntu' during bootup.
Can I recover a forgotten root password on Ubuntu 14.04?
Yes, you can recover a forgotten root password on Ubuntu 14.04 by following a simple tutorial that allows you to reset the password.
Is it possible to change a user password on Ubuntu 14.04 if forgotten?
If you've forgotten a user password on Ubuntu 14.04, you can change it by accessing the boot menu and using the recovery mode to reset the password.
What should I do if I forget my Ubuntu server password?
If you forget your Ubuntu server password, follow the steps to reset or recover it using the boot menu options provided during startup.
Is it necessary to disable Ubuntu recovery mode to reset a forgotten password?
Disabling Ubuntu recovery mode is optional but recommended for security reasons. However, leaving it enabled allows for easier password recovery in case of emergencies.
How do I turn off Ubuntu recovery mode to enhance security?
To enhance security, you can disable Ubuntu recovery mode by modifying the boot options. However, be aware that this may make password recovery more challenging.
Can I reset my Ubuntu password remotely via SSH if forgotten?
No, you cannot reset your Ubuntu password remotely via SSH if forgotten. The password reset process requires physical access to the machine and access to the boot menu.
What is the default state of Ubuntu recovery mode for password recovery?
Ubuntu recovery mode is enabled by default to facilitate password recovery. It provides a simple way to reset forgotten passwords on Ubuntu machines.