linux下grub的设置密码,grub设置密码
linux下,会看到GRUB引导,如果不设置密码很容易被别人篡改root密码.
GRUB有两种加密方式,一种是lock,一种是利用非明文加密,也就是md5 128位加密。
[root@localhost /]# vi /etc/grub.conf
设置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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
password 明文设置密码
修改后:
# 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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
password=prince(prince为说设置的密码)
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
lock(进入linux时需要输入密码)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
注:这里GRUB密码设置为prince,lock意思是进入linux时需要输入密码
给grub加密密码
利用非明文加密,也就是md5 128位加密.
md5加密方式
运行
# /sbin/grub-md5-crypt (在grub中用: md5crypt)
输入你的密码,如prince
生成一串东东, 是随即产生的,要记下来.
然后添加到 grub.conf
改grub.conf成如下
CODE:
# 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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$GexO3$iHhcfqlRE84s.2TyHN2l10 (加密后的密码)
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-11.EL)
lock
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img
posted on 2007-07-20 21:26 prince 阅读(696) 评论(0) 编辑 收藏 所属分类: 硬件网络
linux下grub的设置密码,grub设置密码相关推荐
- linux下的teamd命令,最NB的发现 LINUX 下玩teamviewer 命令行设置密码
cd /opt/teamviewer/tv_bin/ [root@666 tv_bin]# ls desktop script teamviewerd TVGuiSlave.32 xdg-utils ...
- linux下grub的使用和介绍
什么是grub 多操作系统引导程序:简单说就是系统启动的时候你可以选择启动那个系统(可以是一个磁盘安装多个系统也可以是多个磁盘的多个系统).linux下常见的有grub/grub2,LOLI,嵌入系统 ...
- linux下grub故障(使用光盘进入救援模式)
1.这里使用的是vmware vsphere虚拟主机 救援模式有什么作用: ◆可以更改root密码: ◆恢复硬盘.文件系统操作: ◆系统启动不来的时候,只能通过救援模式来启动: 首先设置启动选项,我 ...
- linux修改grub权限,linux下肿么修改grub.cfg
一.grub2的启动配置文件grub.cfg grub2的启动配置文件grub.cfg是/boot/grub/grub.cfg,而不是以前的memu.lst. 如果你是多系统,有Ubuntu和wind ...
- Linux下grub.cnf详解
grub.conf跟系统启动项有关,对于重置密码.来说小case... 1.介绍 在Red Hat Linux7.2之后,默认的引导加载程序从LTLO变为GRUB.这个引导加载程序使用户能够选择 ...
- linux 下root 口令破解(二) ——说一下grub的密码和安全模式
linux 下root 口令破解(二) ------说一下grub的密码和安全模式 我们都知道root的密码是保存在/etc/shadow下的,而/etc/passwd 则是用户信息文件,密码呢由于是 ...
- Linux下Grub命令配置详解
grub(Grand Unified Boot Loader)启动引导器 与grub相似软件比较 BM:安装多操作系统软件,必须把两个操作系统安装在主分区,硬盘最多可以分4个主分区. LILO:以前l ...
- linux下redis设置密码登录(简单易懂)
linux下redis设置密码登录 redis设置密码访问 你的redis在真是环境中不可以谁想访问就可以访问,所以必须要设置密码 设置密码的流程如下: vim /etc/redis.conf #re ...
- linux下编译doppia,Grub错误总结解决方案(共十七条)
lyzhang_sh 于 2009-01-08 19:02:50发表: 感觉你还没说清楚啊 进啥模式里? 对于新手很难理解了 lion2010 于 2008-09-05 03:40:46发表: 我是1 ...
- linux下grub引导windows,Grub引导Linux或者windows系统
很多新手,在安装linux系统时常常会出现的问题:引导程序装错,或者不小心删除linux分区,把mbr删掉了.或者装完linux后又重装windows,把mbr覆盖了,以致无法启动系统,出现" ...
最新文章
- 与现代传感器的接口:轮询ADC驱动程序
- 最细的实现剖析:jQuery 2.0.3源码分析Deferred
- 将输出的数据按照表格的形式进行输出
- Gis 热点技术分析
- 鸿蒙系统桌面小艺建议怎么删除?鸿蒙系统小艺建议怎么设置关闭及开启
- Bailian2743 字符串判等【字符串】
- man statd(rpc.statd中文手册)
- 跳表 skipList
- 获取浏览器高度和宽度
- OCR文字识别算法与搭建流程
- ubuntu登录mysql报错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mys
- set_intersection的基本使用方式
- mysql key reads 参数_mysql Key_reads 调优(转)
- 戏说中国互联网5大巨头
- Android内购+IM
- linux信号:SIGINT、SIGKILL、SIGSTOP、SIGCONT
- 鸿蒙系统翻车了,华为鸿蒙系统“翻车了”?被质疑抄袭安卓11系统,事实并非如此...
- 圣地亚哥大学计算机科学专业,加州大学圣地亚哥分校计算机科学与工程系
- 【网络学习】LSTM 长期依赖(Long-Term Dependencies)问题
- chrome常用启动参数