免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 804 | 回复: 0
打印 上一主题 下一主题

想不起Linux虚拟机密码怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-23 11:31 |只看该作者 |倒序浏览

                想不起Linux虚拟机密码...只能进入单用户模式下重设root密码.
linux 运行级别:
init 0               (停机)
init 1               (单用户模式)
init 2               (多用户模式,不能使用NFS)
init 3               (完全多用户模式,字符界面)
init 4               (未使用)
init 5               (图形界面的多用户模式)
init 6               (重启模式)
# runlevel         (查看当前运行级别)
# init n            (改变运行级别)
# vi /etc/inittab (改变系统默认启动进入的级别)
[color="#ff0000"]    id:3:initdefault
在RedHat系统启动时,按向上或向下箭头进入GRUB编辑界面,按[color="#ff0000"]"e"做如下(红字)修改:
"e" to edit the commands before booting.
[color="#ff0000"]     修改:
     kernel /boot/vmlinux-2.6.18-8.e15 ro root=LABEL=/ rhgb quiet
     为:
     kernel /boot/vmlinux-2.6.18-8.e15 ro root=LABEL=/ rhgb quiet 1
[color="#ff0000"]     然后按"b"键 运行系统
[color="#ff0000"]或者在RedHat系统启动时,按向上或向下箭头进入GRUB编辑界面,按[color="#ff0000"]"a"[color="#000000"]做如下(红字)修改:
"a" to modify the kernel arguments
[color="#ff0000"]     修改:
     grub append> ro root=LABEL=/ rhgb quiet
     为:
     grub append> ro root=LABEL=/ rhgb single quiet
[color="#ff0000"]

确认后进入单用户模式下.修改ROOT密码.
重启系统后就能以新root密码进入正常模式.
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/93926/showart_1875154.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP