Pages

Saturday, January 15, 2011

CRACKING LINUX PASSWORD WHEN GRUB CANNOT BE CHANGED




However, if the Grub is password protected, then this method will not work. So in such cases, we can use the Linux Live CD to crack the Linux Password. Follow the below given steps to change the Linux Password, using the Linux Live CD.
  1. Boot your computer from your Linux Live CD, choosing “Try Linux without any change to your computer” from the boot menu.
  2. Once the system boots open up a new Terminal window and then type in the following command:
    sudo fdisk –l
  3. This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.
  4. Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.
    sudo mkdir /media/sda1
  5. The next command will mount the hard drive in the /media/sda1 folder.
    sudo mount /dev/sda1 /media/sda1
  6. Now it’s time for the command that actually does the magic:
    chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.
    sudo chroot /media/sda1
  7. Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.
    passwd <username>
  8. Now you should be able to reboot your system and log yourself in with your new password. 

TECHNO TITANS

1 comment:

  1. However, if the Grub is password protected, then this method will not work. So in such cases, we can use the Linux Live CD to crack the Linux Password. Follow the below given steps to change the Linux Password, using the Linux Live CD.

    Boot your computer from your Linux Live CD, choosing “Try Linux without any change to your computer” from the boot menu.

    Once the system boots open up a new Terminal window and then type in the following command:

    sudo fdisk -l

    This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

    Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

    sudo mkdir /media/sda1

    The next command will mount the hard drive in the /media/sda1 folder.

    sudo mount /dev/sda1 /media/sda1

    Now it’s time for the command that actually does the magic:

    chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.

    sudo chroot /media/sda1

    Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

    passwd
    Now you should be able to reboot your system and log yourself in with your new password

    Now you should be able to reboot your system and log yourself in with your new password.

    ReplyDelete

share