How do I reset my administrative password


This is a problem that we might experience while using any operating system. 
So how do we reset the administrative password? 


To reset the machine password we need to boot into recovery mode.
To do that we must enter the GRUB menu. If you have a dual-boot or multi-boot ( two or more operating systems on the same computer) you will see the GRUB menu directly.
 I f you don't have any other operating system after the BIOS menu hold down the SHIFT key and you see a menu like this:

Select the second one (the one with recovery mode).
Now you will see this menu:

Select root or netroot using the arrow keys and press ENTER.
Now you should see a root prompt like this:

At this stage you should have a read-only filesystem. You have to remount it with write permissions:
Type the following and press ENTER
mount -rw -o remount /
chmod 640 /etc/shadow
Now we can set the password using passwd command.
root@ubuntu:~# passwd USER
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Substitute USER by your user name.
Type in what you want the new password to be at the prompt. After it's successful reboot the machine and then you will be able to log in with your new password.

Popular posts from this blog


How to setup a wifi-hotspot in Ubuntu: The terminal way.

How to install OpenVAS 7 in Ubuntu