linuxgrub加密

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linuxgrub加密相关的知识,希望对你有一定的参考价值。

1.计算grub的MD5加密密码:

#grub-md5-crypt

Password: 
Retype password:
输入两遍密码进行确认以后,就会计算出你所输入密码的MD5加密值,如:$1$pFddV1$3X/XnIzEySuSF7fL9BUUj/
复制该密码进行MD5加密后的值。

 

2.配置grub

[[email protected] ~]# cat /boot/grub/grub.conf     
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
password --md5 $1$pFddV1$3X/XnIzEySuSF7fL9BUUj/
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-308.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.18-308.el5.img
 
3.重启后生效

以上是关于linuxgrub加密的主要内容,如果未能解决你的问题,请参考以下文章

设置grub密码

玩转grub加密

生成grub密码,防止陌生人进入单用户模式

grub启动程序设置加密 虚拟机vmware8.0.4 CentOS 6.3

Grub加密

rhel6 给单用户添加密码 防止其他人进入