Re: Reset root password

From: Mr. Boy (mrboy77_at_gmail.com)
Date: 05/19/05


Date: 19 May 2005 14:17:11 -0700

dude the fastest way to accomplish this is to boot your box with a
rescue cd, mount the root partition in a temporary folder;

after the boot process finishes, do this:
( "root@slax: ~#" this represents a example shell prompt of a rescue cd
after booted)

root@slax: ~# fdisk -l

this will show the partition table found in your discs (if they were
detected at boottime)

root@slax: ~# mkdir /mnt/linux

After creating the mount point you should mount your root partition
(hopefully you know which one is your root partition)

root@slax: ~# mount /dev/*** /mnt/linux -t ext3 -o rw
the *** are just and example, you should put here the real device and
real partition shown by fdisk, example (/dev/hda2 [second partition,
primary-master] IDE disc)

root@slax: ~# cd /mnt/linux/etc

here, you should edit your passwd file, the first line should show you
the login information of root user UID 0 something like this:

root:x:0:0::/root:/bin/bash

well, remove the x between root: and :0 and save the file, reboot .....
ta-da!! login with root, then type the hardest password ever:
press <ENTER>

cheers! you have cracked your own root pass!



Relevant Pages

  • Re: Root partition and LVM
    ... root on LV should be used by advanced users only root on LVM ... requires an initrd image that activates the root LV. ... initrd image to take care of mounting the LVM root partition. ...
    (Fedora)
  • SUMMARY: booting after recovery
    ... the *current* root partition, so I had to copy that over afterwards. ... I've got an interesting problem trying to boot a hard disk using a recovered OS. ... my basic steps in the recovery were: ...
    (SunManagers)
  • Re: Ubuntu: mdadm cannot create md* device
    ... It's going to be the root partition, ... and their default initrd and kernel doesn't even support raid devices ... with the raided root as it appears. ...
    (comp.os.linux.setup)
  • Re: partitioning for dual-linux..
    ... root - 0.15GB ... place a /home in each root partition (one for each distro) and then ... the root partition, but place all the "neutral" stuff like documents, ... Debian HFS. ...
    (Debian-User)
  • Re: [SLE] Help!! user root doesnt exist
    ... Mount the root partition. ... new files first). ...
    (SuSE)