http://www.Linux-Boot.net


Linux-Boot.net

BIOS
CPU Arch

MBR
Boot Stages
Boot Squence
Boot Errors

BootSplash
FrameBuffer

Booting
Boot-Loaders
SysLinux
Grub
Lilo


RootFS-HOWTO
RootFS-Config
RootFS-HOWTO


InitRD-HOWTO
InitRD
InitRD-Config
InitRD-HOWTO

Creating initrd.gz
RamDisk
Loop

Viewing initrd.gz


Obsolete
initrd/rootfs Scripts

Old Scripts


initrd HOWTO Scripts
rootfs HOWTO Scripts
( Bootable CF, USB, FD, CD )
Standalone Boot
/boot
InitRD
RootFS
Patches


Boot Media
CD-Boot
Floppy-Boot
USB-Boot
Compact-Flash-Boot
Network-Boot
DOS


Chroot


Forgot Root PassWord


CDRW HOWTO



1U Rackmount Chassis

Custom-Chassis.com

Linux-1U.net

1U-ITX.net


ITX-Blades.net


Small PC cases

Mini-Box.net

Wrap-Box.net

Wrap-OS.net


Wan-Sim.net



Linux-Consulting.com

Linux-CAE.net

Linux-Sec.net

Linux-Boot.net

Linux-Backup.net

Linux-Wireless.org

Linux-Office.net

Linux-Video.net

Linux-VOIP.net

Linux-Jobs.net

Linux-Diff.net

1U-Raid5.net

Linux-Howto.net


Spam Reporting



Free Linux CDs

ISO9660.org

Distro-CD.org

Patch-CD.org




Contact



Linux is a registered trademark of
Linus Torvalds

More Linux Legalese


Fixing Lost or Forgotten PassWord

  • There are at least 3 easy ways to Change the password
    • These methods assumes you have write access to the root partition

    • if you do NOT have write access, you can attempt to change it to rw permissions

    • use the passwd command to change the passwd
      • root# passwd

    • use "vi" to edit the passwd file
      • unplug the machine from the network
      • root# vi /etc/shadow
      • reboot into single user mode to reassign a new passwd

    • use "grep" to edit the passwd file (sometimes you dont have vi/emacs available)
      • unplug the machine from the network
      • root# echo "root:0:0:xxxx:root:/root:/bin/bash" > /etc/s.new
      • root# grep -iv ^root /etc/shadow >> /etc/s.new
      • root# mv /etc/shadow /etc/shadow.original
      • root# mv /etc/s.new /etc/shadow
      • reboot into single user mode to reassign a new passwd
      • reconnect the network and boot as usual

Your Root FileSystem ( / ) is okay --- you can get to the boot: prompt
Things are bad, you cannot get boot: -- use a StandAlone boot media
  • When your system is dead, you need to boot something else

  • Use a standalone boot floppy or cdrom to boot linux
    ( standalone boot works by itself and does NOT depend the hard disk )

  • Clean up your "bad disk"
    • e2fsck /dev/hda1
    • if you have too many consecutive block errors ... your disk is too corrupted

  • mount and edit your passwd file
    • mount /dev/hda1 /mnt/test
      • vi /mnt/test/etc/shadow
        -- or --
      • chroot /mnt/test ; passwd
    • umount /mnt/test
    • reboot

Getting write permission to fix the passwd
  • If you did NOT have rw permission on /, there's probably something seriously wrong and
    you should find out why not before you change it

  • root# mount -o rw,remount /dev/hda1 /

Resetting MS Windows Password

Copyright © 2000
Linux-Consulting
All Rights Reserved.
Updated: Thu Sep 8 15:54:11 2005 PDT