3.给系统的grub加密,使用户无法进行单用户模式
[root@localhost ~]# grub-md5-crypt
Password: --输入密码
Retype password: --确认密码
$1$Bvp0X1$lzZrrThfQuLECYdk4wtAk1 --这是密钥,复制一下
[root@localhost ~]# vim /boot/grub/grub.conf
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$Bvp0X1$lzZrrThfQuLECYdk4wtAk1 --添加这一行
root (hd0,0)
kernel /vmlinuz-2.6.32-358.el6.i686 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
initrd /initramfs-2.6.32-358.el6.i686.img
[root@localhost ~]# reboot
系统重启后不能编辑grub菜单

4.破解grub密码
(1)放入系统光盘进入修复模式

(2)选择语言

(3)选择键盘

(4)选择系统光盘的位置

(5)选择网络环境(不需要网络)

(6)选择进入系统修复模式

(7)将系统挂载到/mnt/sysimage(chroot /mnt/sysimage可以改变根目录)

(8)挂载系统

(9)选择shell环境

(10)进入grub.conf文件

(11)删除grub.conf文件中的密码行

(12)重启系统

