GRUB加密:MD5加密
[root@Server3 ~]# grub-md5-crypt Password: Retype password: $1$TJL.q1$4PnBp7pXRsN/BZhrkbSyn1 [root@Server3 ~]#
[root@Server3 ~]# 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-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu password --md5 $1$ECK.q1$jHq3ZxiAi4VN4sp8614fh0 title Red Hat Enterprise Linux (2.6.32-279.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=7fdde686-2694-4400-8093-8e2458391446 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-279.el6.x86_64.img [root@Server3 ~]#
说明:
如果把password放在title的上面,则表示的是修改grub需要输入密码。
如果把password放在title中,则表示如果要加载指定的内核,则需要输入密码。
[root@Server3 ~]# 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-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux (2.6.32-279.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=7fdde686-2694-4400-8093-8e2458391446 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-279.el6.x86_64.img password --md5 $1$ECK.q1$jHq3ZxiAi4VN4sp8614fh0 [root@Server3 ~]#
本文出自 “HeZhang” 博客,请务必保留此出处http://hezhang.blog.51cto.com/1347601/1533128
原文:http://hezhang.blog.51cto.com/1347601/1533128