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

Linux enters single-user mode encryption

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

Share

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

Linux enters single-user mode encryption

Text keywords: Linux, single user mode encryption, grub menu encryption, plaintext encryption, MD5 encryption

By default, the system runs at levels 3 (full multi-user mode) and 5 (operating mode with interface). In the previous article, we have introduced how to switch the system to single-user mode, where you can directly manipulate root users to reset passwords. So the problem is, since anyone who doesn't know the root password can reset the password in this way, our system is also dangerous. To avoid this problem, we need to impose some restrictions on entering single-user mode, that is, adding an extra layer of password authentication.

First, plaintext encryption 1. Profile modification related configuration file: / boot/grub/grub.conf

Configuration item name: password insert location: after splashimage configuration item example: set password to 123456

two。 The encryption effect cannot be edited directly after encryption. You need to press the letter p to enter the password.

Enter the correct password and pass the verification

The editing option appears, and you can continue to log in in single-user mode.

II. MD5 encryption

When encrypting, because it is plaintext, there is still a risk of direct exposure. There are many encryption tools that can be used directly in Linux system, such as MD5, SHA and so on.

1. Get encrypted string

Take the operation of using MD5 as an example, use the grub-md5-crypt command to get the encrypted string first.

two。 Profile modification

You need to use password-- md5 in the configuration room to specify the encryption method.

3. Encryption effect

Same as plaintext encryption, after setting up, you need to verify the password in the grub menu interface before you can enter the editing interface. It is important to note that you only need to enter the original string before encryption. The encryption method of md5 can ensure that the password in the configuration file will not be easily exposed, which can further improve security.

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