My Journal | My Journey

My Journey | My Journal


How to Retrieve Root Password on Linux Machine

Posted on July 22, 2008 Category Uncategorized

Sometimes some people forget their root password on their Linux machine. And not recommended to install back the Linux since so many configuration have done during that period time. Now, we can retrieve the password as long as we have physical access to the Linux machine. There are 2 ways to solve this problem.

1st way
Reboot your Linux machine
Get into “grub” menu then press “e”
Go to your default kernel then press “e” again
Then go to grub prompt grub> default_kernel single <– type “single” at the end of your kernel. We are entering single mode.
Then it will appear as sh-3.00#
Then type “passwd” or edit /etc/passwd

2nd way
Reboot your Linux machine
Boot from 1st CD of your distro
Get into the “Rescue Mode”
Follow the instruction
We get into prompt again sh-3.00#
Type “sh-3.00# chroot /mnt/sysimage”
Then type passwd or anything you want

Congratulations you have your root password back. Don’t forget about your root password again in the future

  • Dual-boot ‘$100 laptop’ to run XP and Linux, What for?

  • Project Blog

  • Popularity: 30% [?]


    2 Comments

    1. aburifqi

      I think the simplest way is boot with “recovery mode” a.k.a “single user mode”
      And go to prompt then type “passwd” to get new password.


    2. Milf Soup Fan

      Ou-yo-yu you have a nice little blog…it\’s now in my bookmarks ;0


    Leave a Reply




    ↑ Top