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

How to set grub password by CentOS6.6

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

Share

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

This article will explain in detail how to set the grub password for CentOS6.6. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

There are three ways to set the grub password:

First, set the plaintext password

Edit grub profile

# vi / etc/grub.conf

After opening it, type on the next line of hiddenmenu

Password=123456

Save and exit, enter the boot page after reboot, press enter key to enter the system startup menu, press p to enter the 123456 password to modify and edit the kernel

2. Set md5 encryption password

The following two commands can encrypt the md5 password

Grub-md5-crypt

Grub-crypt-md5

Use the command to set the md5 encryption password and copy the generated MD5 code

[root@localhost~] # grub-crypt-- md5Password: Retype password: $1$ Vk/Pvw4.$i8b0feQIqez/CRInfnhcq0

Edit grub profile

# vi / etc/grub.conf

After opening it, enter it on the next line of hiddenmenu and paste the generated MD5 code

Password-- md5 $1$ Vk/Pvw4.$i8b0feQIqez/CRInfnhcq0

Save and exit, enter the boot page after reboot, press enter key to enter the system startup menu, press p to enter the password to modify and edit the kernel

3. Set sha encryption password

Grub-crypt-- sha-256 set sha password encryption command

[root@localhost~] # grub-crypt-- sha-256Password: Retype password: $5$ SoMwCWaMsEvM.GNV$skt6aRLI.P4oWgsvn/kQzeWnmRNMPqUTBxL./IGfOV1

Copy the generated sa code

Edit grub profile

# vi / etc/grub.conf

After opening it, enter it on the next line of hiddenmenu and paste the generated sa code.

Password-- encrypted $5$ SoMwCWaMsEvM.GNV$skt6aRLI.P4oWgsvn/kQzeWnmRNMPqUTBxL./IGfOV1

Save and exit, enter the boot page after reboot, press enter key to enter the system startup menu, press p to enter the password to modify and edit the kernel

All the above three methods can be used for grub encryption, and they have been tested successfully.

This is the end of the article on "how to set the grub password in CentOS6.6". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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: 225

*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