码迷,mamicode.com
首页 > 系统相关 > 详细

【linux】grub加密

时间:2016-06-22 15:22:59      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

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

#grub-md5-crypt

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

 

2.配置grub

[root@server5 ~]# 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.重启后生效

【linux】grub加密

标签:

原文地址:http://www.cnblogs.com/paulwinflo/p/5606984.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!