grub 全局加密方式 例如grub的配置文件内容如下: default=0 timeout=10 splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz password 123 <----在此加入密码 title redhat linux lock <----此时linux受到密码的限制,而如果有其他的操作系统, 由于没有加lock,因此不会受到密码的限制 root (hd0,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ initrd /initrd-2.4.20-8.img 一般的加密方式:直接在grub的配置文件的title后加上password ***,便对相应的系统加密了。如下例 default=0 timeout=10 splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz title redhat linux password 123 <---在此给redhat linux加密,密码为123 root (hd0,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ initrd /initrd-2.4.20-8.img 为防止grub配置文件的明文密码导致不安全,可以使用md5的密文密码,如下 default=0 timeout=10 splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz title redhat linux password --md5 ********** <---*号为经过md5运算过后的密码散列 root (hd0,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ initrd /initrd-2.4.20-8.img 获得md5密码散列,命令grub-md5-crypt,回车后会出现 Password: (此处输入密码) Retype password: (再次输入密码) (这里会出现经过md5运算过后的密码散列) 在启动grub界面按e进入编辑,在kenerl后加single命令,如下 grub edit> kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ single 这样就进入了单用户模式,单模式下是不能启动图形界面的。相当于windows下的安全模式。 去除root用户密码的方法: 1.使用grub编辑,进入single模式。 2.使用vi修改/etc下的passwd和shadow文件,删除root的密码,强制保存退出。 3.重新启动进入系统时使用root登录便不需要密码。
Linux学习笔记4_grub相关
原创
©著作权归作者所有:来自51CTO博客作者木头lbj的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:Linux学习笔记5_压缩文件
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
学习笔记----linux grub 相关操作
&n
linux 职场 休闲 linux grub 相关操作 -
学习笔记之grub应用
若有错误,敬请指正
grub 安全技术