当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > linux root 密码忘了怎么办?

Unix/Linux
Linux 指令篇:档案目录管理--cat
Linux 指令篇:档案目录管理--cd
Linux 指令篇:档案目录管理--chmod
Linux 指令篇:档案目录管理--chown
Linux 指令篇:档案目录管理--cp
Linux 指令篇:档案目录管理--cut
Linux 指令篇:档案目录管理--find
Linux 指令篇:档案目录管理--less
Linux 指令篇:档案目录管理--ln
Linux 指令篇:档案目录管理--locate
Linux 指令篇:档案目录管理--ls
Linux 指令篇:档案目录管理--mkdir
Linux 指令篇:档案目录管理--more
Linux 指令篇:档案目录管理--mv
Linux 指令篇:档案目录管理--rm
Linux 指令篇:档案目录管理--rmdir
Linux 指令篇:档案目录管理--split
Linux 指令篇:档案目录管理--touch
Linux 指令篇:日期时间排程--at
Linux 指令篇:日期时间排程--cal

Unix/Linux 中的 linux root 密码忘了怎么办?


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-16   浏览: 201 ::
收藏到网摘: n/a

1、在Grub的引导装载程序菜单上,选择你要进入的条目,键入 “e” 来进入编辑模式;
2、在第二行(类似于kernel /vmlinuz-2.6.15 ro root=/dev/hda2 ),键入”e”进入编辑模式;
3、在句末加上”init=/bin/bash”,回车;
4、按“b”启动系统。
这样我们即可获得一个bash的shell,进入shell后,根分区的挂载模式默认是只读,我们要将其改为可写,否则不能更改root密码:
mount -no remount,rw /
passwd root
sync
mount -no remount,ro /
reboot
这样即可成功更改debian的root用户的密码。