Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction of MD5 encryption method of GRUB in Linux system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "Linux system GRUB MD5 encryption method introduction", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux system GRUB MD5 encryption method introduction" bar!

1. Use grub-md5-crypt to generate the md5 password of GRUB

Add the password of GRUB through grub-md5-crypt. For example, we want to set the password of grub to 123456, so we need to encrypt the password of 123456 with md5 first.

[root@linux01 beinan] # / sbin/grub-md5-crypt

Password: enter 123456 here

Retype password: enter 123456 again

$1 $7uDL20 $eSB.XRPG2A2Fv8AeH34nZ0

$1 $7uDL20 $eSB.XRPG2A2Fv8AeH34nZ0 is the value generated by adding a password through grub-md5-crypt. We have to write down this value, but it's still useful.

2. Change / etc/grub.conf

For example, my original / etc/grub.conf file contains the following.

Default=1

Timeout=10

Splashimage= (hd0,7) / boot/grub/splash.xpm.gz

Title Fedora Core (2.4.22-1.2061.nptl)

Root (hd0,7)

Kernel / boot/vmlinuz-2.4.22-1.2061.nptl ro root=LABEL=/

Initrd / boot/initrd-2.4.22-1.2061.nptl.img

Title WindowsXP

Rootnoverify (hd0,0)

Chainloader + 1

So I'm going to add password to / etc/grub.conf-- the line md5 $1 $7uDL20 $eSB.XRPG2A2Fv8AeH34nZ0, and lock, where should I add it? please see the following change example

Timeout=10

Splashimage= (hd0,7) / boot/grub/splash.xpm.gz

Password-- md5 $1 $7uDL20 $eSB.XRPG2A2Fv8AeH34nZ0

Title Fedora Core (2.4.22-1.2061.nptl)

Lock

Root (hd0,7)

Kernel / boot/vmlinuz-2.4.22-1.2061.nptl ro root=LABEL=/

Initrd / boot/initrd-2.4.22-1.2061.nptl.img

Title WindowsXP

Rootnoverify (hd0,0)

Chainloader + 1

Lock means to lock up the Redhat Fedora. An error will be prompted if it starts. At this point, you should press the P key and enter the password.

Several encryption methods are implemented using the password,lock command:

1) simply encrypt the GRUB interface, but not the booted system, add a line below the timeout line: password-- md5 PASSWORD

2) encrypt the GRUB interface, and encrypt the booted system by adding a line below the timeout line: password-- md5 PASSWORD adds a line below the title line: lock

3) there are multiple booted systems at the same time. Encrypt the specific system instance separately (without encrypting the GRUB interface). Add a line below the title line: lock is next to the lock line and add another line: password-- md5 PASSWORD Note: lock cannot be used alone.

Thank you for your reading, the above is the content of "introduction of MD5 encryption method of Linux system GRUB". After the study of this article, I believe you have a deeper understanding of the introduction of MD5 encryption method of Linux system GRUB, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report