Hacking Ubuntu in to 16.04 / 16.10

- Aniketh Girish


Okay folks, It's been a long time since I was in this open source world and writing hell lot about it. So now for a change let me dig into the security field too. Most of my works would be open-source related but for one or two times I will blog in about the security field too. So here we go. :)

Step 1: Drop into the Root Shell.

Right after your boot begins, i.e after the BIOS screen, you’ll see the Grub screen in multiple OS systems. If you use a single OS system(only Ubuntu) you need to hold down the shift key, this will bring up the Grub menu. Choose advanced options.

Now this will lead you to another screen where you choose the “recovery mode”. Enter the recovery mode. Now from the recovery menu, choose the root – drop to root shell prompt option.

NOTE: You now have root privileges and please be careful with the commands you use.

Step 2: Change the mounted filesystem to read/write.

In most contemporary versions of Ubuntu, the file system is mounted as read-only. Any command to change the password as of now would result in the error message “Authentication token manipulation error”. So type in:

~$ mount -rw -o remount / 

Step 3: Enter the New Password

Now all you need to do is enter a new password for your root and you are done. You can now have root privileges in your system. For this, you type in

~$ passwd username

To find out the username use the command

ls /home

(i.e is the output of the “ls /home” command)

Now you’ll be prompted to enter the new password. Enter the new password, confirm it again and you are done. You have successfully gained root access to a system. Now type exit and continue with resume normal boot from the recovery menu.

Hence, that's it for now. Will be back soon with some more :)