GRUB密码保护,主要防止别个恶意修改你主机ROOT密码。
1、生成密码
[root@localhost ~]# grub-md5-crypt
Password:
Retype password:
$9U6aAg751$6l/ob1$8KK/bMZFhK6NQw1
[root@localhost ~]#
2、修改Grub.conf文件
[root@localhost ~]# vi /etc/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password –md5 $9U6aAg751$6l/ob1$8KK/bMZFhK6NQw1
title CentOS (2.6.32-431.el6.x86_64)--在此行前加入密码信息
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
…
….
3、保存退出
4、Reboot查看效果