Linux password hack and grub encryption demo

Source: Internet
Author: User

password cracking and Grub encryption demo

So easy, can not be!


Principle:

by entering single-user mode (the single-user mode is only one user can access the state of the resource, and the single-user mode is the system in the most original state, most services are not yet open), you can modify the password

Steps:

1. Press and hold while booting Shift key Enter Grub Interface (Grub is a boot loader, similar to a PC BIOS)


2. use the keyboard up and down to move to the second row of recovery mode, Press E (note not enter)


3. move the cursor to the third line and replace "ro recovery nomodeset" with " RW Single Init=/bin/bash "

4. then press the Ctrl + x , which goes into single-user mode


5. Enter a command to change the password: passwd + username (user to modify)


GRUB Encryption:

       · Description: to prevent others from changing the password by using the above method, grub can be encrypted and inaccessible if someone does not know the account and password that the grub encrypted.

Specific operation:

1. Make Secret password

Input command: GRUB-MKPASSWD-PBKDF2

Prompt to enter the password to encrypt, such as 123

Generate the password you want to encrypt, and copy it.

2, modify/etc/grub.d/00_header, append at the end:

Cat <<eof

               set superusers= " test "                     // test is an encrypted account set for grub

PASSWORD_PBKDF2 Test grub.pbkdf2.xxxxxxxx/ /Back is the encryption password made above

Eof

3. Update Grub

Input command: UPDATE-GRUB2

4. The next time you enter grub, you will need to enter your grub account and password (e.g., account test, password 123) for modification.

Linux password hack and grub encryption demo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.