1 Star 0 Fork 25

yueyuankun/security-tool_1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
security-tool-add-grub2-password-for-legacy.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
yueyuankun 提交于 2023-06-09 17:28 . add grub2 password for legacy
From 28be480fbcfe18f008948642493cbba612c8c685 Mon Sep 17 00:00:00 2001
From: yueyuankun <yueyuankun@kylinos.cn>
Date: Fri, 9 Jun 2023 17:17:17 +0800
Subject: [PATCH] add grub2 password for legacy
---
security-tool.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/security-tool.sh b/security-tool.sh
index 0877081..5939f44 100644
--- a/security-tool.sh
+++ b/security-tool.sh
@@ -948,6 +948,8 @@ function fn_harden_grub2()
echo -e "cat <<EOF\nset superusers="root"\npassword_pbkdf2 root grub.pbkdf2.sha512.10000.5A45748D892672FDA02DD3B6F7AE390AC6E6D532A600D4AC477D25C7D087644697D8A0894DFED9D86DC2A27F4E01D925C46417A225FC099C12DBD3D7D49A7425.2BD2F5BF4907DCC389CC5D165DB85CC3E2C94C8F9A30B01DACAA9CD552B731BA1DD3B7CC2C765704D55B8CD962D2AEF19A753CBE9B8464E2B1EB39A3BB4EAB08\nEOF\n" >> /etc/grub.d/00_header
if [ -d /boot/efi/EFI/openEuler -a -d /sys/firmware/efi ]; then
grub2-mkconfig -o /boot/efi/EFI/openEuler/grub.cfg
+ else
+ grub2-mkconfig -o /boot/grub2/grub.cfg
fi
}
# Function Name: fn_harden_sysctl
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yue-yuankun/security-tool_1.git
git@gitee.com:yue-yuankun/security-tool_1.git
yue-yuankun
security-tool_1
security-tool_1
master

搜索帮助