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 keep a secret in CentOS system

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

Share

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

How to keep secret in the CentOS system, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

If the CentOS system forbids access to a single user, the first step is to configure the GRUB password by modifying / boot/grub/grub.conf or / etc/grub.conf (symbolic link of / etc/grub.conf/boot/grub/grub.conf), for example: vi / boot/grub/grub.conf to enter the configuration file editing.

Here we introduce a way to add a password to grub in the CentOS system to prohibit others from entering the system in single-user mode. There are two ways:

1. Plaintext

Add: password= password to the next line of the parameter splashimage. Restart the computer after saving, and when you log in to the GRUB menu page again, you will find that you can no longer directly use the e command to edit the startup label. You must first use the p command and enter the correct password before you can edit the startup label. But it is not very safe for us to set a plaintext password. If someone else gets the plaintext password, they can still change the GRUB startup label to change the root password.

2. MD5 encryption method

Enter grub-md5-crypt enter in the terminal, then the system will be asked to enter the same password twice, and then the system will output MD5 code. You just need to copy the generated MD5 ciphertext.

Add the following line to the parameter splashimage:

Password-md5 hiddenmenu of md5 $1 $AKO18/$7EaafQPtx.7y2UdZyL5cp0//centos

Restart the computer after saving, and when you log in to the GRUB menu page again, you will find that you can no longer directly use the e command to edit the startup label. You must first use the p command and enter the correct password before you can edit the startup label.

This is the answer to the question about how to keep secret for yourself in the CentOS system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

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