•  
  • Home
  • Privacy Policy old
  • Me, about
  • Contact

Posted:
October 6, 2010

Tags:
bash, grub bootloader, lilo bootloader, linux, OpenSuse, root passwd

Comments: 5

Reset Opensuse root password

Forgotten the root password to your linux system? Don’t want to reinstall and lose your files or are you just plain lazy? Here is an easy way to reset the root password if you ever find yourself in that situation.

I must admit, I was surprised how easy it was. I had an old test box at home, and was too lazy to rebuild it so I did a bit of searching on the internet. What I describe below worked on OpenSuse 11.2, 11.3 and also 10.3.

For other distros and version, I cannot guarantee that it will work. But please leave a comment at the end of the post to let me and others know.

Turn the computer on and select the normal boot menu from the list:

OpenSUSE_boot screen

Once selected, tab down to the “Boot Options” box and type in the following:

init=/bin/bash if you are using GRUB Boot loader

linux init=/bin/bash if you are using LILO Boot Loader

If you are not sure what sort of bootloader you are using (and I certainly didn’t), I did notice that just before the boot screen appeared there flashed a quick message indicating the grub bootloader was there.

This will throw you straight into a Bash shell prompt which comes up even before the Single User mode loads and has the “/” root file system mounted. How cool is that?

Do a mount command to check if the root file system “/” is mounted as Read-Write.

If you notice the screenshot below, you will see that mine was mounted.

OpenSUSE_mount

Next, simply type the passwd command and enter a new password (as per below):

opensuse_linux:~ # passwd
Changing password for root
New Password:
Reenter New Password:
Password changed

Type in reboot and that’s pretty much it:

opensuse_linux:~ # reboot

Now, if you’re thinking that your system in insecure because you can change the root password so easily, bear in mind that you will need physical access to the box in order to perform the above. Furthermore, you can secure things a bit by password protecting the BIOS of even the bootloader if so desired.

Hopefully, the above will work for you and save you a bit of heartache if you forget/lose your root password.


  • bash
  • grub bootloader
  • lilo bootloader
  • linux
  • OpenSuse
  • root passwd

Share This Post

  • Facebook
  • Twitter
  • Google Plus
  • Pinterest

Related Posts

Comments (5)

  1. dee

    August 4, 2011 at 4:48 pm

    Hi,

    I have recently forgotten my root passwd for my SUSE 10.1 box and tried changing it in the single user mode but unfortunetely the keyboard is getting disabled so i m able to type nothing…

    Im now clueless, please help me wat could be done..

    Thanks
    dee
    pradeep.aleti@gmail.com

  2. mohamed arshad

    October 19, 2011 at 4:52 pm

    hi,
    it’s coming command not found

  3. indi

    October 21, 2011 at 11:13 am

    Hi,

    At what stage is it coming up ‘command not found’? Also, what version of Suse are you running?

  4. indi

    October 21, 2011 at 11:16 am

    Dee, are you able to type anything? Try hitting the TAB key before typing.

  5. Selma

    June 30, 2013 at 9:13 pm

    Worked for me on Opensuse 12.2! Thank you very much!!!

Leave A Comment

Click here to cancel reply.

Name*

Mail*

Website

Blogroll

  • Mount Annan
  • Blog3
  • Contact
  • Guest Posts
  • Home
  • Me, about
  • Privacy Policy
  • Privacy Policy old
  • Terms
  • Yop Poll Archive

Powered by Socrates