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 密码 然后就可以编辑参数。

相关推荐
Full Stack Developme25 分钟前
Linux 多种压缩格式,优缺点和适用场景
linux·运维·服务器
旖旎夜光28 分钟前
Linux(4)(下)
linux·学习
yBmZlQzJ5 小时前
财运到内网穿透域名解析技术机制与中立评估
运维·经验分享·docker·容器·1024程序员节
Shanxun Liao5 小时前
Cenots 7.9 配置多台 SSH 互信登陆免密码
linux·运维·ssh
j_xxx404_5 小时前
Linux:第一个程序--进度条|区分回车与换行|行缓冲区|进度条代码两个版本|代码测试与优化
linux·运维·服务器
一点晖光5 小时前
jenkins优化记录
运维·jenkins
looking_for__5 小时前
【Linux】Ext系列文件系统
linux
最贪吃的虎6 小时前
Git: rebase vs merge
java·运维·git·后端·mysql
OliverH-yishuihan6 小时前
开发linux项目-在 Windows 上 基于“适用于 Linux 的 Windows 子系统(WSL)”
linux·c++·windows
yBmZlQzJ6 小时前
内网穿透工具通过端口转发实现内外网通信
运维·经验分享·docker·容器·1024程序员节