Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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
    St. Petersburg, FL
    well, you can always:
    1)boot a livecd like gentoo, knoppix, etc.
    2)become root on the livecd
    3)mount your hard drive
    mount /dev/hda1 /mnt/hda1
    replacing hda1 with the appropriate drive and mountpoint
    4)chroot into your linux distro's environment
    chroot /mnt/hda1 /bin/bash
    replacing hda1 with the correct mountpoint
    5)then do:
    and whabam you should be set

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    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
  5. #4
    Linux Engineer
    Join Date
    May 2003
    Greece / Athens
    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
    North Carolina
    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

    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
    i think we should have a sticky post about how to recover root password

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

  10. #9
    just go to
    remove encrupted passwd

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

  11. #10
    Just Joined!
    Join Date
    Sep 2005

    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

Posting Permissions

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