Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
What can I do to recover root password if I forget it....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Posts
    3

    forgot root password


    What can I do to recover root password if I forget it.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    well, you can always:
    1)boot a livecd like gentoo, knoppix, etc.
    2)become root on the livecd
    3)mount your hard drive
    Code:
    mount /dev/hda1 /mnt/hda1
    replacing hda1 with the appropriate drive and mountpoint
    4)chroot into your linux distro's environment
    Code:
    chroot /mnt/hda1 /bin/bash
    replacing hda1 with the correct mountpoint
    5)then do:
    Code:
    passwd
    and whabam you should be set
    -lakerdonald

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Or you can boot into single-user mode. On grub do this by appending 'single' to the kernel line. This puts you directly into root without a password. All the more reason to password-protect grub.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    May 2003
    Location
    Greece / Athens
    Posts
    1,169
    this is definately problem cause if you reboot a server and someone types that gets full access....
    Linux For Ever!

  6. #5
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    Quote Originally Posted by stathisx
    this is definately problem cause if you reboot a server and someone types that gets full access....
    thats why physical access to any machine must be protected if the machine is important, like a server. Mac OSX is just as easy to crack into. XP you need boot media, but with physical access anything is possible

  7. #6
    Just Joined!
    Join Date
    Dec 2004
    Posts
    3

    Qt Designer - Segmentation fault

    I am doing a project using Qt and postgreSQL. While opening some forms segmentation fault occur some times. What may be cause and How can I solve the problem. Please help.

    Hasan C. C.

  8. #7
    Linux User
    Join Date
    Feb 2005
    Posts
    290
    i think we should have a sticky post about how to recover root password

  9. #8
    Linux User
    Join Date
    Oct 2004
    Location
    Serbia&Montenegro
    Posts
    281
    You can always hack yor box
    Linux registered user #358842
    Human knowledge belongs to the world.

  10. #9
    Just Joined!
    Join Date
    Apr 2004
    Posts
    10
    just go to
    shadow
    remove encrupted passwd
    sample
    root:$1$dN/PzhOV$de.3Uja9QwQElWnhgVcyP.:12298:0:99999:7:::

    root::13046:0:99999:7::: (with out password)

  11. #10
    Just Joined!
    Join Date
    Sep 2005
    Location
    INDIA
    Posts
    9

    Re: forgot root password

    Quote Originally Posted by hasanceecy
    What can I do to recover root password if I forget it.
    on the grub interface highkight ur linux distro
    press 'e' on the key board
    u will be taken to the sub menu
    here select the line that starts with the word kernel and hit 'e' again
    the line will now appear in editable mode
    donot delete anything from the line... go to the end of the line and add '1' without the quotes to it
    "kernel ***** ro root=LABEL=/ 1"
    hit enter
    now u will be taken back to the sub menu
    now press 'b'
    u will be booted in single user mode and dropped down to a shell
    now type at the shell
    #passwd -d root
    this will remove old password of root
    now type
    #passwd root
    Enter new password: ****
    Confirm: ****
    this will give u a new password for root user
    now type
    #init 3
    u will be taken to the root login
    now login with ur new password for user root

Page 1 of 2 1 2 LastLast

Posting Permissions

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