Getting into the linux root – grub editing

As this page says root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser. Getting into the linux root is a necessity when talking about privileges and let me show you how to get the easy access.

You shall need :-

  1. An Linux operating system -(Ubuntu ,Fedora or anything .. )
  2. Direct access to the system, ie you need to restart it alright.
  3. The Recovery mode enabled in the GRUB is not a necessity.

The steps :-

  1. So, the vector is the GRUB boot loader, we see just after booting on our system :-
  2. Here, select the first option , and press ‘e’ as it says to edit.(Ubuntu,with LINUX ) 2.
  3. Here edit the line : set root = ‘(hd0,msdos1x)4‘ to ‘ ‘
  4. press F10 to boot and you will get into the root@none shell 😀
  5. now enter : mount -rw -o remount /
    Actually you are remounting the base file-system ‘/’ in rw (read-write) mode so that you can actually change the / contents .
  6. now enter the password changing command : passwd
  7. enter new passwords 🙂
  8. enter the command : sync      To make the changes permanent (can skip of course.)
  9. reboot -f      and you are ready to go :).
  10. Now to access root terminal from a local account :- Open the terminal, and type su ; enter the root password and 🙂

Thank You !

Disclaimer :- Working in the root terminal can cause irrecoverable errors to the system. Please be careful.I shall never be held responsible though. 😀

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s