Monday, 6 June 2016

How do I reset a lost administrative password?

Press Esc, and choose Advanced options

Enter image description here
Choose recovery mode:
Enter image description here
Using the arrow keys scroll down to either root or
netroot (doesn't matter in this case) and then hit Enter.
Enter image description here

You should now see a root prompt, something like this:
root@ubuntu:~#
At this stage you should have a read-only filesystem. You have to remount it with write permissions:
mount -rw -o remount /
Now we can set the user's password with the passwd command. :
root@ubuntu:~# passwd shellcode
Enter new UNIX password: 
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~#
Type in what you want the new password to be at the prompt. After it's successful reboot the machine and the user will be able to log in with their new password.