Ubuntu is a popular Linux-based operating system known for its user-friendly interface and robust security features. One of the essential aspects of maintaining a secure Ubuntu system is regularly changing the password.
Changing the password of your Ubuntu account is a straightforward process that can be accomplished in a few simple steps. In this article, we will walk you through the steps to change Ubuntu password, ensuring your system remains secure.
It is highly recommended to change Ubuntu password regularly to prevent potential security breaches. A strong password is important to protect sensitive data from prying eyes. Whether you’re a seasoned Ubuntu user or a newcomer, this article will guide you through the password-changing process. By following the steps outlined in this article, you can change Ubuntu password quickly and efficiently.
Table of Contents
How To Change Ubuntu Password?
How to change Ubuntu password without current password?
- Reboot to grub menu
- If Ubuntu is the only operating system on your computer, to get the boot menu to show, you have to hold down the Shift key during bootup.
- If you have a dual or multi-boot, the boot menu should appear without the need to hold down the shift key.
- From the boot menu, select recovery mode and hit Enter.
- You’ll be presented with a few options. Select the Drop to root shell prompt option and then press Enter.
- Once you’re at the root shell prompt if you have forgotten your username as well, type –
This will list all the user accounts in your system.
5. To reset the password, type
passwd username where username is the username you want to reset, for example –
6. You’ll then be prompted for a new password. Type your new password and then hit Enter.
7. Now the password should be reset. Type exit to return to the recovery menu.
8. After you get back to the recovery menu, select resume normal boot, and your new password should work now.
Option 2 – Root Shell
- Reboot your computer. Follow Step 1 in Option 1 above for a single or dual boot system.
- Highlight your image and press E to edit.
- Find the line starting with “linux” and append
rw init=/bin/bashat the end of that line.
- Press Ctrl + X to boot.
- Type in
- Set your password as in OPTION 1 above and restart your PC. Your new password should work now.
Option 3 – Live Disc Or USB
- Boot to the Live Ubuntu media.
- From the menu, open a terminal.
- Find out the device name for your primary disk.
sudo fdisk-lwill list all partitions. Derive your partition from the list. We’re looking for something like
/dev/sda1(which it will likely be)
- Mount this somewhere so we can use it: (Assuming our primary partition is at /dev/sda1)
sudo mount /dev/sda1 /mnt
5. Cross-mount things from the Live install so we can “use” the mounted disk (just copy and paste):
for d in dev sys run proc; do sudo mount --bind /$d /mnt/$d; done
6. Become root on the system by running – sudo chroot /mnt You can now do anything root can on the real install.
7. Set the password for the account with:
8. Reboot and you are done
So that’s how simple it is to reset the root password in Ubuntu. You could also make use of various recovery CDs. Please keep in mind that this constitutes a security risk because anyone with access to your sensitive files might quickly change your password. You should be cautious about who has access to your computer.
If you have any question, please let me know in the comment section below, or join our Discord server.