Whenever you forget your root password, its a disaster and root password is really important because you can’t even look disk property without being root. Apart from this, you have got much reason to reset a UBUNTU ROOT password like forgetting after installation or missed with handling lots of passwords.
Well, this tutorial will help you reset your Ubuntu ROOT or you may reset any account password. In this article, we will not use any live OS or other media but we will use recovery method to do so.
Step 1: Reboot system
First, you need to reboot your system and get the into recovery mode option by holding the shift key. In the case of dual boot system, you don’t need to hold any key. Your screen should look like below screen. Now From this boot menu screen, select recovery mode, it is number second in most of the cases.
Step 2: Get Root Shell
Now, After select, the recovery let the system boot and after finishing up the boot process it will show you few option to select.
Now like the image above select Drop to root shell prompt option to with using arrow keys and press enter to get the root shell prompt. Well, this root shell is supreme commander in UBUNTU system so be careful with the commands.
Step 3: Remount File System
With advance development Ubuntu the default mode of file system is Read-only so we need to make this read/write but remount it in read/write mode by the following command
#mount -o rw,remount /
after this command, we have our file system with root login and in R/W mode.
step 4: Identify User For Reset Password
Now to identify the user fro which you need to reset password use the following command
listing /home directory will show you all the user present on the system if they were created with default home directory location. well in my case I am going to reset the root password.
Step 5: Reset Password
To reset the password for root you need run a simple command like below
#passwd #Enter new UNIX password: #Retype new UNIX password: #passwd: password updated successfully #exit
after hitting these commands you will be prompted for a new password, so enter your password and hit enter and you will be asked again for re-entering your password. After re-entering your password and hitting enter and you are done.
in case you want to reset the password for a system user then you should use passwd <username> like passwd kp . after getting this completed type exit and press enter and soon after hitting exit you will get a return to the recovery menu
Step 5: Getting System Reboot
right after Hitting exit command you will be back to recovery menu . from that recovery menu choose
resume normal boot
After this option select <OK> and press enter to get the system reboot and now you have the password to get login into the machine.
You May Also like to Read