Perform MD5 encryption on grub in Linux

Source: Internet
Author: User

1, in your own terminal grub-md5-crypt, in the emergence of passwd: prompt enter your password (note, in Linux input password is not displayed), retype password: enter the password again. Here we will use 123456 for demonstration.
[ ZYJ
@ Fedora13 ~] $ Grub-md5-crypt
Password:
Retype password:
$1 $ gpgkm/$ no0gm4nym. zno7myl. rgp0
What we get here is the string after the password is 123456 encrypted, which must be noted down and useful later.
2. modify the configuration file/etc/grub. conf.
When modifying the configuration file, use the VI editor. You must use the Super User here, because the common user has insufficient permissions.
Below are unencrypted original configuration files:
Default = 0
Timeout = 4
Splashimage = (hd0, 2)/boot/GRUB/splash.xpm.gz
Title fedora (2.6.34.7-56. fc13.i686. PAE)
Root (hd0, 2)
Kernel/boot/vmlinuz-2.6.34.7-56.fc13.i686.PAE Ro
Root = UUID = 4a60f9c2-0eae-4c55-b294-60bc90f391cd rd_no_luks rd_no_lvm
Rd_no_md rd_no_dm lang = zh_CN.UTF-8 keytable = US rhgb quiet
Initrd/boot/initramfs-2.6.34.7-56.fc13.i686.PAE.img
Title Windows 7
Rootnoverify (hd0, 0)
Chainloader + 1
I will not describe this configuration file one by one. Next we will see where the MD5-encrypted string is added to the configuration file. The following is the modified configuration file:
Default = 0
Timeout = 4
Splashimage = (hd0, 2)/boot/GRUB/splash.xpm.gz
Password -- MD5 $1 $ gpgkm/$ no0gm4nym. zno7myl. rgp0
Title fedora (2.6.34.7-56. fc13.i686. PAE)
Lock
Root (hd0, 2)
Kernel/boot/vmlinuz-2.6.34.7-56.fc13.i686.PAE Ro
Root = UUID = 4a60f9c2-0eae-4c55-b294-60bc90f391cd rd_no_luks rd_no_lvm
Rd_no_md rd_no_dm lang = zh_CN.UTF-8 keytable = US rhgb quiet
Initrd/boot/initramfs-2.6.34.7-56.fc13.i686.PAE.img
Title Windows 7
Rootnoverify (hd0, 0)
Chainloader + 1
Here, lock is used to lock fedora. An error is prompted during startup, requiring you to press P to enter the password.
In this way, the grub MD5 encryption is simple. You can try it on your own !!!

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.