1.設置明文密碼
1.1編輯grub.conf
[root@oldboy ~]# vim /boot/grub/grub.conf
1.2插入password
#boot=/dev/sda
default=0
timeout=5
splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password=
title CentOS (2.6.32-642.11.1.el6.x86_64)
2.設置MD5加密密碼
1.1生成MD5密碼
[root@oldboy ~]# grub-md5-crypt
1.2編輯grub.conf
[root@oldboy ~]# vim /boot/grub/grub.conf
1.3插入password
#boot=/dev/sda
default=0
timeout=5
splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 #加上生的MD5密碼
title CentOS (2.6.32-642.11.1.el6.x86_64)