centos 7 grub加密 —— 筑梦之路

创建密码

bash 复制代码
grub2-mkpasswd-pbkdf2

配置grub

bash 复制代码
vi /etc/grub.d/40_custom

 more /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.C5255CE1D8756DD195C6B6CF42A1874B28C15D1EC9D07E6BFCCBF2E4AA12D338F9B9E87
6041912A922669D36E7D5E399D3FFDC579B54699E910BF4AD0576C342.5B251807A404DCEECD218A8DAAEE267202C1CD521D16B3D640B574282C7
E730B56E598F1B7F072308CC1413D7FFA52C6423C6184B0E373926DD524E71529B335


grub2-mkconfig -o /boot/grub2/grub.cfg

重启测试验证

按e编辑,进入输入用户名root 密码 然后就可以编辑参数。

相关推荐
梁洪飞7 分钟前
内核的schedule和SMP多核处理器启动协议
linux·arm开发·嵌入式硬件·arm
_运维那些事儿20 分钟前
VM环境的CI/CD
linux·运维·网络·阿里云·ci/cd·docker·云计算
Y1rong1 小时前
linux之文件IO
linux
Trouvaille ~1 小时前
【Linux】UDP Socket编程实战(一):Echo Server从零到一
linux·运维·服务器·网络·c++·websocket·udp
嵌入小生0072 小时前
Shell | 命令、编程及Linux操作系统的基本概念
linux·运维·服务器
-Try hard-3 小时前
Linuv软件编程 | Shell命令
linux·运维·服务器
释怀不想释怀3 小时前
Linux快捷键,软件安装启动
linux·运维·服务器
zhengfei6113 小时前
自动化快速评估工具
运维·自动化
Hello World . .3 小时前
Linux:软件编程
linux·运维·服务器·vim
人间打气筒(Ada)3 小时前
k8s:CNI网络插件flannel与calico
linux·云原生·容器·kubernetes·云计算·k8s