Software:Howto: Recover Root Password


Results 1 to 11 of 11

Thread: Software:Howto: Recover Root Password

  1. #1
    Join Date
    Mar 2004
    Posts
    17

    root pass

    Ok I did a stupid thing.... I just finished installing SuSE 9.0 in my laptop by ftp, it took all night. So when it finished downloading all packages I gave my root pass, which I thought well lets give it an easy but hard to guess password and I did... then it asked me if I wanted to download some updates of drivers and stuff so I did and it took another hour or two. So downloading packages is done till here....

    Now, the problem is I created my user account and everything, but i forgot my root password and now I can't log as super user to install software and stuff....


    Is there anyway to find out or reset my root password without having to reinstall which would again take for ever?

    thanks, kinda stupid huh?
    Share on Google+

  2. #2
    Join Date
    Mar 2004
    Posts
    17
    I remembered my password!!! but its good to know for another time though... Any suggestions?
    Share on Google+

  3. #3
    Join Date
    Mar 2003
    Location
    mass, usa
    Posts
    346
    the easy way to do this is boot the machine up in single user mode.

    Since you can log in you might be able to do "init s" but I have never done it that way.

    most of the time you send a opion to you boot loader

    Lilo:
    when you get to the boot prompt type "linux single" This will boot to a prompt where you are logged in as root.

    grub:
    hightlight your kernel line and type e to edit.

    go to the line that starts with kernal select e again to edit and add " single" to the end

    hit enter and then b for boot
    Share on Google+

  4. #4
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    2,171
    there is a linux distro named tomsrtbt for that matter.

    It is really Tom's Root Boot, shortened to tomsrtbt, which is a floppy based distro for doing special tasks.

    I forgot the specific method for doing it, but I suppose there is documentation on the site. I found out about linux and distros with www.linux.org and you can search for distros by clicking "distributions".
    Come under the reign of the Idiot King...
    Come to me ... I love linux!

    Registered Linux user: Idiot King #350544
    Share on Google+

  5. #5
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,320
    From a text file I have saved (likely from here).

    Forgotten Password

    Help! I forgot my root password. How do I log in now?

    You can log in using single-user mode and create a new root password.

    To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following:

    1.

    At the boot loader menu, type [e] to enter into editing mode.
    2.

    You will be presented with a boot entry listing. Look for the line that looks similar to the following:

    kernel /vmlinuz-2.4.18-0.4 ro root=/dev/hda2

    Press the arrow key until this line is highlighted and press [e].
    3.

    Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. Press [Enter] to make the editing change take effect.
    4.

    You will be brought back to the edit mode screen. From here, press [b] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

    sh-2.05#

    5.

    You can now change the root password by typing

    bash# passwd root

    You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas
    Share on Google+

  6. #6
    Join Date
    Mar 2004
    Posts
    17
    I did what you told me (using grub) but i had to get around it a little, pressing [e] wont edit the the line as you said, it showed nothing, so what i did is just add single in the blank space below and i think it worked...

    The only thing is that when its starting up it asks me for my old root password, so i guess it doesnt work. for lost passwords or maybe im doing something worng
    Share on Google+

  7. #7
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,320
    Sorry as I forgot you are using SuSE 9.0.

    At the initial Grub screen you will see a commandline at the bottom, so enter a 1 there before the timer times out and then press enter. That should get you to single mode.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas
    Share on Google+

  8. #8
    Join Date
    Mar 2004
    Posts
    17
    thats the same as typing single and still asks for a root password
    Share on Google+

  9. #9
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,320
    Originally posted by adrians
    thats the same as typing single and still asks for a root password
    Sorry as I've never had the need to recover my root password and I thought those instructions would work.

    Try these G4L search results for 'recover root password'. You'll see there are some for Redhat and SuSE. Hopefully you will find the solution.
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas
    Share on Google+

  10. #10
    Join Date
    Mar 2003
    Location
    Here
    Posts
    343
    I usually use Damn Small Linux or Knoppix to boot up, then:

    mount /dev/yourrootdrivehere /mnt/yourrootdrivehere
    chroot /mnt/yourrootdrivehere
    passwd
    (Type new password twice.)
    [Ctrl-D]
    reboot
    "Heisenberg may have been here."
    Share on Google+

  11. #11
    Join Date
    May 2003
    Location
    742 Evergreen Terrace
    Posts
    221
    Originally posted by mdwatts
    From a text file I have saved (likely from here).
    I noticed this question has been asked numerous times before my newbs on here and other linux boads.

    How about moving this thread to the Just-Linux Help files library ?
    <a href="http://www.justlinux.com/forum/showthread.php?s=&threadid=131047">JustLinux's Newbie Reading Guide</a>
    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •