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

相关推荐
Ares-Wang6 小时前
Linux》》systemd 、service、systemctl daemon-reload、systemctl restart docker
linux·运维·docker
安审若无8 小时前
运维知识框架
运维·服务器
阿拉斯攀登8 小时前
从入门到实战:CMake 与 Android JNI/NDK 开发全解析
android·linux·c++·yolo·cmake
Arvin62711 小时前
Nginx 添加账号密码访问验证
运维·服务器·nginx
风曦Kisaki11 小时前
# Linux 磁盘查看命令详解:df 与 du
linux·运维·网络
路溪非溪11 小时前
Linux中gpio子系统的现代接口
linux·arm开发·驱动开发
攻城狮在此11 小时前
华为交换机Console口密码如何清除
运维·网络·华为
内心的一片海12 小时前
服务器内存异常占用
运维·服务器
文静小土豆12 小时前
Centos7负载异常过高排查思路(Load Average)
linux
Deitymoon12 小时前
linux——原子操作
linux